mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 20:42:32 +02:00
feat: show seed word in browser (for devices with no display)
This commit is contained in:
@@ -393,9 +393,23 @@
|
|||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</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">
|
<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="row q-mt-lg">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
|
@@ -38,6 +38,8 @@ async function serialSigner(path) {
|
|||||||
psbtSentResolve: null,
|
psbtSentResolve: null,
|
||||||
xpubResolve: null,
|
xpubResolve: null,
|
||||||
seedWordPosition: 1,
|
seedWordPosition: 1,
|
||||||
|
seedWord: null,
|
||||||
|
showSeedWord: false,
|
||||||
showSeedDialog: false,
|
showSeedDialog: false,
|
||||||
// config: null,
|
// config: null,
|
||||||
|
|
||||||
@@ -374,6 +376,10 @@ async function serialSigner(path) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
closeSeedDialog: function () {
|
||||||
|
this.hww.seedWord = null
|
||||||
|
this.hww.showSeedWord = false
|
||||||
|
},
|
||||||
hwwConfirmNext: async function () {
|
hwwConfirmNext: async function () {
|
||||||
this.hww.confirm.outputIndex += 1
|
this.hww.confirm.outputIndex += 1
|
||||||
if (this.hww.confirm.outputIndex >= this.tx.outputs.length) {
|
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])
|
await this.sendCommandSecure(COMMAND_SEED, [this.hww.seedWordPosition])
|
||||||
},
|
},
|
||||||
handleShowSeedResponse: function (res = '') {
|
handleShowSeedResponse: function (res = '') {
|
||||||
const args = res.trim().split(' ')
|
const [pos, word] = res.trim().split(' ')
|
||||||
|
this.hww.seedWord = `${pos}. ${word}`
|
||||||
},
|
},
|
||||||
hwwRestore: async function () {
|
hwwRestore: async function () {
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user