diff --git a/ng-app/src/lib/Login.svelte b/ng-app/src/lib/Login.svelte index 5eb2022..d861563 100644 --- a/ng-app/src/lib/Login.svelte +++ b/ng-app/src/lib/Login.svelte @@ -28,6 +28,7 @@ Key, CheckCircle, } from "svelte-heros-v2"; + import PasswordInput from "./components/PasswordInput.svelte"; //import Worker from "../worker.js?worker&inline"; export let wallet; export let for_import = false; @@ -88,10 +89,12 @@ let pazzlePage = 0; + /** The selected emojis by category (one for each pazzle page). First will be the selected of first pazzle page. */ let selection = [].fill(null, 0, pazzle_length); let pin_code = []; + /** The selected order from the order page. */ let ordered = []; let shuffle_pin; @@ -244,7 +247,7 @@ async function select_order(val) { ordered.push(val); val.sel = ordered.length; - console.debug("ordered", ordered); + selection = selection; if (ordered.length == pazzle_length - 1) { let last = selection.find((emoji) => !emoji.sel); @@ -257,7 +260,9 @@ } function go_back() { - if (step === "pazzle") { + if (step === "mnemonic") { + init(); + } else if (step === "pazzle") { // Go to previous pazzle or init page, if on first pazzle. if (pazzlePage === 0) { init(); @@ -274,7 +279,9 @@ selection = selection; } } else if (step === "pin") { - if (pin_code.length === 0) { + if (unlockWith === "mnemonic") { + start_with_mnemonic(); + } else if (pin_code.length === 0) { // Unselect the last two elements. const to_unselect = ordered.slice(-2); to_unselect.forEach((val) => { @@ -443,43 +450,21 @@ class:max-w-[600px]={!mobile} >
- - - Select your emoji of category: {emoji_cat[ - shuffle.category_indices[pazzlePage] - ]} -
- {#each [0, 1, 2, 3, 4] as row} -+ + + Select your emoji of category: {emoji_cat[ + shuffle.category_indices[pazzlePage] + ]} +
+ {#each [0, 1, 2, 3, 4] as row} +Click your emojis in the correct order @@ -538,8 +547,9 @@ >{#each pin_code as pin_key}*{/each}
+ {#each [0, 1, 2] as row} -