fix: use app.messages.confirm instead of native confirm() in vault Shared tab
The no_native_dialogs regression test forbids native alert/confirm/prompt in views (they block browser events). Replace the native confirm() in deleteShared with app.messages.confirm().
This commit is contained in:
@@ -543,7 +543,8 @@ curl "$VAULT_ADDR/v1/secret/data/apps/<span id="app-name-display"></span>/conf"
|
||||
}
|
||||
|
||||
async function deleteShared(id) {
|
||||
if (!confirm('Delete this shared secret? Grantees will immediately lose access.')) return;
|
||||
const confirmed = await app.messages.confirm('Delete this shared secret? Grantees will immediately lose access.', $('#shared-mine-list'), 'warning');
|
||||
if (!confirmed) return;
|
||||
try { await sharedApi('/' + id, 'DELETE'); await loadShared(); }
|
||||
catch (e) { app.messages.toast('Error deleting: ' + e.message, 'danger'); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user