feat(panel): detect import encryption from file extension, not a checkbox

The import form used to ask users to tick "the file is encrypted" before
showing the password field, even though the server already decides purely
from the envelope magic bytes. Reveal the password field automatically for
a .spde file (hide it for .json) so the checkbox is no longer needed.
This commit is contained in:
2026-08-07 04:30:24 +03:00
parent c0c66dfcdb
commit 9745edd132
4 changed files with 45 additions and 14 deletions
+1
View File
@@ -117,6 +117,7 @@ func TestBackupPageOffersEncryption(t *testing.T) {
for _, want := range []string{
`name="encrypt"`, `name="password"`, `name="password_confirm"`,
`name="import_password"`, "data-encrypt-toggle", "data-encrypt-fields",
"data-import-password-fields",
fmt.Sprintf("at least %d characters", minSecretFilePasswordLen),
"The two passwords do not match.",
} {