mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Hide/show split mnemonic cards
This commit is contained in:
@@ -204,12 +204,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label>
|
||||
<div class="splitMnemonic hidden">
|
||||
<label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="phraseSplit" class="phraseSplit private-data form-control" title="Only 2 of 3 cards needed to recover." rows="3"></textarea>
|
||||
<p class="help-block">
|
||||
<span id="phraseSplitWarn" class="phraseSplitWarn"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="phraseSplit" class="phraseSplit private-data form-control" title="Only 2 of 3 cards needed to recover." rows="3"></textarea>
|
||||
<p class="help-block">
|
||||
<span id="phraseSplitWarn" class="phraseSplitWarn"></span>
|
||||
</p>
|
||||
<label class="control-label text-weight-normal">
|
||||
<input type="checkbox" class="showSplitMnemonic">
|
||||
Show split mnemonic cards
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user