display client info and unlock errors to user

This commit is contained in:
Joseph Montanaro
2022-12-21 13:42:12 -08:00
parent 69475604c0
commit 50f0985f4f
8 changed files with 95 additions and 27 deletions

View File

@ -6,6 +6,7 @@
const dispatch = createEventDispatcher();
let error = null;
let passphrase = '';
async function unlock() {
console.log('invoking unlock command.')
@ -21,11 +22,14 @@
}
}
catch (e) {
console.log('Unlock error:', e);
error = e;
}
}
</script>
{#if error}
<div class="text-red-400">{error}</div>
{/if}
<form action="#" on:submit|preventDefault="{unlock}">
<div class="text-gray-200">Enter your passphrase:</div>
<input autofocus class="text-gray-200 bg-zinc-800" type="password" placeholder="correct horse battery staple" bind:value="{passphrase}" />