diff --git a/web/src/shell/AdminShell.vue b/web/src/shell/AdminShell.vue
index eba4dd8..748fbe8 100644
--- a/web/src/shell/AdminShell.vue
+++ b/web/src/shell/AdminShell.vue
@@ -6,6 +6,7 @@ import { isDark, toggleTheme } from "../shared/theme";
import { adminNavOptions, type AdminPageKey } from "./adminNavigation";
import UsersView from "../features/admin/UsersView.vue";
import CoursesView from "../features/admin/CoursesView.vue";
+import ProxiesView from "../features/admin/ProxiesView.vue";
import SettingsView from "../features/admin/SettingsView.vue";
defineProps<{ username: string }>();
@@ -15,7 +16,7 @@ const collapsed = ref(window.innerWidth < 800);
function pageFromHash(): AdminPageKey {
const name = window.location.hash.replace(/^#\/?/, "");
- if (name === "courses" || name === "settings" || name === "users") return name;
+ if (name === "courses" || name === "proxies" || name === "settings" || name === "users") return name;
return "users";
}
@@ -43,7 +44,7 @@ onUnmounted(() => {
});
function onMenu(key: string) {
- if (key === "users" || key === "courses" || key === "settings") {
+ if (key === "users" || key === "courses" || key === "proxies" || key === "settings") {
page.value = key;
remember(key);
}
@@ -105,6 +106,7 @@ function onMenu(key: string) {
+
diff --git a/web/src/shell/adminNavigation.ts b/web/src/shell/adminNavigation.ts
index 1bc385d..e243e1d 100644
--- a/web/src/shell/adminNavigation.ts
+++ b/web/src/shell/adminNavigation.ts
@@ -1,16 +1,17 @@
import type { Component } from "vue";
import { h } from "vue";
import { NIcon } from "naive-ui";
-import { LibraryOutline, PeopleOutline, SettingsOutline } from "@vicons/ionicons5";
+import { GlobeOutline, LibraryOutline, PeopleOutline, SettingsOutline } from "@vicons/ionicons5";
function renderIcon(icon: Component) {
return () => h(NIcon, null, { default: () => h(icon) });
}
-export type AdminPageKey = "users" | "courses" | "settings";
+export type AdminPageKey = "users" | "courses" | "proxies" | "settings";
export const adminNavOptions = [
{ label: "用户管理", key: "users" as const, icon: renderIcon(PeopleOutline) },
{ label: "课程清单", key: "courses" as const, icon: renderIcon(LibraryOutline) },
+ { label: "代理", key: "proxies" as const, icon: renderIcon(GlobeOutline) },
{ label: "系统配置", key: "settings" as const, icon: renderIcon(SettingsOutline) },
];