fix(加密解密): 修正加密用户名处理逻辑
build.yaml / build (push) Successful in 42s

This commit is contained in:
xiaoqidun committed 2026-09-30 01:55:44 +08:00
1 parent 4de22f9be7
commit 418a2fa0a7
4 files changed
+5 -14

No files matched your search

+1 -2
View File
@@ -4463,8 +4463,7 @@ function updateEncryptionType() {
el.encryptionCertificatesRow.hidden = !certificates;
el.encryptionPassword.required = el.encryptionConfirm.required = password;
el.encryptionCertificates.required = certificates;
const user = mode === "password" && encryptionMode() === mode ? state.doc.encryption.users?.[0] || "" : "";
el.encryptionUser.value = user === "User" ? "" : user;
el.encryptionUser.value = mode === "password" && encryptionMode() === mode ? state.doc.encryption.users?.[0] || "" : "";
el.encryptionPassword.value = el.encryptionConfirm.value = "";
el.encryptionCertificates.value = "";
el.encryptionStatus.textContent = mode === "keep" && state.doc?.encryption?.policyRequired ? "请重新选择加密方式" : "";