feat: 登录也加载异常问题处理

This commit is contained in:
duanshuwen
2025-12-19 23:12:14 +08:00
parent 4b4e955b17
commit e6fa999137
7 changed files with 295 additions and 17 deletions

View File

@@ -192,6 +192,7 @@ declare global {
const useFullscreen: typeof import('@vueuse/core').useFullscreen
const useGamepad: typeof import('@vueuse/core').useGamepad
const useGeolocation: typeof import('@vueuse/core').useGeolocation
const useI18n: typeof import('vue-i18n').useI18n
const useId: typeof import('vue').useId
const useIdle: typeof import('@vueuse/core').useIdle
const useImage: typeof import('@vueuse/core').useImage

View File

@@ -5,14 +5,14 @@
</div>
<div class="title-bar-controls w-[168px] flex items-center justify-end text-tx-secondary">
<native-tooltip content="最小化">
<native-tooltip :content="t('window.minimize')">
<button v-show="isMinimizable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
@click="minimizeWindow">
<iconify-icon icon="material-symbols:check-indeterminate-small" color="#ffffff" :width="btnSize"
:height="btnSize" />
</button>
</native-tooltip>
<native-tooltip :content="isMaximized ? '还原' : '最大化'">
<native-tooltip :content="isMaximized ? t('window.restore') : t('window.maximize')">
<button v-show="isMaximizable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
@click="maximizeWindow">
<iconify-icon icon="material-symbols:chrome-maximize-outline-sharp" color="#ffffff" :width="btnSize"
@@ -21,7 +21,7 @@
:height="btnSize" v-show="isMaximized" />
</button>
</native-tooltip>
<native-tooltip content="关闭">
<native-tooltip :content="t('window.close')">
<button v-show="isClosable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
@click="handleClose">
<iconify-icon icon="material-symbols:close" color="#ffffff" :width="btnSize" :height="btnSize" />
@@ -52,7 +52,7 @@ withDefaults(defineProps<HeaderBarProps>(), {
isClosable: true,
})
const emit = defineEmits(['close']);
// const { t } = useI18n();
const { t } = useI18n();
const btnSize = 16;

View File

@@ -1,18 +1,11 @@
import { createRouter, createMemoryHistory } from "vue-router";
import Layout from '@renderer/layout/index.vue'
const routes = [
{
path: "/",
component: Layout,
children: [
{
path: "home",
component: () => import("@renderer/views/home/index.vue"),
name: "Home",
meta: { requiresAuth: true },
},
]
component: () => import("@renderer/views/login/index.vue"),
name: "Login",
meta: { requiresAuth: false },
}
];