return to Approve screen after cancelling unlock during request approval
This commit is contained in:
@ -22,7 +22,7 @@ listen('credentials-request', (tauriEvent) => {
|
||||
listen('request-cancelled', (tauriEvent) => {
|
||||
const id = tauriEvent.payload;
|
||||
if (id === $appState.currentRequest?.id) {
|
||||
cleanupRequest()
|
||||
cleanupRequest();
|
||||
}
|
||||
else {
|
||||
const found = $appState.pendingRequests.find_remove(r => r.id === id);
|
||||
|
@ -43,13 +43,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function approve_base() {
|
||||
approve(true);
|
||||
}
|
||||
function approve_session() {
|
||||
approve(false);
|
||||
}
|
||||
|
||||
// Denial has only one
|
||||
async function deny() {
|
||||
$appState.currentRequest.response = {approval: 'Denied', base: false};
|
||||
|
@ -55,7 +55,14 @@
|
||||
|
||||
function cancel() {
|
||||
emit('credentials-event', 'unlock-canceled');
|
||||
navigate('Home');
|
||||
if ($appState.currentRequest !== null) {
|
||||
// dirty hack to prevent spurious error when returning to approve screen
|
||||
delete $appState.currentRequest.response;
|
||||
navigate('Approve');
|
||||
}
|
||||
else {
|
||||
navigate('Home');
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
Reference in New Issue
Block a user