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 ################### //################### UTXOs ###################
scanAllAddresses: async function () { scanAllAddresses: async function () {
await this.refreshAddresses() await this.refreshAddresses()

View file

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

View file

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