refactor: 只保留 Web,移除 Capacitor 原生壳
删除 android/、ios/ 两个 Capacitor 原生工程与 capacitor.config.ts、 ionic.config.json,以及 scripts/android、scripts/ios.sh 构建脚本; 根与 apps/web 的 @capacitor/* 依赖和相关 npm scripts 一并移除。 Web 侧去掉原生分支:登录只走云乐坊容器授权面板或顶层重定向, 暗色模式不再改原生状态栏,移除 Android 物理返回键处理。 保留 @nuxtjs/ionic(Web UI 框架)、云乐坊 window.ylf 桥接与 PWA。 决策记录见 docs/decisions/0004-web-only.md。
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
import { App } from '@capacitor/app'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
import { useBackButton } from '@ionic/vue'
|
||||
import { tabRootPaths } from '../config'
|
||||
|
||||
useHead({
|
||||
@@ -9,7 +6,6 @@ useHead({
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
const ionRouter = useIonRouter()
|
||||
|
||||
function isTabRootPath(path: string) {
|
||||
return tabRootPaths.includes(path)
|
||||
@@ -29,19 +25,6 @@ function onTabClick(tab: string) {
|
||||
const content = tabsRef.value?.$el.querySelector<HTMLIonContentElement>('.ion-page:not(.ion-page-hidden) ion-content')
|
||||
void content?.scrollToTop(reducedMotion.value ? 0 : 300)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
useBackButton(10, () => {
|
||||
if (isTabRootPath(router.currentRoute.value.path)) {
|
||||
App.minimizeApp()
|
||||
}
|
||||
else {
|
||||
ionRouter.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user