aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/account/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/account/import')
-rw-r--r--src/routes/(app)/account/import/+page.svelte43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/routes/(app)/account/import/+page.svelte b/src/routes/(app)/account/import/+page.svelte
index 866c1b1a..a1d6549b 100644
--- a/src/routes/(app)/account/import/+page.svelte
+++ b/src/routes/(app)/account/import/+page.svelte
@@ -1,7 +1,7 @@
<script>
import { goto } from "$app/navigation";
import { mnemonic } from "$lib/store";
- import { versions } from "$lib/utils";
+ import { fail, focus, versions } from "$lib/utils";
import { t } from "$lib/translations";
import { browser } from "$app/environment";
import Icon from "$comp/Icon.svelte";
@@ -16,6 +16,7 @@
};
let submit = () => {
+ text = text.replace(/,/g, " ").trim();
let valid = validateMnemonic(text, wordlist);
if (valid) {
$mnemonic = text;
@@ -29,28 +30,26 @@
</script>
<div class="space-y-5">
- <h1 class="text-center text-3xl font-semibold">Import</h1>
+ <h1 class="text-center text-3xl font-semibold">{$t("accounts.import")}</h1>
<div class="container w-full mx-auto text-lg px-4 max-w-xl space-y-2">
- <div class="space-y-5">
- <form on:submit|preventDefault={submit}>
- <textarea
- use:focus
- name="text"
- placeholder="Enter a seed phrase"
- class="w-full p-4 border rounded-xl h-48 text-xl"
- bind:value={text}
- autocapitalize="none"
- />
- <button
- bind:this={el}
- type="submit"
- class="flex bg-black text-white border rounded-2xl px-6 py-5 w-full font-bold gap-2 justify-center"
- >
- <Icon icon="send" style="w-8 my-auto invert" />
- <div class="my-auto">{$t("user.send.next")}</div>
- </button>
- </form>
- </div>
+ <form on:submit|preventDefault={submit} class="space-y-2">
+ <textarea
+ use:focus
+ name="text"
+ placeholder={$t("accounts.enterSeed")}
+ class="w-full p-4 border rounded-xl h-48 text-xl"
+ bind:value={text}
+ autocapitalize="none"
+ />
+ <button
+ bind:this={el}
+ type="submit"
+ class="flex bg-black text-white border rounded-2xl px-6 py-5 w-full font-bold gap-2 justify-center"
+ >
+ <Icon icon="send" style="w-8 my-auto invert" />
+ <div class="my-auto">{$t("user.send.next")}</div>
+ </button>
+ </form>
</div>
</div>