From 4315ba4771c91e4908106bffacf21047f9d99e3d Mon Sep 17 00:00:00 2001
From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Date: Sat, 13 Dec 2025 16:29:50 -0300
Subject: [PATCH 1/2] refactor: change VisibleElements modal button from Send
to Save
The button in the signature positions modal now always shows 'Save'
instead of conditionally showing 'Send' or 'Save' based on draft status.
Changes:
- Button always calls save() method without changing status
- Removed confirmation dialog (showConfirm) from VisibleElements
- Removed request() method that was changing status to ABLE_TO_SIGN
- Removed unused Send icon component import
- Simplified button logic by removing isDraft condition
This improves UX by making the modal's purpose clear: it's for
positioning signatures, not for requesting them.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
---
src/Components/Request/VisibleElements.vue | 55 +---------------------
1 file changed, 2 insertions(+), 53 deletions(-)
diff --git a/src/Components/Request/VisibleElements.vue b/src/Components/Request/VisibleElements.vue
index cb6fc71a47..eda5f35eaf 100644
--- a/src/Components/Request/VisibleElements.vue
+++ b/src/Components/Request/VisibleElements.vue
@@ -42,8 +42,8 @@
:variant="variantOfSaveButton"
:wide="true"
:class="{ disabled: signerSelected }"
- @click="isDraft ? save() : showConfirm = true">
- {{ isDraft ? t('libresign', 'Save') : t('libresign', 'Send') }}
+ @click="save()">
+ {{ t('libresign', 'Save') }}
-
-
- {{ errorConfirmRequest }}
-
-
-
- {{ t('libresign', 'Cancel') }}
-
-
-
-
-
-
- {{ t('libresign', 'Send') }}
-
-
-
@@ -102,8 +77,6 @@ import NcDialog from '@nextcloud/vue/components/NcDialog'
import NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'
import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
-import Send from 'vue-material-design-icons/Send.vue'
-
import Chip from '../Chip.vue'
import PdfEditor from '../PdfEditor/PdfEditor.vue'
import Signer from '../Signers/Signer.vue'
@@ -121,7 +94,6 @@ export default {
NcButton,
NcLoadingIcon,
PdfEditor,
- Send,
},
setup() {
const filesStore = useFilesStore()
@@ -131,9 +103,7 @@ export default {
return {
canRequestSign: loadState('libresign', 'can_request_sign', false),
modal: false,
- showConfirm: false,
loading: false,
- errorConfirmRequest: '',
signerSelected: null,
width: getCapabilities().libresign.config['sign-elements']['full-signature-width'],
height: getCapabilities().libresign.config['sign-elements']['full-signature-height'],
@@ -204,7 +174,6 @@ export default {
this.filesStore.loading = true
},
closeModal() {
- this.errorConfirmRequest = ''
this.modal = false
this.filesStore.loading = false
},
@@ -306,26 +275,6 @@ export default {
return false
}
},
- async request() {
- this.loading = true
- this.errorConfirmRequest = ''
- const visibleElements = this.buildVisibleElements()
-
- try {
- const response = await this.filesStore.updateSignatureRequest({ visibleElements, status: 1 })
- this.filesStore.addFile(response.data)
- this.showConfirm = false
- showSuccess(t('libresign', response.message))
- this.closeModal()
- emit('libresign:visible-elements-saved')
- this.loading = false
- return true
- } catch (error) {
- this.errorConfirmRequest = error.response?.data?.ocs?.data?.message || t('libresign', 'An error occurred')
- this.loading = false
- return false
- }
- },
buildVisibleElements() {
const visibleElements = []
const scale = this.$refs.pdfEditor.$refs.vuePdfEditor.scale || 1
From ef3a94904d43684b7305bd02e0c29f78e353bf32 Mon Sep 17 00:00:00 2001
From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Date: Sat, 13 Dec 2025 16:30:16 -0300
Subject: [PATCH 2/2] feat: add confirmation dialogs for signature requests
Added confirmation dialogs before sending signature requests to improve
user awareness and prevent accidental submissions.
Changes:
- Added confirmation dialog for global 'Request signatures' button
- Added confirmation dialog for individual signer 'Request signature' action
- Created confirmRequest() and confirmRequestSigner() methods
- Added state management: showConfirmRequest, showConfirmRequestSigner, selectedSigner
- Modified request() to show confirmation instead of directly executing
- Modified requestSignatureForSigner() to show confirmation and store selected signer
The confirmation dialogs use NcDialog with @closing event for proper
closing behavior when user clicks X, ESC, or Cancel button.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
---
.../RightSidebar/RequestSignatureTab.vue | 55 ++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/src/Components/RightSidebar/RequestSignatureTab.vue b/src/Components/RightSidebar/RequestSignatureTab.vue
index 996cc16561..3391749c23 100644
--- a/src/Components/RightSidebar/RequestSignatureTab.vue
+++ b/src/Components/RightSidebar/RequestSignatureTab.vue
@@ -134,6 +134,44 @@
+
+
+
+ {{ t('libresign', 'Cancel') }}
+
+
+
+
+
+
+ {{ t('libresign', 'Send') }}
+
+
+
+
+
+
+ {{ t('libresign', 'Cancel') }}
+
+
+
+
+
+
+ {{ t('libresign', 'Send') }}
+
+
+