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 @@
-
+
- 已设置
+
+ {{ maskToken(scope.row.token) }}
+ 复制
+
未设置
@@ -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('复制失败')
+ })
}
}
}