Skip to content

Commit 562cb29

Browse files
committed
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 <[email protected]>
1 parent 3eff421 commit 562cb29

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Components/RightSidebar/RequestSignatureTab.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@
117117
<NcDialog v-if="filesStore.identifyingSigner"
118118
id="request-signature-identify-signer"
119119
:size="size"
120-
:name="t('libresign', 'Add new signer')"
120+
:name="modalTitle"
121121
@closing="filesStore.disableIdentifySigner()">
122-
<NcAppSidebar :name="t('libresign', 'Add new signer')">
122+
<NcAppSidebar :name="modalTitle">
123123
<NcAppSidebarTab v-for="method in enabledMethods()"
124124
:id="`tab-${method.name}`"
125125
:key="method.name"
@@ -314,6 +314,12 @@ export default {
314314
size() {
315315
return window.matchMedia('(max-width: 512px)').matches ? 'full' : 'normal'
316316
},
317+
modalTitle() {
318+
if (Object.keys(this.signerToEdit).length > 0) {
319+
return this.t('libresign', 'Edit signer')
320+
}
321+
return this.t('libresign', 'Add new signer')
322+
},
317323
},
318324
watch: {
319325
signers(signers) {

0 commit comments

Comments
 (0)