Use stored signature preferences during signing and bump to 1.2.25

This commit is contained in:
2026-05-22 14:19:27 -05:00
parent fdde9cdb5d
commit 81bd8d3c59
9 changed files with 25 additions and 14 deletions
+5 -1
View File
@@ -2,10 +2,14 @@
## Versión actual ## Versión actual
- Versión base: `1.2.24` - Versión base: `1.2.25`
## Historial ## Historial
### 1.2.25 - 2026-05-22
- La firma normal usa las preferencias visuales guardadas del usuario al momento de firmar, evitando que un estado viejo del frontend vuelva a enviar `FirmaEC` con borde.
### 1.2.24 - 2026-05-22 ### 1.2.24 - 2026-05-22
- `FirmaEC` sin borde ahora usa un widget criptográfico invisible en el PDF final, evitando el rectángulo residual alrededor del sello. - `FirmaEC` sin borde ahora usa un widget criptográfico invisible en el PDF final, evitando el rectángulo residual alrededor del sello.
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual ## Versión actual
- Base actual: `1.2.24` - Base actual: `1.2.25`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION) - Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md) - Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual ## Versión actual
- Base actual: `1.2.24` - Base actual: `1.2.25`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION) - Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md) - Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual ## Versión actual
- Base actual: `1.2.24` - Base actual: `1.2.25`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION) - Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md) - Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -1 +1 @@
1.2.24 1.2.25
+2 -2
View File
@@ -18,8 +18,8 @@ android {
applicationId "net.linkedcorp.linkedsign" applicationId "net.linkedcorp.linkedsign"
minSdk 26 minSdk 26
targetSdk 35 targetSdk 35
versionCode 10224 versionCode 10225
versionName "1.2.24" versionName "1.2.25"
buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\"" buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\""
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "linkedsign-backend", "name": "linkedsign-backend",
"version": "1.2.24", "version": "1.2.25",
"private": true, "private": true,
"description": "Initial backend for LinkedSign", "description": "Initial backend for LinkedSign",
"main": "src/server.js", "main": "src/server.js",
@@ -5,6 +5,7 @@ const signaturesRepository = require('./signatures.repository');
const documentsRepository = require('../documents/documents.repository'); const documentsRepository = require('../documents/documents.repository');
const certificatesRepository = require('../certificates/certificates.repository'); const certificatesRepository = require('../certificates/certificates.repository');
const certificatesService = require('../certificates/certificates.service'); const certificatesService = require('../certificates/certificates.service');
const usersRepository = require('../users/users.repository');
const { signPdf } = require('../signing/signing.service'); const { signPdf } = require('../signing/signing.service');
const auditService = require('../audit/audit.service'); const auditService = require('../audit/audit.service');
const env = require('../../config/env'); const env = require('../../config/env');
@@ -32,6 +33,12 @@ const sign = async ({ documentId, certificateId, certPassword, reason, location,
const verificationCode = uuidv4(); const verificationCode = uuidv4();
const frontendBaseUrl = (context.frontendUrl || env.frontendUrl || '').replace(/\/$/, ''); const frontendBaseUrl = (context.frontendUrl || env.frontendUrl || '').replace(/\/$/, '');
const verificationUrl = `${frontendBaseUrl}/verify/${verificationCode}`; const verificationUrl = `${frontendBaseUrl}/verify/${verificationCode}`;
const storedSignaturePreferences = await usersRepository.getSignaturePreferences(userId);
const effectiveSignatureStyle = storedSignaturePreferences.signatureStyle || signatureStyle || 'classic';
const effectiveQrPosition = storedSignaturePreferences.qrPosition || qrPosition || 'left';
const effectiveQrBackground = storedSignaturePreferences.qrBackground || qrBackground || 'transparent';
const effectiveQrBorder = storedSignaturePreferences.qrBorder || qrBorder || 'none';
const effectiveSignatureImageBase64 = storedSignaturePreferences.signatureImageBase64 || signatureImageBase64 || null;
let signedFilename, signedPath; let signedFilename, signedPath;
try { try {
@@ -44,11 +51,11 @@ const sign = async ({ documentId, certificateId, certPassword, reason, location,
location: location || '', location: location || '',
page: page || 0, page: page || 0,
rect: rect || null, rect: rect || null,
signatureStyle: signatureStyle || 'classic', signatureStyle: effectiveSignatureStyle,
qrPosition: qrPosition || 'left', qrPosition: effectiveQrPosition,
qrBackground: qrBackground || 'transparent', qrBackground: effectiveQrBackground,
qrBorder: qrBorder || 'none', qrBorder: effectiveQrBorder,
signatureImageBase64: signatureImageBase64 || null, signatureImageBase64: effectiveSignatureImageBase64,
verificationUrl, verificationUrl,
clientLocale: clientLocale || context.clientLocale || null, clientLocale: clientLocale || context.clientLocale || null,
clientTimeZone: clientTimeZone || context.clientTimeZone || null, clientTimeZone: clientTimeZone || context.clientTimeZone || null,
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "frontend", "name": "frontend",
"private": true, "private": true,
"version": "1.2.24", "version": "1.2.25",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",