mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 21:12:16 +01:00
fix: update modal title to reflect edit vs add signer action
The modal dialog was displaying 'Add new signer' title when clicking an existing signer to edit, which was confusing. Added a computed property 'modalTitle' that dynamically returns 'Edit signer' when editing an existing signer or 'Add new signer' when adding a new one. The logic checks if signerToEdit object has properties to determine the correct context. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
3eff421a84
commit
562cb296d1
1 changed files with 8 additions and 2 deletions
|
|
@ -117,9 +117,9 @@
|
|||
<NcDialog v-if="filesStore.identifyingSigner"
|
||||
id="request-signature-identify-signer"
|
||||
:size="size"
|
||||
:name="t('libresign', 'Add new signer')"
|
||||
:name="modalTitle"
|
||||
@closing="filesStore.disableIdentifySigner()">
|
||||
<NcAppSidebar :name="t('libresign', 'Add new signer')">
|
||||
<NcAppSidebar :name="modalTitle">
|
||||
<NcAppSidebarTab v-for="method in enabledMethods()"
|
||||
:id="`tab-${method.name}`"
|
||||
:key="method.name"
|
||||
|
|
@ -314,6 +314,12 @@ export default {
|
|||
size() {
|
||||
return window.matchMedia('(max-width: 512px)').matches ? 'full' : 'normal'
|
||||
},
|
||||
modalTitle() {
|
||||
if (Object.keys(this.signerToEdit).length > 0) {
|
||||
return this.t('libresign', 'Edit signer')
|
||||
}
|
||||
return this.t('libresign', 'Add new signer')
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
signers(signers) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue