04/26 Enhanced functionalities
This commit is contained in:
@@ -714,16 +714,21 @@ async function checkPendingSave() {
|
||||
$('save-name').focus();
|
||||
|
||||
// Wire buttons — use onclick so re-running checkPendingSave never double-binds.
|
||||
$('btn-save-yes').onclick = async () => {
|
||||
// Helper to dismiss the overlay, clear storage, and remove the toolbar badge.
|
||||
function _clearPendingSave() {
|
||||
$('save-prompt-overlay').classList.add('hidden');
|
||||
chrome.storage.local.remove('pending_save');
|
||||
chrome.runtime.sendMessage({ type: 'CLEAR_SAVE_BADGE' }).catch(() => {});
|
||||
}
|
||||
|
||||
$('btn-save-yes').onclick = async () => {
|
||||
console.log('[PassKeeper] User saved credential for', pending_save.siteName);
|
||||
await saveCredential(pending_save);
|
||||
await chrome.storage.local.remove('pending_save');
|
||||
_clearPendingSave();
|
||||
};
|
||||
$('btn-save-no').onclick = async () => {
|
||||
$('save-prompt-overlay').classList.add('hidden');
|
||||
$('btn-save-no').onclick = () => {
|
||||
console.log('[PassKeeper] User dismissed save prompt for', pending_save.siteName);
|
||||
await chrome.storage.local.remove('pending_save');
|
||||
_clearPendingSave();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user