rebuild(stage-4): deliver shared shell and account interfaces

This commit is contained in:
leefer
2026-07-30 02:08:20 +08:00
parent d1c658d8ef
commit 3b75bf2d63
47 changed files with 3042 additions and 99 deletions
+30 -1
View File
@@ -1,3 +1,32 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useSessionStore } from "../shared/stores/session";
import AppShell from "./shell/AppShell.vue";
import AuthView from "./views/AuthView.vue";
const session = useSessionStore();
const restoreFailure = ref("");
async function restore(): Promise<void> {
restoreFailure.value = "";
try {
await session.restore();
} catch (error) {
restoreFailure.value = error instanceof Error ? error.message : "服务连接失败";
}
}
onMounted(restore);
</script>
<template>
<RouterView />
<main v-if="!session.initialized || restoreFailure" class="app-loading" aria-live="polite">
<div class="loading-stack">
<p>{{ restoreFailure || "正在载入复盘工作台" }}</p>
<button v-if="restoreFailure" class="btn" type="button" @click="restore">重试</button>
</div>
</main>
<AppShell v-else-if="session.account" />
<AuthView v-else />
</template>