diff options
author | Ian Coleman <ian@iancoleman.io> | 2020-10-18 23:17:24 +0000 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2020-10-18 23:17:24 +0000 |
commit | d31a0ad44bf276cde1bdd64eacab2470e4577ab1 (patch) | |
tree | 83dcb0ef4b557fa88745f21558aca1de1ef0b9e9 /src/js | |
parent | 4566751b89d40f20aea29a2b0a59a3060dd2f324 (diff) | |
download | BIP39-d31a0ad44bf276cde1bdd64eacab2470e4577ab1.tar.gz BIP39-d31a0ad44bf276cde1bdd64eacab2470e4577ab1.tar.zst BIP39-d31a0ad44bf276cde1bdd64eacab2470e4577ab1.zip |
Hide/show split mnemonic cards
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/index.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js index cb60941..7e67327 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -47,6 +47,8 @@ | |||
47 | DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning"); | 47 | DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning"); |
48 | DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); | 48 | DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); |
49 | DOM.phrase = $(".phrase"); | 49 | DOM.phrase = $(".phrase"); |
50 | DOM.splitMnemonic = $(".splitMnemonic"); | ||
51 | DOM.showSplitMnemonic = $(".showSplitMnemonic"); | ||
50 | DOM.phraseSplit = $(".phraseSplit"); | 52 | DOM.phraseSplit = $(".phraseSplit"); |
51 | DOM.phraseSplitWarn = $(".phraseSplitWarn"); | 53 | DOM.phraseSplitWarn = $(".phraseSplitWarn"); |
52 | DOM.passphrase = $(".passphrase"); | 54 | DOM.passphrase = $(".passphrase"); |
@@ -133,6 +135,7 @@ | |||
133 | DOM.entropyMnemonicLength.on("change", entropyChanged); | 135 | DOM.entropyMnemonicLength.on("change", entropyChanged); |
134 | DOM.entropyTypeInputs.on("change", entropyTypeChanged); | 136 | DOM.entropyTypeInputs.on("change", entropyTypeChanged); |
135 | DOM.phrase.on("input", delayedPhraseChanged); | 137 | DOM.phrase.on("input", delayedPhraseChanged); |
138 | DOM.showSplitMnemonic.on("change", toggleSplitMnemonic); | ||
136 | DOM.passphrase.on("input", delayedPhraseChanged); | 139 | DOM.passphrase.on("input", delayedPhraseChanged); |
137 | DOM.generate.on("click", generateClicked); | 140 | DOM.generate.on("click", generateClicked); |
138 | DOM.more.on("click", showMore); | 141 | DOM.more.on("click", showMore); |
@@ -428,6 +431,15 @@ | |||
428 | phraseChanged(); | 431 | phraseChanged(); |
429 | } | 432 | } |
430 | 433 | ||
434 | function toggleSplitMnemonic() { | ||
435 | if (DOM.showSplitMnemonic.prop("checked")) { | ||
436 | DOM.splitMnemonic.removeClass("hidden"); | ||
437 | } | ||
438 | else { | ||
439 | DOM.splitMnemonic.addClass("hidden"); | ||
440 | } | ||
441 | } | ||
442 | |||
431 | function calcForDerivationPath() { | 443 | function calcForDerivationPath() { |
432 | clearDerivedKeys(); | 444 | clearDerivedKeys(); |
433 | clearAddressesList(); | 445 | clearAddressesList(); |