From d31a0ad44bf276cde1bdd64eacab2470e4577ab1 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Sun, 18 Oct 2020 23:17:24 +0000 Subject: Hide/show split mnemonic cards --- src/index.html | 20 +++++++++++++++----- src/js/index.js | 12 ++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/index.html b/src/index.html index bc5975a..0aeb316 100644 --- a/src/index.html +++ b/src/index.html @@ -204,12 +204,22 @@
- + +
+
- -

- -

+
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 @@ DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning"); DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); DOM.phrase = $(".phrase"); + DOM.splitMnemonic = $(".splitMnemonic"); + DOM.showSplitMnemonic = $(".showSplitMnemonic"); DOM.phraseSplit = $(".phraseSplit"); DOM.phraseSplitWarn = $(".phraseSplitWarn"); DOM.passphrase = $(".passphrase"); @@ -133,6 +135,7 @@ DOM.entropyMnemonicLength.on("change", entropyChanged); DOM.entropyTypeInputs.on("change", entropyTypeChanged); DOM.phrase.on("input", delayedPhraseChanged); + DOM.showSplitMnemonic.on("change", toggleSplitMnemonic); DOM.passphrase.on("input", delayedPhraseChanged); DOM.generate.on("click", generateClicked); DOM.more.on("click", showMore); @@ -428,6 +431,15 @@ phraseChanged(); } + function toggleSplitMnemonic() { + if (DOM.showSplitMnemonic.prop("checked")) { + DOM.splitMnemonic.removeClass("hidden"); + } + else { + DOM.splitMnemonic.addClass("hidden"); + } + } + function calcForDerivationPath() { clearDerivedKeys(); clearAddressesList(); -- cgit v1.2.3