mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-23 09:04:44 +00:00
Hide/show split mnemonic cards
This commit is contained in:
+15
-5
@@ -204,12 +204,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<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">
|
<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>
|
<label class="control-label text-weight-normal">
|
||||||
<p class="help-block">
|
<input type="checkbox" class="showSplitMnemonic">
|
||||||
<span id="phraseSplitWarn" class="phraseSplitWarn"></span>
|
Show split mnemonic cards
|
||||||
</p>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -47,6 +47,8 @@
|
|||||||
DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning");
|
DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning");
|
||||||
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||||
DOM.phrase = $(".phrase");
|
DOM.phrase = $(".phrase");
|
||||||
|
DOM.splitMnemonic = $(".splitMnemonic");
|
||||||
|
DOM.showSplitMnemonic = $(".showSplitMnemonic");
|
||||||
DOM.phraseSplit = $(".phraseSplit");
|
DOM.phraseSplit = $(".phraseSplit");
|
||||||
DOM.phraseSplitWarn = $(".phraseSplitWarn");
|
DOM.phraseSplitWarn = $(".phraseSplitWarn");
|
||||||
DOM.passphrase = $(".passphrase");
|
DOM.passphrase = $(".passphrase");
|
||||||
@@ -133,6 +135,7 @@
|
|||||||
DOM.entropyMnemonicLength.on("change", entropyChanged);
|
DOM.entropyMnemonicLength.on("change", entropyChanged);
|
||||||
DOM.entropyTypeInputs.on("change", entropyTypeChanged);
|
DOM.entropyTypeInputs.on("change", entropyTypeChanged);
|
||||||
DOM.phrase.on("input", delayedPhraseChanged);
|
DOM.phrase.on("input", delayedPhraseChanged);
|
||||||
|
DOM.showSplitMnemonic.on("change", toggleSplitMnemonic);
|
||||||
DOM.passphrase.on("input", delayedPhraseChanged);
|
DOM.passphrase.on("input", delayedPhraseChanged);
|
||||||
DOM.generate.on("click", generateClicked);
|
DOM.generate.on("click", generateClicked);
|
||||||
DOM.more.on("click", showMore);
|
DOM.more.on("click", showMore);
|
||||||
@@ -428,6 +431,15 @@
|
|||||||
phraseChanged();
|
phraseChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleSplitMnemonic() {
|
||||||
|
if (DOM.showSplitMnemonic.prop("checked")) {
|
||||||
|
DOM.splitMnemonic.removeClass("hidden");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DOM.splitMnemonic.addClass("hidden");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function calcForDerivationPath() {
|
function calcForDerivationPath() {
|
||||||
clearDerivedKeys();
|
clearDerivedKeys();
|
||||||
clearAddressesList();
|
clearAddressesList();
|
||||||
|
|||||||
Reference in New Issue
Block a user