feat: add help command

This commit is contained in:
Vlad Stan 2022-07-21 11:01:05 +03:00
parent 01c81c1a83
commit 5f7537f600
3 changed files with 22 additions and 4 deletions

View File

@ -840,6 +840,23 @@ new Vue({
})
}
},
hwwHelp: async function () {
try {
await this.serial.writer.write(COMMAND_HELP + '\n')
this.$q.notify({
type: 'positive',
message: 'Check display or console for details!',
timeout: 5000
})
} catch (error) {
this.$q.notify({
type: 'warning',
message: 'Failed to ask for help!',
caption: `${error}`,
timeout: 10000
})
}
},
//################### UTXOs ###################
scanAllAddresses: async function () {
await this.refreshAddresses()

View File

@ -3,6 +3,7 @@ const COMMAND_PASSWORD = '/password'
const COMMAND_PASSWORD_CLEAR = '/password-clear'
const COMMAND_SEND_PSBT = '/psbt'
const COMMAND_SIGN_PSBT = '/sign'
const COMMAND_HELP = '/help'
const blockTimeToDate = blockTime =>
blockTime ? moment(blockTime * 1000).format('LLL') : ''

View File

@ -1193,7 +1193,7 @@
>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item @click="hwwHelp()" clickable v-close-popup>
<q-item-section>
<q-item-label>Help</q-item-label>
<q-item-label caption
@ -1253,10 +1253,10 @@
>Confirm</q-btn
>
</div>
<div class="col-3 q-pl-lg">
<div class="col-3">
<q-toggle
v-if="serial.psbtBase64Signed"
label="Show Console"
v-if="payment.psbtBase64Signed"
label="Show Signed Psbt"
color="secodary float-left"
v-model="hww.showSignedPsbt"
></q-toggle>