- {{ tr('adminConsole') }}
{{ currentPageTitle }}
{{ tr('gatewayRunning') }}
+ {{ tr('adminConsole') }}
{{ currentPageTitle }}
{{ tr('gatewayRunning') }}
{{ errorMessage }}
@@ -68,7 +68,7 @@ import { computed, onMounted, reactive, ref, watch } from "vue";
import { RouterLink, useRoute, useRouter } from "vue-router";
import Icon from "../components/Icon.vue";
import { combineTeamSpeakTarget, splitTeamSpeakTarget } from "../services/teamspeak-target.js";
-import { applyTheme, getStoredTheme, nextTheme, saveTheme, type ThemeMode } from "../services/theme.js";
+import { applyTheme, getStoredTheme, isDarkTheme, nextTheme, saveTheme, type ThemeMode } from "../services/theme.js";
type Language = "zh" | "en";
type Screen = "login" | "change-password" | "admin";
@@ -79,7 +79,8 @@ const route = useRoute();
const router = useRouter();
const language = ref((localStorage.getItem("webspeak:language") as Language) || "zh");
const themeMode = ref(getStoredTheme());
-const themeLabel = computed(() => themeMode.value === "dark" ? tr("themeDark") : themeMode.value === "light" ? tr("themeLight") : tr("themeSystem"));
+const themeIcon = computed(() => isDarkTheme(themeMode.value) ? "sun" : "moon");
+const themeLabel = computed(() => isDarkTheme(themeMode.value) ? tr("switchToLightTheme") : tr("switchToDarkTheme"));
applyTheme(themeMode.value);
const loading = ref(true);
const screen = ref("login");
@@ -122,6 +123,8 @@ const copy = {
themeSystem: "跟随系统",
themeLight: "浅色主题",
themeDark: "深色主题",
+ switchToLightTheme: "切换到浅色主题",
+ switchToDarkTheme: "切换到深色主题",
welcomeAdmin: "欢迎回来",
loginLead: "输入管理员账号和密码以管理此 WebSpeak 实例。",
adminPassword: "管理员密码",
@@ -277,6 +280,8 @@ const copy = {
themeSystem: "System theme",
themeLight: "Light theme",
themeDark: "Dark theme",
+ switchToLightTheme: "Switch to light theme",
+ switchToDarkTheme: "Switch to dark theme",
welcomeAdmin: "Welcome back",
loginLead: "Enter the admin account and password to manage this WebSpeak instance.",
adminPassword: "Admin password",
@@ -467,6 +472,7 @@ async function parseResponse(response: Response) { const value = await response.