From c6eeb49f44a719e7e805be6e73cd936c95bd7d62 Mon Sep 17 00:00:00 2001 From: illusia <64828020+EchoSixHIYA@users.noreply.github.com> Date: Mon, 12 Oct 2026 11:37:53 +0800 Subject: [PATCH] fix: unify KAAK password dialog confirm labels --- docs/KAAK-CLONE-WORKLOG.zh-CN.md | 6 ++++++ web/src/components/web-client/ChannelPasswordDialog.vue | 4 ++-- web/src/components/web-client/ServerPasswordDialog.vue | 4 ++-- web/src/i18n/web-client.ts | 3 +++ web/src/views/WebClient.vue | 4 +++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/KAAK-CLONE-WORKLOG.zh-CN.md b/docs/KAAK-CLONE-WORKLOG.zh-CN.md index 1f16a00..c26abde 100644 --- a/docs/KAAK-CLONE-WORKLOG.zh-CN.md +++ b/docs/KAAK-CLONE-WORKLOG.zh-CN.md @@ -628,3 +628,9 @@ - 用户要求服务器密码和频道密码都按截图改成 KAAK 深色紧凑弹窗。 - 两个宿主对话框增加稳定的 `auth.password.*` 皮肤钩子;KAAK 包负责尺寸、深色表面、字段、按钮与移动视口样式。KAAK 连接表单中的服务器密码字段也使用同款深色输入外观。密码输入、错误文案、关闭、取消、提交和服务器重试仍使用原宿主逻辑,其他皮肤不变。KAAK 升至 3.1.78。 - 验证:重建示例和内置 KAAK 包;皮肤包与布局钩子测试通过,`npm run verify` 通过(696/696 测试、服务端构建、前端类型检查和 Vite 生产构建),`git diff --check` 通过。3040 健康接口、入口页、WebClient JS/CSS 和新版 KAAK 包均返回 HTTP 200;皮肤包大小与构建产物一致。 + +## 本轮密码弹窗按钮文案统一(2026-10-12) + +- 用户反馈:KAAK 皮肤中服务器密码和频道密码弹窗的绿色确认按钮文字换行难看,要求统一为“确定”。 +- 修改范围:KAAK 下两个密码弹窗的主按钮统一显示“确定”,其他皮肤继续使用原有本地化文案;服务器重试、频道提交、取消和错误状态逻辑保持不变。 +- 验证与部署:`npm run verify` 通过(696/696 测试、服务端构建、前端类型检查与 Vite 生产构建);3040 健康接口与首页返回 200,生产 WebClient JS 返回 200,大小与本地构建一致(440,272 字节),并包含“确定”文案。静态构建已供 3040 使用,无需重启服务。 diff --git a/web/src/components/web-client/ChannelPasswordDialog.vue b/web/src/components/web-client/ChannelPasswordDialog.vue index 0a17f4b..4ff457b 100644 --- a/web/src/components/web-client/ChannelPasswordDialog.vue +++ b/web/src/components/web-client/ChannelPasswordDialog.vue @@ -81,7 +81,7 @@ v-if="busy" class="button-spinner" >{{ t("channelPasswordSubmit") }}{{ submitLabel ?? t("channelPasswordSubmit") }} string }>(); +defineProps<{ busy: boolean; error: string; submitLabel?: string; t: (key: string) => string }>(); const password = defineModel({ required: true }); const emit = defineEmits<{ cancel: []; submit: [] }>(); const dialog = ref(null); diff --git a/web/src/components/web-client/ServerPasswordDialog.vue b/web/src/components/web-client/ServerPasswordDialog.vue index fe41390..d70d90d 100644 --- a/web/src/components/web-client/ServerPasswordDialog.vue +++ b/web/src/components/web-client/ServerPasswordDialog.vue @@ -73,7 +73,7 @@ type="submit" class="primary-button channel-password-submit" :disabled="!password" - >{{ t("serverPasswordRetry") }}{{ submitLabel ?? t("serverPasswordRetry") }} string }>(); +defineProps<{ errorCode: string; submitLabel?: string; t: (key: string) => string }>(); const password = defineModel({ required: true }); const emit = defineEmits<{ cancel: []; submit: [] }>(); const dialog = ref(null); diff --git a/web/src/i18n/web-client.ts b/web/src/i18n/web-client.ts index 3b7b28e..c680b43 100644 --- a/web/src/i18n/web-client.ts +++ b/web/src/i18n/web-client.ts @@ -176,6 +176,7 @@ export const webClientTranslations: Record> = { serverPasswordRequiredLead: "该服务器需要密码,输入密码后重试。", serverPasswordInvalidLead: "服务器密码不正确,请重新输入后重试。", serverPasswordRetry: "输入密码并重试", + passwordDialogConfirm: "确定", serverPasswordRetryPlaceholder: "请输入服务器密码", switchChannel: "切换频道", searchChannels: "搜索频道", @@ -586,6 +587,7 @@ export const webClientTranslations: Record> = { serverPasswordRequiredLead: "This TeamSpeak server requires a password. Enter it and try again.", serverPasswordInvalidLead: "The server password was rejected. Enter it again and retry.", serverPasswordRetry: "Enter password and retry", + passwordDialogConfirm: "Confirm", serverPasswordRetryPlaceholder: "Enter the server password", switchChannel: "Switch channel", searchChannels: "Search channels", @@ -990,6 +992,7 @@ webClientTranslations.de = { serverPasswordRequiredLead: "Dieser TeamSpeak-Server benötigt ein Passwort. Gib es ein und versuche es erneut.", serverPasswordInvalidLead: "Das Serverpasswort wurde abgelehnt. Gib es erneut ein und versuche es noch einmal.", serverPasswordRetry: "Passwort eingeben und erneut versuchen", + passwordDialogConfirm: "Bestätigen", serverPasswordRetryPlaceholder: "Serverpasswort eingeben", switchChannel: "Kanal wechseln", searchChannels: "Kanäle suchen", diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index 96bffa8..25d76d8 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -919,6 +919,7 @@ v-model="channelPasswordDialog.password" :busy="channelPasswordDialog.submitting" :error="channelPasswordDialog.error" + :submit-label="activeSkin?.id === BUILTIN_KAAK_SKIN_ID ? t('passwordDialogConfirm') : undefined" :t="t" @cancel="cancelChannelPassword" @submit="submitChannelPassword" @@ -929,6 +930,7 @@ v-if="serverPasswordDialog.open" v-model="serverPasswordDialog.password" :error-code="serverPasswordDialog.errorCode" + :submit-label="activeSkin?.id === BUILTIN_KAAK_SKIN_ID ? t('passwordDialogConfirm') : undefined" :t="t" @cancel="cancelFavoriteServerPassword" @submit="submitServerPassword" @@ -1018,7 +1020,7 @@ import { getInitialLanguage, type Language } from "../i18n/web-client.js"; import { clearLocalData as clearStoredLocalData, isLocalPersistenceAvailable, loadLocalPreferences, loadStoredIdentity, removeStoredIdentity, saveLocalPreferences, saveStoredIdentity, type FavoriteServer } from "../services/local-persistence.js"; import { isQuickServerAddressLabel, type QuickServer } from "../services/quick-servers.js"; import type { InstalledSkin, SkinHomeCopy } from "../services/skin-pack.js"; -import { isPublicSkinEnabled } from "../services/skin-catalog.js"; +import { BUILTIN_KAAK_SKIN_ID, isPublicSkinEnabled } from "../services/skin-catalog.js"; import { BUILTIN_DARK_SKIN, BUILTIN_LIGHT_SKIN } from "../services/skin-runtime.js"; import { applyTheme, getStoredTheme, type ThemeMode } from "../services/theme.js"; import { createScreenWakeLockController, getScreenWakeLockApi, type ScreenWakeLockController, type ScreenWakeLockSnapshot } from "../services/screen-wake-lock.js";