feat: add password confirmation for Wipe and Restore
This commit is contained in:
parent
c407e054fd
commit
2ae4df70ea
3 changed files with 34 additions and 7 deletions
|
|
@ -286,8 +286,8 @@ async function payment(path) {
|
||||||
timeout: 10000
|
timeout: 10000
|
||||||
})
|
})
|
||||||
|
|
||||||
// await this.scanAddressWithAmount()
|
// todo: event rescan with amount
|
||||||
// todo: event
|
// todo: display tx id
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.sentTxId = null
|
this.sentTxId = null
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,14 @@
|
||||||
type="password"
|
type="password"
|
||||||
label="Password"
|
label="Password"
|
||||||
></q-input>
|
></q-input>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
v-model.trim="hww.confirmedPassword"
|
||||||
|
type="password"
|
||||||
|
label="Confirm Password"
|
||||||
|
></q-input>
|
||||||
<q-badge color="pink" text-color="black">
|
<q-badge color="pink" text-color="black">
|
||||||
This action cannot be reversed!
|
This action cannot be reversed!
|
||||||
</q-badge>
|
</q-badge>
|
||||||
|
|
@ -276,7 +284,7 @@
|
||||||
<q-btn
|
<q-btn
|
||||||
unelevated
|
unelevated
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="!selectedPort"
|
:disable="!hww.password || hww.password.length < 8 || (hww.password !== hww.confirmedPassword)"
|
||||||
type="submit"
|
type="submit"
|
||||||
>Wipe</q-btn
|
>Wipe</q-btn
|
||||||
>
|
>
|
||||||
|
|
@ -356,7 +364,7 @@
|
||||||
:type="hww.showMnemonic ? 'text' : 'password'"
|
:type="hww.showMnemonic ? 'text' : 'password'"
|
||||||
filled
|
filled
|
||||||
dense
|
dense
|
||||||
hint="Word List"
|
label="Word List"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -374,7 +382,7 @@
|
||||||
:type="hww.showPassword ? 'text' : 'password'"
|
:type="hww.showPassword ? 'text' : 'password'"
|
||||||
filled
|
filled
|
||||||
dense
|
dense
|
||||||
hint="New Password"
|
label="New Password"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -384,6 +392,14 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
v-model.trim="hww.confirmedPassword"
|
||||||
|
type="password"
|
||||||
|
label="Confirm Password"
|
||||||
|
></q-input>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<q-badge
|
<q-badge
|
||||||
color="pink"
|
color="pink"
|
||||||
|
|
@ -391,14 +407,23 @@
|
||||||
class="text-subtitle2"
|
class="text-subtitle2"
|
||||||
multi-line
|
multi-line
|
||||||
>
|
>
|
||||||
For test purposes only. Do not enter word list with real funds.
|
For test purposes only. Do not enter word list with real funds!!!
|
||||||
|
</q-badge>
|
||||||
|
<q-separator></q-separator>
|
||||||
|
<q-badge
|
||||||
|
color="pink"
|
||||||
|
text-color="black"
|
||||||
|
class="text-subtitle2"
|
||||||
|
multi-line
|
||||||
|
>
|
||||||
|
ALL existing data on the Hardware Device will be lost.
|
||||||
</q-badge>
|
</q-badge>
|
||||||
|
|
||||||
<div class="row q-mt-lg">
|
<div class="row q-mt-lg">
|
||||||
<q-btn
|
<q-btn
|
||||||
unelevated
|
unelevated
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="!selectedPort"
|
:disable="!hww.mnemonic || !hww.password || hww.password.length < 8 || (hww.password !== hww.confirmedPassword)"
|
||||||
type="submit"
|
type="submit"
|
||||||
>Restore</q-btn
|
>Restore</q-btn
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -440,6 +440,7 @@ async function serialSigner(path) {
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
this.hww.password = null
|
this.hww.password = null
|
||||||
|
this.hww.confirmedPassword = null
|
||||||
this.hww.showPassword = false
|
this.hww.showPassword = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -555,6 +556,7 @@ async function serialSigner(path) {
|
||||||
this.hww.mnemonic = null
|
this.hww.mnemonic = null
|
||||||
this.hww.showMnemonic = false
|
this.hww.showMnemonic = false
|
||||||
this.hww.password = null
|
this.hww.password = null
|
||||||
|
this.hww.confirmedPassword = null
|
||||||
this.hww.showPassword = false
|
this.hww.showPassword = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue