mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 11:35:56 +01:00
feat: show seed word in browser (for devices with no display)
This commit is contained in:
parent
f14689fb60
commit
d965457b92
2 changed files with 24 additions and 3 deletions
|
@ -393,9 +393,23 @@
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="hww.showSeedDialog" position="top">
|
||||
<q-dialog v-model="hww.showSeedDialog" @hide="closeSeedDialog" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl">
|
||||
<span>Check word at position {{hww.seedWordPosition}} on display</span>
|
||||
<span>Check word at position {{hww.seedWordPosition}} on device</span>
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col-12">
|
||||
<q-toggle
|
||||
label="Show Seed Word"
|
||||
color="secodary"
|
||||
v-model="hww.showSeedWord"
|
||||
></q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="hww.showSeedWord" class="row q-mt-lg">
|
||||
<div class="col-12">
|
||||
<q-input readonly v-model.trim="hww.seedWord"></q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col-4">
|
||||
|
|
|
@ -38,6 +38,8 @@ async function serialSigner(path) {
|
|||
psbtSentResolve: null,
|
||||
xpubResolve: null,
|
||||
seedWordPosition: 1,
|
||||
seedWord: null,
|
||||
showSeedWord: false,
|
||||
showSeedDialog: false,
|
||||
// config: null,
|
||||
|
||||
|
@ -374,6 +376,10 @@ async function serialSigner(path) {
|
|||
})
|
||||
}
|
||||
},
|
||||
closeSeedDialog: function () {
|
||||
this.hww.seedWord = null
|
||||
this.hww.showSeedWord = false
|
||||
},
|
||||
hwwConfirmNext: async function () {
|
||||
this.hww.confirm.outputIndex += 1
|
||||
if (this.hww.confirm.outputIndex >= this.tx.outputs.length) {
|
||||
|
@ -817,7 +823,8 @@ async function serialSigner(path) {
|
|||
await this.sendCommandSecure(COMMAND_SEED, [this.hww.seedWordPosition])
|
||||
},
|
||||
handleShowSeedResponse: function (res = '') {
|
||||
const args = res.trim().split(' ')
|
||||
const [pos, word] = res.trim().split(' ')
|
||||
this.hww.seedWord = `${pos}. ${word}`
|
||||
},
|
||||
hwwRestore: async function () {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue