fix(protocols): 修复第三方协议授权码密码验证后解密展示并优化交互提示

This commit is contained in:
xuans committed 2026-09-13 04:24:19 +08:00
1 parent 231fe05fe0
commit b107090168
4 files changed
+31 -5

No files matched your search

@@ -221,7 +221,12 @@ export function usePage() {
Object.assign(revealedCodes, codes)
codesRevealed.value = true
closeVerifyDialog()
notify('安全验证通过,授权码已解密显示', 'success')
const count = Object.keys(codes).length
if (count > 0) {
notify(`安全验证通过,已解密显示 ${count} 个协议授权码`, 'success')
} else {
notify('安全验证通过,当前授权码未保留加密密文,可点击重新生成', 'warning')
}
} catch (error) {
notify(error?.message || '验证失败,请检查密码是否正确')
} finally {
@@ -70,6 +70,18 @@
复制
</el-button>
</template>
<template v-else-if="codesRevealed && !revealedCodes[item.protocol]">
<span class="unconfigured-tip">旧版授权码未保留密文,请点击重新生成</span>
<el-button
type="primary"
link
size="small"
class="copy-btn"
@click="generateProtocolCode(item)"
>
重新生成
</el-button>
</template>
<template v-else>
<span class="masked-code">••••••••••••••••</span>
<el-button