display client info and unlock errors to user
This commit is contained in:
@ -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}" />
|
||||
|
Reference in New Issue
Block a user