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 5d3000a48f
commit 2c5c21f212
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.",
} {