aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.html20
-rw-r--r--src/js/index.js12
2 files changed, 27 insertions, 5 deletions
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 @@
204 </div> 204 </div>
205 </div> 205 </div>
206 <div class="form-group"> 206 <div class="form-group">
207 <label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label> 207 <div class="splitMnemonic hidden">
208 <label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label>
209 <div class="col-sm-10">
210 <textarea id="phraseSplit" class="phraseSplit private-data form-control" title="Only 2 of 3 cards needed to recover." rows="3"></textarea>
211 <p class="help-block">
212 <span id="phraseSplitWarn" class="phraseSplitWarn"></span>
213 </p>
214 </div>
215 </div>
216 <div class="col-sm-2">
217 </div>
208 <div class="col-sm-10"> 218 <div class="col-sm-10">
209 <textarea id="phraseSplit" class="phraseSplit private-data form-control" title="Only 2 of 3 cards needed to recover." rows="3"></textarea> 219 <label class="control-label text-weight-normal">
210 <p class="help-block"> 220 <input type="checkbox" class="showSplitMnemonic">
211 <span id="phraseSplitWarn" class="phraseSplitWarn"></span> 221 Show split mnemonic cards
212 </p> 222 </label>
213 </div> 223 </div>
214 </div> 224 </div>
215 <div class="form-group"> 225 <div class="form-group">
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();