From f0b2c07290dfbb9619bc06d11ed7a5d9e2bab667 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:49:10 -0300 Subject: [PATCH 01/27] chore: upgrade @libresign/vue-pdf-editor to v1.5.0 Update to latest version which includes: - initialScale prop for setting initial zoom level - @scale-changed event for zoom updates - @pdf-editor:ready event for initialization Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f558404e30..923b94503d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "agpl", "dependencies": { "@fontsource/dancing-script": "^5.2.8", - "@libresign/vue-pdf-editor": "^1.4.8", + "@libresign/vue-pdf-editor": "^1.5.0", "@marionebl/option": "^1.0.8", "@mdi/js": "^7.4.47", "@mdi/svg": "^7.4.47", @@ -2794,9 +2794,9 @@ "peer": true }, "node_modules/@libresign/vue-pdf-editor": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/@libresign/vue-pdf-editor/-/vue-pdf-editor-1.4.8.tgz", - "integrity": "sha512-EU95u+MG97bjhAWDBUGqGRfjkK9lDmqvHTWUCbB6AmwU1bTEr5z385kZbpOBY+ES9e0XwN3kNt9JRAD3xLE+KA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@libresign/vue-pdf-editor/-/vue-pdf-editor-1.5.0.tgz", + "integrity": "sha512-O14H/+w2bROiAyVq5R9r5X9doWemCkhkxNFZNhxRZeAObqDIrTe5bmRPWKaKwesjSjIj6mv39SvXO4Vgk+Xg7w==", "license": "MIT", "dependencies": { "@cantoo/pdf-lib": "^2.2.3", diff --git a/package.json b/package.json index aea9215310..1689a85b7a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@fontsource/dancing-script": "^5.2.8", - "@libresign/vue-pdf-editor": "^1.4.8", + "@libresign/vue-pdf-editor": "^1.5.0", "@marionebl/option": "^1.0.8", "@mdi/js": "^7.4.47", "@mdi/svg": "^7.4.47", From 478b07a505224d8b6f5583b937915e091b80ba05 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:49:41 -0300 Subject: [PATCH 02/27] feat: add FooterTemplateEditor component with live preview - Auto-save footer template with 500ms debounce - Live PDF preview with zoom controls - Persistent zoom level using AppConfig - Reset to default functionality - Uses VuePdfEditor v1.5.0 events to eliminate workarounds - Dynamic textarea height adjustment Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/components/FooterTemplateEditor.vue | 301 ++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 src/components/FooterTemplateEditor.vue diff --git a/src/components/FooterTemplateEditor.vue b/src/components/FooterTemplateEditor.vue new file mode 100644 index 0000000000..02eaa6179e --- /dev/null +++ b/src/components/FooterTemplateEditor.vue @@ -0,0 +1,301 @@ + + + + + + + + From 81954130819b8eef6ba55aef4a0c640a41999604 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:49:49 -0300 Subject: [PATCH 03/27] feat: integrate FooterTemplateEditor into Validation settings Replace inline footer template editing with dedicated component providing better UX with live preview and zoom controls Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/views/Settings/Validation.vue | 65 ++++++++++++++++++------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/src/views/Settings/Validation.vue b/src/views/Settings/Validation.vue index 84db88c2ad..e3c69b88d6 100644 --- a/src/views/Settings/Validation.vue +++ b/src/views/Settings/Validation.vue @@ -25,7 +25,7 @@ {{ t('libresign', 'Write QR code on footer with validation URL') }}

-

+

{{ t('libresign', 'To validate the signature of the documents. Only change this value if you want to replace the default validation URL with a different one.') }}

-

- +

+ + {{ t('libresign', 'Customize footer template') }} +

+ - From 6603c0b236abc163ccb08314559a0cc51c07d569 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:49:56 -0300 Subject: [PATCH 04/27] feat: add footer_preview_zoom_level to initial state Store zoom level preference for footer template preview Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- lib/Settings/Admin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 6456a3d0e6..35782a2e71 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -58,6 +58,7 @@ public function getForm(): TemplateResponse { $this->initialState->provideInitialState('signature_font_size', $this->signatureTextService->getSignatureFontSize()); $this->initialState->provideInitialState('signature_height', $this->signatureTextService->getFullSignatureHeight()); $this->initialState->provideInitialState('signature_preview_zoom_level', $this->appConfig->getValueFloat(Application::APP_ID, 'signature_preview_zoom_level', 100)); + $this->initialState->provideInitialState('footer_preview_zoom_level', $this->appConfig->getValueFloat(Application::APP_ID, 'footer_preview_zoom_level', 100)); $this->initialState->provideInitialState('signature_render_mode', $this->signatureTextService->getRenderMode()); $this->initialState->provideInitialState('signature_text_template', $this->signatureTextService->getTemplate()); $this->initialState->provideInitialState('signature_width', $this->signatureTextService->getFullSignatureWidth()); From fe7d43a5f81d749cee6a4b08b565a96f9b370d1e Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 17:15:04 -0300 Subject: [PATCH 05/27] feat: add footer preview dimensions to initial state - Add footer_preview_width (default: 595) - Add footer_preview_height (default: 80) - Used by FooterTemplateEditor component for preview dimensions Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- lib/Settings/Admin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 35782a2e71..4badd78ba4 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -59,6 +59,8 @@ public function getForm(): TemplateResponse { $this->initialState->provideInitialState('signature_height', $this->signatureTextService->getFullSignatureHeight()); $this->initialState->provideInitialState('signature_preview_zoom_level', $this->appConfig->getValueFloat(Application::APP_ID, 'signature_preview_zoom_level', 100)); $this->initialState->provideInitialState('footer_preview_zoom_level', $this->appConfig->getValueFloat(Application::APP_ID, 'footer_preview_zoom_level', 100)); + $this->initialState->provideInitialState('footer_preview_width', $this->appConfig->getValueInt(Application::APP_ID, 'footer_preview_width', 595)); + $this->initialState->provideInitialState('footer_preview_height', $this->appConfig->getValueInt(Application::APP_ID, 'footer_preview_height', 80)); $this->initialState->provideInitialState('signature_render_mode', $this->signatureTextService->getRenderMode()); $this->initialState->provideInitialState('signature_text_template', $this->signatureTextService->getTemplate()); $this->initialState->provideInitialState('signature_width', $this->signatureTextService->getFullSignatureWidth()); From 814581264015ce9b62eb06aeb05da293a17f350c Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Thu, 4 Dec 2025 17:15:18 -0300 Subject: [PATCH 06/27] feat: add dimension controls to footer template editor - Add width and height controls with validation (100-2000, 10-500) - Add reset button for dimensions (UndoVariant icon) - Implement auto-save with debounce (500ms) - Delete AppConfig keys when dimensions are default (595x80) - Add watchers for dimension changes to regenerate PDF - Separate saveDimensions() method for cleaner logic - Show reset button only when dimensions differ from default - Fix containerHeight variable naming conflict Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/components/FooterTemplateEditor.vue | 133 +++++++++++++++++++----- 1 file changed, 105 insertions(+), 28 deletions(-) diff --git a/src/components/FooterTemplateEditor.vue b/src/components/FooterTemplateEditor.vue index 02eaa6179e..e3ce86d2fa 100644 --- a/src/components/FooterTemplateEditor.vue +++ b/src/components/FooterTemplateEditor.vue @@ -22,30 +22,58 @@ @keypress="resizeHeight" />