feat: 用安装页和编排完成部署,并整理登录页

This commit is contained in:
2026-10-30 09:49:20 +08:00
parent 7ed299bbf6
commit 3fa4f83180
30 changed files with 635 additions and 121 deletions
+2 -12
View File
@@ -1,8 +1,7 @@
<script setup lang="ts">
import { useRoute, useRouter } from "vue-router";
import { NSelect } from "naive-ui";
import { api, clearSession, token } from "../shared/http";
import { setThemeChoice, themeChoice, type ThemeChoice } from "../shared/theme";
import ThemeButton from "./ThemeButton.vue";
const route = useRoute();
const router = useRouter();
@@ -16,15 +15,6 @@ const items = role === "admin"
{ label: "采集", path: "/admin/sources" },
]
: [{ label: "任务", path: "/tasks" }];
const themes = [
{ label: "跟随系统", value: "system" },
{ label: "深色", value: "dark" },
{ label: "浅色", value: "light" },
];
function chooseTheme(value: ThemeChoice) {
setThemeChoice(value);
}
async function logout() {
if (token()) {
@@ -48,7 +38,7 @@ async function logout() {
</nav>
<div class="sider-foot">
<div class="who">{{ name }}</div>
<n-select :value="themeChoice" :options="themes" size="small" @update:value="chooseTheme" />
<ThemeButton />
<button class="text-button" @click="logout">退出</button>
</div>
</aside>