2026-04-19 14:18:20 +08:00
|
|
|
<script setup lang="ts">
|
2026-04-20 11:08:09 +08:00
|
|
|
import { defineAsyncComponent, onMounted } from "vue";
|
2026-04-19 14:18:20 +08:00
|
|
|
import { useDesktopSession } from "./composables/useDesktopSession";
|
2026-04-20 11:08:09 +08:00
|
|
|
|
|
|
|
|
const DesktopShell = defineAsyncComponent(() => import("./components/DesktopShell.vue"));
|
|
|
|
|
const LoginView = defineAsyncComponent(() => import("./views/LoginView.vue"));
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
|
|
|
const { isAuthenticated, syncRuntimeSession } = useDesktopSession();
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
void syncRuntimeSession();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<DesktopShell v-if="isAuthenticated" />
|
|
|
|
|
<LoginView v-else />
|
|
|
|
|
</template>
|