working basic flow

This commit is contained in:
Joseph Montanaro
2022-12-19 15:26:44 -08:00
parent 10fd1d6028
commit 3d5cbedae1
11 changed files with 700 additions and 89 deletions

View File

@ -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}>

View File

@ -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);