From 08fa5293483321af1590b40608424ef30ae319af Mon Sep 17 00:00:00 2001 From: Wang Defa <1+wangdefa@noreply.gitea.bcde.io> Date: Tue, 14 Jul 2026 11:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=80=81=E3=80=81=E6=97=A5=E5=BF=97=E5=8A=A8=E4=BD=9C=E8=A1=A5?= =?UTF-8?q?=E9=BD=90=E4=B8=8E=E7=BB=91=E5=AE=9A=E6=8C=89=E9=92=AE=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 11 +++++++++ .../settings/AccountSecurityCard.vue | 8 ++++++- src/composables/useActionLabel.ts | 24 +++++++++++++++++++ src/views/LoginView.vue | 12 +++++++++- 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab3d790..3320c6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ 格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/)(版本段不记日期),版本号遵循语义化版本。 +## [0.5.1] + +### Changed + +- 设置 · 账号安全绑定入口:已绑定的登录方式按钮置禁用态并显示「已绑定」,解绑后自动恢复可点 + +### Fixed + +- 修复禁用密码登录后登录页闪烁:登录方式加载完成前显示加载态,不再先渲染密码表单再切换,同时消除了闪烁窗口内误提交密码触发 403「密码登录已禁用」日志的问题 +- 系统日志「动作」列补齐 26 条缺失描述(退出登录、外部身份登录 / 绑定、修改登录凭据、AI 密钥 / 渠道 / 黑名单 / 网关设置、通知渠道 / 模板、代理导入 / 探测 / 关联租户等) + ## [0.5.0] ### Added diff --git a/src/components/settings/AccountSecurityCard.vue b/src/components/settings/AccountSecurityCard.vue index bc9de4c..096e730 100644 --- a/src/components/settings/AccountSecurityCard.vue +++ b/src/components/settings/AccountSecurityCard.vue @@ -204,6 +204,11 @@ const bindableProviders = computed(() => { return out }) +/** 已绑定的 provider 集合;绑定入口按钮据此禁用,解绑后自动恢复 */ +const boundProviders = computed( + () => new Set((identities.data.value?.items ?? []).map((it) => it.provider)), +) + async function bindProvider(provider: string) { binding.value = provider try { @@ -507,9 +512,10 @@ async function deleteProvider(p: ProviderType) { :key="p" size="small" :loading="binding === p" + :disabled="boundProviders.has(p)" @click="bindProvider(p)" > - 绑定 {{ displayNameOf(p) }} + {{ boundProviders.has(p) ? '已绑定' : '绑定' }} {{ displayNameOf(p) }} 将跳转到对应平台授权 diff --git a/src/composables/useActionLabel.ts b/src/composables/useActionLabel.ts index 7ae95b3..d84ee6c 100644 --- a/src/composables/useActionLabel.ts +++ b/src/composables/useActionLabel.ts @@ -4,6 +4,11 @@ */ const exact: Record = { 'POST /api/v1/auth/login': '登录面板', + 'POST /api/v1/auth/logout': '退出登录', + 'GET /api/v1/auth/oauth/:provider/callback': '外部身份登录 / 绑定', + 'PUT /api/v1/auth/credentials': '修改登录凭据', + 'PUT /api/v1/auth/password-login': '切换密码登录开关', + 'POST /api/v1/auth/revoke-sessions': '撤销全部会话', 'POST /api/v1/auth/totp/setup': '发起两步验证绑定', 'POST /api/v1/auth/totp/activate': '启用两步验证', 'POST /api/v1/auth/totp/disable': '停用两步验证', @@ -42,6 +47,25 @@ const exact: Record = { 'DELETE /api/v1/tasks/:id': '删除后台任务', 'POST /api/v1/tasks/:id/run': '手动执行任务', 'POST /api/v1/webhooks/oci-logs/:secret': '回传消息投递', + 'POST /api/v1/ai-keys': '创建网关密钥', + 'PUT /api/v1/ai-keys/:id': '修改网关密钥', + 'DELETE /api/v1/ai-keys/:id': '删除网关密钥', + 'PUT /api/v1/ai-keys/:id/content-log': '设置密钥内容留痕', + 'POST /api/v1/ai-channels': '创建网关渠道', + 'PUT /api/v1/ai-channels/:id': '修改网关渠道', + 'DELETE /api/v1/ai-channels/:id': '删除网关渠道', + 'POST /api/v1/ai-channels/:id/probe': '探测网关渠道', + 'POST /api/v1/ai-channels/:id/sync-models': '同步渠道模型', + 'POST /api/v1/ai-blacklist': '拉黑模型', + 'DELETE /api/v1/ai-blacklist/:id': '移出模型黑名单', + 'PUT /api/v1/ai-settings': '保存网关设置', + 'PUT /api/v1/settings/notify-channels/:type': '保存通知渠道配置', + 'POST /api/v1/settings/notify-channels/:type/test': '发送通知测试消息', + 'PUT /api/v1/settings/notify-templates/:kind': '保存通知模板', + 'POST /api/v1/settings/notify-templates/:kind/test': '发送模板测试消息', + 'POST /api/v1/proxies/import': '批量导入代理', + 'POST /api/v1/proxies/:id/probe': '探测代理', + 'PUT /api/v1/proxies/:id/tenants': '设置代理关联租户', } /** 资源段兜底词典:精确表未命中时以「动词 + 资源」组合 */ diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue index 6417319..e24684e 100644 --- a/src/views/LoginView.vue +++ b/src/views/LoginView.vue @@ -1,5 +1,5 @@