Use stored signature preferences during signing and bump to 1.2.25
This commit is contained in:
+5
-1
@@ -2,10 +2,14 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Versión base: `1.2.24`
|
||||
- Versión base: `1.2.25`
|
||||
|
||||
## 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
|
||||
|
||||
- `FirmaEC` sin borde ahora usa un widget criptográfico invisible en el PDF final, evitando el rectángulo residual alrededor del sello.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.24`
|
||||
- Base actual: `1.2.25`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.24`
|
||||
- Base actual: `1.2.25`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.24`
|
||||
- Base actual: `1.2.25`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "net.linkedcorp.linkedsign"
|
||||
minSdk 26
|
||||
targetSdk 35
|
||||
versionCode 10224
|
||||
versionName "1.2.24"
|
||||
versionCode 10225
|
||||
versionName "1.2.25"
|
||||
|
||||
buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "linkedsign-backend",
|
||||
"version": "1.2.24",
|
||||
"version": "1.2.25",
|
||||
"private": true,
|
||||
"description": "Initial backend for LinkedSign",
|
||||
"main": "src/server.js",
|
||||
|
||||
@@ -5,6 +5,7 @@ const signaturesRepository = require('./signatures.repository');
|
||||
const documentsRepository = require('../documents/documents.repository');
|
||||
const certificatesRepository = require('../certificates/certificates.repository');
|
||||
const certificatesService = require('../certificates/certificates.service');
|
||||
const usersRepository = require('../users/users.repository');
|
||||
const { signPdf } = require('../signing/signing.service');
|
||||
const auditService = require('../audit/audit.service');
|
||||
const env = require('../../config/env');
|
||||
@@ -32,6 +33,12 @@ const sign = async ({ documentId, certificateId, certPassword, reason, location,
|
||||
const verificationCode = uuidv4();
|
||||
const frontendBaseUrl = (context.frontendUrl || env.frontendUrl || '').replace(/\/$/, '');
|
||||
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;
|
||||
try {
|
||||
@@ -44,11 +51,11 @@ const sign = async ({ documentId, certificateId, certPassword, reason, location,
|
||||
location: location || '',
|
||||
page: page || 0,
|
||||
rect: rect || null,
|
||||
signatureStyle: signatureStyle || 'classic',
|
||||
qrPosition: qrPosition || 'left',
|
||||
qrBackground: qrBackground || 'transparent',
|
||||
qrBorder: qrBorder || 'none',
|
||||
signatureImageBase64: signatureImageBase64 || null,
|
||||
signatureStyle: effectiveSignatureStyle,
|
||||
qrPosition: effectiveQrPosition,
|
||||
qrBackground: effectiveQrBackground,
|
||||
qrBorder: effectiveQrBorder,
|
||||
signatureImageBase64: effectiveSignatureImageBase64,
|
||||
verificationUrl,
|
||||
clientLocale: clientLocale || context.clientLocale || null,
|
||||
clientTimeZone: clientTimeZone || context.clientTimeZone || null,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "1.2.24",
|
||||
"version": "1.2.25",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user