aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/WalletPass.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-24 20:12:43 -0700
committerAdam Soltys <[email protected]>2024-09-24 20:12:43 -0700
commitd49d4119811dee9270f0858f3f03e5d8cd0d95ba (patch)
tree42101a3ccf47f7b7290637700b90a843476e56f7 /src/components/WalletPass.svelte
parent20c0c52f8b850bfbab490735b0b5cd5d08851488 (diff)
parent9531ccbdf01b07c392b1b5cb6d8ad4680ee29d2c (diff)
downloadcoinos-ui-d49d4119811dee9270f0858f3f03e5d8cd0d95ba.tar.gz
coinos-ui-d49d4119811dee9270f0858f3f03e5d8cd0d95ba.zip
Merge branch 'self-custody'
Diffstat (limited to 'src/components/WalletPass.svelte')
-rw-r--r--src/components/WalletPass.svelte65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/components/WalletPass.svelte b/src/components/WalletPass.svelte
new file mode 100644
index 00000000..75c94f34
--- /dev/null
+++ b/src/components/WalletPass.svelte
@@ -0,0 +1,65 @@
+<script>
+ import { focus } from "$lib/utils";
+ import { t } from "$lib/translations";
+ import Icon from "$comp/Icon.svelte";
+ export let cancel, password, submit;
+ let revealPassword;
+</script>
+
+<div
+ class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-20"
+>
+ <div
+ class="relative top-1/3 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white space-y-5"
+ >
+ <h1 class="text-center text-2xl font-semibold">
+ {$t("payments.enterWalletPass")}
+ </h1>
+ <form on:submit|preventDefault={submit}>
+ <div class="relative mb-5">
+ {#if revealPassword}
+ <input
+ name="password"
+ type="text"
+ required
+ bind:value={password}
+ autocapitalize="none"
+ use:focus
+ />
+ {:else}
+ <input
+ name="password"
+ type="password"
+ required
+ bind:value={password}
+ autocapitalize="none"
+ use:focus
+ />
+ {/if}
+ <button
+ type="button"
+ on:click={() => (revealPassword = !revealPassword)}
+ class="absolute right-5 top-1/2"
+ >
+ <Icon icon={revealPassword ? "eye" : "eye-off"} />
+ </button>
+ </div>
+ <div class="w-full flex justify-center gap-2">
+ <button
+ type="button"
+ class="border rounded-2xl font-semibold mx-auto py-5 px-6 hover:opacity-80 mx-auto grow"
+ on:click={cancel}
+ on:keydown={cancel}
+ >
+ <div class="my-auto">Cancel</div>
+ </button>
+ <button
+ type="submit"
+ class="border rounded-2xl font-semibold mx-auto py-5 px-6 hover:opacity-80 mx-auto grow"
+ >
+ <div class="my-auto">Submit</div>
+ </button>
+ </div>
+ </form>
+ </div>
+</div>