Add clear button for verify
This commit is contained in:
parent
898f9165c2
commit
17d17082a7
|
@ -61,6 +61,12 @@
|
||||||
:disable="!signatureToVerify || !unsignedData || !address"
|
:disable="!signatureToVerify || !unsignedData || !address"
|
||||||
@click="verify()"
|
@click="verify()"
|
||||||
/>
|
/>
|
||||||
|
<q-btn
|
||||||
|
v-if="canClear"
|
||||||
|
:label="$t('buttons.clear')"
|
||||||
|
color="secondary"
|
||||||
|
@click="clear"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<SignatureDialog
|
<SignatureDialog
|
||||||
:on-copy="copySignature"
|
:on-copy="copySignature"
|
||||||
|
@ -98,7 +104,14 @@ export default {
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
theme: state => state.gateway.app.config.appearance.theme,
|
theme: state => state.gateway.app.config.appearance.theme,
|
||||||
sign_status: state => state.gateway.sign_status,
|
sign_status: state => state.gateway.sign_status,
|
||||||
verify_status: state => state.gateway.verify_status
|
verify_status: state => state.gateway.verify_status,
|
||||||
|
canClear() {
|
||||||
|
const canClear =
|
||||||
|
this.signatureToVerify !== "" ||
|
||||||
|
this.address !== "" ||
|
||||||
|
this.unsignedData !== "";
|
||||||
|
return canClear;
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
watch: {
|
watch: {
|
||||||
sign_status: {
|
sign_status: {
|
||||||
|
@ -167,6 +180,11 @@ export default {
|
||||||
},
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.signature = "";
|
this.signature = "";
|
||||||
|
},
|
||||||
|
clear() {
|
||||||
|
this.signatureToVerify = "";
|
||||||
|
this.unsignedData = "";
|
||||||
|
this.address = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue