mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-11 07:12:36 +00:00
uploads: locked-storage file picks unlock inline instead of dead-ending (#56)
All three paths (upload video pick, upload thumbnail pick, edit "Replace file") now route through the shared signer gate — silent kept-unlocked restore, else ONE passphrase prompt — then unlock storage and continue the same pick. Cancel/bad-passphrase abort quietly; a refused thumbnail pick restores the picker. Unlock glue extracted to uploadModalStorageUnlock.js (file-size budget); ensureSigner threaded via initUploadModal/initEditModal. Tests: tests/upload-edit-storage-unlock-gate.test.mjs (12). Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
7ead34378e
commit
e32298cc89
7 files changed
+496
-43
No files matched your search
@@ -61,6 +61,12 @@ export function initUploadModal({
|
||||
app.profileController.show("storage");
|
||||
}
|
||||
},
|
||||
// Shared signer gate (#56): restores a kept-unlocked key silently or shows
|
||||
// one passphrase prompt so the file pickers can unlock storage inline.
|
||||
ensureSigner: (options) =>
|
||||
typeof app?.ensureEncryptionCapableSigner === "function"
|
||||
? app.ensureEncryptionCapableSigner(options)
|
||||
: null,
|
||||
// Open the login modal's unlock-saved-key (passphrase) flow when a persisted
|
||||
// nsec session is locked after a reload.
|
||||
onRequestUnlock: () => {
|
||||
|
||||
Reference in new issue
Block a user