feat: add cancel command
This commit is contained in:
@@ -230,7 +230,12 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-btn v-close-popup flat color="grey" class="float-right"
|
<q-btn
|
||||||
|
@click="cancelOperation"
|
||||||
|
v-close-popup
|
||||||
|
flat
|
||||||
|
color="grey"
|
||||||
|
class="float-right"
|
||||||
>Cancel</q-btn
|
>Cancel</q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -239,6 +239,18 @@ async function serialSigner(path) {
|
|||||||
}
|
}
|
||||||
await this.writer.write(COMMAND_CONFIRM_NEXT + '\n')
|
await this.writer.write(COMMAND_CONFIRM_NEXT + '\n')
|
||||||
},
|
},
|
||||||
|
cancelOperation: async function () {
|
||||||
|
try {
|
||||||
|
await this.writer.write(COMMAND_CANCEL + '\n')
|
||||||
|
} catch (error) {
|
||||||
|
this.$q.notify({
|
||||||
|
type: 'warning',
|
||||||
|
message: 'Failed to send cancel!',
|
||||||
|
caption: `${error}`,
|
||||||
|
timeout: 10000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
hwwLogin: async function () {
|
hwwLogin: async function () {
|
||||||
try {
|
try {
|
||||||
await this.writer.write(
|
await this.writer.write(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const COMMAND_WIPE = '/wipe'
|
|||||||
const COMMAND_SEED = '/seed'
|
const COMMAND_SEED = '/seed'
|
||||||
const COMMAND_RESTORE = '/restore'
|
const COMMAND_RESTORE = '/restore'
|
||||||
const COMMAND_CONFIRM_NEXT = '/confirm-next'
|
const COMMAND_CONFIRM_NEXT = '/confirm-next'
|
||||||
|
const COMMAND_CANCEL = '/cancel'
|
||||||
|
|
||||||
const DEFAULT_RECEIVE_GAP_LIMIT = 20
|
const DEFAULT_RECEIVE_GAP_LIMIT = 20
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user