Add a reset button

This commit is contained in:
Rodolphe Bréard 2023-08-25 10:22:21 +02:00
parent 0dc94a7edd
commit a7c0548b7e
4 changed files with 15 additions and 4 deletions

View file

@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added
- The main view now includes a reset button
### Changed ### Changed
- Secret keys are now restricted to 128 bits (16 bytes) or 256 bits (32 bytes) - Secret keys are now restricted to 128 bits (16 bytes) or 256 bits (32 bytes)
- The local part cannot contain the separator - The local part cannot contain the separator

View file

@ -5,7 +5,8 @@
"cancel": "Cancel", "cancel": "Cancel",
"close": "Close", "close": "Close",
"copy": "Copy", "copy": "Copy",
"delete": "Delete" "delete": "Delete",
"reset": "Reset"
} }
}, },
"navbar": { "navbar": {
@ -65,7 +66,8 @@
"name": "Name", "name": "Name",
"input": "Dedicated name", "input": "Dedicated name",
"address": "Address", "address": "Address",
"copy": "@:invariants.controls.copy" "copy": "@:invariants.controls.copy",
"reset": "@:invariants.controls.reset"
}, },
"manageAccounts": { "manageAccounts": {
"title": "Accounts", "title": "Accounts",

View file

@ -5,7 +5,8 @@
"cancel": "Annuler", "cancel": "Annuler",
"close": "Fermer", "close": "Fermer",
"copy": "Copier", "copy": "Copier",
"delete": "Supprimer" "delete": "Supprimer",
"reset": "Réinitialiser"
} }
}, },
"navbar": { "navbar": {
@ -65,7 +66,8 @@
"name": "Nom", "name": "Nom",
"input": "Nom dédié", "input": "Nom dédié",
"address": "Adresse", "address": "Adresse",
"copy": "@:invariants.controls.copy" "copy": "@:invariants.controls.copy",
"reset": "@:invariants.controls.reset"
}, },
"manageAccounts": { "manageAccounts": {
"title": "Comptes", "title": "Comptes",

View file

@ -44,6 +44,9 @@ const generatedAddr = computed(() => {
const copyAddr = () => { const copyAddr = () => {
navigator.clipboard.writeText(generatedAddr.value); navigator.clipboard.writeText(generatedAddr.value);
}; };
const resetForm = () => {
subAddrName.value = '';
};
</script> </script>
<template> <template>
@ -74,6 +77,7 @@ const copyAddr = () => {
</div> </div>
<div class="buttons is-centered"> <div class="buttons is-centered">
<button class="button is-primary" @click="copyAddr">{{ $t("main.copy") }}</button> <button class="button is-primary" @click="copyAddr">{{ $t("main.copy") }}</button>
<button class="button is-light" @click="resetForm">{{ $t("main.reset") }}</button>
</div> </div>
</LayoutComponent> </LayoutComponent>
</template> </template>