diff --git a/packages/ui/certd-client/src/layout/layout-basic.vue b/packages/ui/certd-client/src/layout/layout-basic.vue index c38fd64d..d57cc4ea 100644 --- a/packages/ui/certd-client/src/layout/layout-basic.vue +++ b/packages/ui/certd-client/src/layout/layout-basic.vue @@ -9,96 +9,103 @@ import { useSettingStore } from "/@/store/settings"; import PageFooter from "./components/footer/index.vue"; import { useRouter } from "vue-router"; import MaxKBChat from "/@/components/ai/index.vue"; +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); const userStore = useUserStore(); const router = useRouter(); const menus = computed(() => [ - { - handler: () => { - router.push("/certd/mine/user-profile"); - }, - icon: "fa-solid:book", - text: "账号信息", - }, - { - handler: () => { - router.push("/certd/mine/security"); - }, - icon: "fluent:shield-keyhole-16-regular", - text: "认证安全设置", - }, + { + handler: () => { + router.push("/certd/mine/user-profile"); + }, + icon: "fa-solid:book", + text: t("certd.accountInfo"), + }, + { + handler: () => { + router.push("/certd/mine/security"); + }, + icon: "fluent:shield-keyhole-16-regular", + text: t("certd.securitySettings"), + }, ]); + const avatar = computed(() => { - const avt = userStore.getUserInfo?.avatar; - return avt ? `/api/basic/file/download?key=${avt}` : ""; + const avt = userStore.getUserInfo?.avatar; + return avt ? `/api/basic/file/download?key=${avt}` : ""; }); async function handleLogout() { - await userStore.logout(true); + await userStore.logout(true); } const settingStore = useSettingStore(); const sysPublic = computed(() => { - return settingStore.sysPublic; + return settingStore.sysPublic; }); const siteInfo = computed(() => { - return settingStore.siteInfo; + return settingStore.siteInfo; }); onErrorCaptured(e => { - console.error("ErrorCaptured:", e); - // notification.error({ message: e.message }); - //阻止错误向上传递 - return false; + console.error("ErrorCaptured:", e); + // notification.error({ message: e.message }); + //阻止错误向上传递 + return false; }); onMounted(async () => { - await settingStore.checkUrlBound(); + await settingStore.checkUrlBound(); }); function goGithub() { - window.open("https://github.com/certd/certd"); + window.open("https://github.com/certd/certd"); } const settingsStore = useSettingStore(); const chatBox = ref(); const openChat = (q: string) => { - chatBox.value.openChat({ q }); + chatBox.value.openChat({ q }); }; provide("fn:ai.open", openChat); diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts index b28cdb3c..09c62e3f 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts @@ -274,4 +274,19 @@ export default { required: "Please enter domains to import", placeholder: "www.baidu.com:443:Baidu\nwww.taobao.com::Taobao\nwww.google.com\n", }, + accountInfo: "Account Information", + securitySettings: "Security & Settings", + confirmDisable2FA: "Are you sure you want to disable two-factor authentication login?", + disabledSuccess: "Disabled successfully", + saveSuccess: "Saved successfully", + twoFactorAuth: "2FA Two-Factor Authentication Login", + rebind: "Rebind", + twoFactorAuthHelper: "Enable or disable two-factor authentication login", + bindDevice: "Bind Device", + step1: "1. Install any authenticator app, for example:", + tooltipGoogleServiceError: "If you get a Google service not found error, you can install KK Google Assistant", + step2: "2. Scan the QR code to add the account", + step3: "3. Enter the verification code", + inputVerifyCode: "Please enter the verification code", + cancel: "Cancel", }; diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts index c7a4a425..98d61d31 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts @@ -280,4 +280,19 @@ export default { required: "请输入要导入的域名", placeholder: "www.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com\n", }, + accountInfo: "账号信息", + securitySettings: "认证安全设置", + confirmDisable2FA: "确定要关闭多重验证登录吗?", + disabledSuccess: "关闭成功", + saveSuccess: "保存成功", + twoFactorAuth: "2FA多重验证登录", + rebind: "重新绑定", + twoFactorAuthHelper: "是否开启多重验证登录", + bindDevice: "绑定设备", + step1: "1. 安装任意一款支持Authenticator的验证APP,比如:", + tooltipGoogleServiceError: "如果报没有找到谷歌服务的错误,您可以安装KK谷歌助手", + step2: "2. 扫描二维码添加账号", + step3: "3. 输入验证码", + inputVerifyCode: "请输入验证码", + cancel: "取消", }; diff --git a/packages/ui/certd-client/src/views/certd/mine/security/index.vue b/packages/ui/certd-client/src/views/certd/mine/security/index.vue index 0a4ccf6a..0e0ff348 100644 --- a/packages/ui/certd-client/src/views/certd/mine/security/index.vue +++ b/packages/ui/certd-client/src/views/certd/mine/security/index.vue @@ -1,73 +1,82 @@