feat: 用安装页和编排完成部署,并整理登录页
This commit is contained in:
+2
-12
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user