feat: 完善登录保持、栅格下载和任务调度

This commit is contained in:
2026-10-25 05:42:24 +08:00
parent dab26ff4ee
commit 4cf64957c5
25 changed files with 1871 additions and 320 deletions
+4 -3
View File
@@ -4,7 +4,7 @@ import { NButton, NIcon, NLayoutSider, NMenu } from "naive-ui";
import { LogOutOutline, MoonOutline, PersonOutline, SunnyOutline } from "@vicons/ionicons5";
import { logout, type UserInfo } from "../features/auth/api";
import { isDark, toggleTheme } from "../shared/theme";
import { navGroups, type PageKey } from "./navigation";
import { navOptions, type PageKey } from "./navigation";
import GridDownloadView from "../features/download/GridDownloadView.vue";
import DownloadManagerView from "../features/download/DownloadManagerView.vue";
@@ -12,6 +12,7 @@ const props = defineProps<{ user: UserInfo }>();
const emit = defineEmits<{ logout: [] }>();
const page = ref<PageKey>("grid");
const expanded = ref<string[]>([]);
const focusId = ref("");
function onMenu(key: string) {
@@ -36,8 +37,8 @@ async function signOut() {
<div class="shell">
<aside class="sider">
<div class="sider-title">NqiTools</div>
<n-layout-sider :native-scrollbar="false" :width="220" style="background: transparent; flex: 1">
<n-menu :value="page" :options="navGroups" @update:value="onMenu" />
<n-layout-sider :native-scrollbar="false" :width="220" style="background: transparent; flex: 1; min-height: 0">
<n-menu v-model:expanded-keys="expanded" :value="page" :options="navOptions" @update:value="onMenu" />
</n-layout-sider>
<div class="sider-user">
<n-icon :size="18"><PersonOutline /></n-icon>