working basic flow
This commit is contained in:
@ -22,8 +22,16 @@
|
||||
function deny() {
|
||||
dispatch('navigate', {target: 'ShowDenied'});
|
||||
}
|
||||
|
||||
function handleHotkey(event) {
|
||||
if (event.shiftKey && (event.code === 'Enter' || event.code === 'NumpadEnter')) {
|
||||
approve();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={handleHotkey} />
|
||||
|
||||
<h2 class="text-3xl text-gray-200">An application would like to access your AWS credentials.</h2>
|
||||
|
||||
<button on:click={approve}>
|
||||
|
@ -12,6 +12,13 @@
|
||||
|
||||
try {
|
||||
await invoke('unlock', {passphrase});
|
||||
appState.credentialStatus = 'unlocked';
|
||||
if (appState.currentRequest) {
|
||||
dispatch('navigate', {target: 'ShowApproved'});
|
||||
}
|
||||
else {
|
||||
dispatch('navigate', {target: 'Home'});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.log('Unlock error:', e);
|
||||
|
Reference in New Issue
Block a user