From 710659350d8ade057cb406ed24a757a20f6cad0a Mon Sep 17 00:00:00 2001 From: Odboy Date: Mon, 23 Feb 2026 21:06:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20Token=20=E5=88=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8E=A9=E7=A0=81=E5=B9=B6=E6=94=AF=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Token 列显示前4位+****+后4位掩码格式 - 添加复制按钮,点击复制完整 Token 到剪贴板 - 列宽从 120 调整为 200 以容纳掩码和按钮 --- go-client/example/main.go | 9 +++++---- web/src/views/app/AppList.vue | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/go-client/example/main.go b/go-client/example/main.go index fa6d6d3..40c1b22 100644 --- a/go-client/example/main.go +++ b/go-client/example/main.go @@ -12,10 +12,11 @@ import ( func main() { // create config cfg := &client.Config{ - BaseURL: "http://localhost:8080", - AppName: "kenaito-springboot-demo", - Env: "daily", - Version: "latest", + BaseURL: "http://localhost:8080", + AppName: "kenaito-springboot-demo", + Env: "daily", + Version: "latest", + //Token: "6f6966fe196572954b176c0e2a97bc399b050c6be31454b8d6b0f7f622b5d6f1", SyncInterval: 30, // sync every 30 seconds CacheDir: ".", } diff --git a/web/src/views/app/AppList.vue b/web/src/views/app/AppList.vue index bd48ebc..4dae291 100644 --- a/web/src/views/app/AppList.vue +++ b/web/src/views/app/AppList.vue @@ -10,9 +10,12 @@ - + @@ -177,6 +180,17 @@ export default { handlePageChange(page) { this.query.pageNo = page this.loadData() + }, + maskToken(token) { + if (!token || token.length <= 8) return '****' + return token.substring(0, 4) + '****' + token.substring(token.length - 4) + }, + copyToken(token) { + navigator.clipboard.writeText(token).then(() => { + this.$message.success('Token 已复制到剪贴板') + }).catch(() => { + this.$message.error('复制失败') + }) } } }