diff --git a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue index 24bb7cc6c..8ba749f07 100644 --- a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue @@ -39,7 +39,7 @@ - + {{scope.row[item.prop]?scope.row[item.prop].name:'-'}} - + {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}} {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}} + + + {{scope.row[item.prop].replace(/(?<=.{8})./g, '*')}} + + + {{scope.row[item.prop]}} - @@ -133,12 +139,14 @@ export default { }, { label: this.$t('apiKey.key'), prop: 'token', - show: true - }, { - label: this.$t('profile.role'), - prop: 'role', - show: true - }, { + show: false + }, + // { + // label: this.$t('profile.role'), + // prop: 'role', + // show: true + // }, + { label: this.$t('config.system.apiKey.expireAt'), prop: 'expireAt', show: true @@ -203,7 +211,6 @@ export default { } }, mounted () { - } } diff --git a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue index 324cab568..66bce389b 100644 --- a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue @@ -40,7 +40,10 @@ {{scope.row[item.prop]?scope.row[item.prop]:'-'}} - {{scope.row[item.prop]?scope.row[item.prop]:'-'}} + + {{scope.row[item.prop]?scope.row[item.prop].replace(/(?<=.{8})./g, '*'):'-'}} + + {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}} @@ -106,7 +109,7 @@ export default { label: this.$t('asset.talon.token'), prop: 'token', minWidth: 180, - show: true + show: false }, { label: this.$t('config.system.apiKey.expireAt'), prop: 'expireAt',