switch to invokes instead of emits
This commit is contained in:
@ -7,11 +7,15 @@
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
async function approve() {
|
||||
if (appState.credentialStatus === 'unlocked') {
|
||||
let status = await invoke('get-session-status');
|
||||
if (status === 'unlocked') {
|
||||
dispatch('navigate', {target: 'ShowApproved'});
|
||||
}
|
||||
else if (status === 'locked') {
|
||||
dispatch('navigate', {target: 'Unlock'})
|
||||
}
|
||||
else {
|
||||
dispatch('navigate', {target: 'Unlock'});
|
||||
dispatch('navigate', {target: 'EnterCredentials'});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user