Commit Graph

346 Commits

Author SHA1 Message Date
402100a526 Add support for phone numbers in receiver workflow
Enhanced the envelope creation workflow to handle phone numbers:
- Added `PhoneNumber` property to `RecentReceiverSuggestionDto`.
- Updated `MappingProfile` to map `PhoneNumber`.
- Modified LINQ queries to include `PhoneNumber` in selection/grouping.
- Enhanced `CreateEnvelopeWizardPopup.razor` to display and manage phone numbers.
- Updated `CreateEnvelopeWizardReceiver` to include `PhoneNumber`.
- Enhanced `ReceiverFilterCriteria` and `ReceiverSuggestionFilterHandler` to filter by `PhoneNumber`.
- Adjusted CSS layout to accommodate the new phone number field.
- Added a unit test to ensure `PhoneNumber` persistence.

These changes allow users to input, display, and manage phone numbers alongside existing receiver details like name and email.
2026-11-30 16:34:14 +01:00
d82d0f4a66 Make ZoomPercent a public parameter in SenderPdfEditor
Refactored the `ZoomPercent` property in `SenderPdfImageEditor.razor` to be a public parameter, enabling external control of the zoom level. Removed the private `_zoomPercent` field and updated all references to use the new parameter.

Updated the `SetZoomPercent` method to modify the `ZoomPercent` parameter. Adjusted `SenderPdfImageEditorToolbar` to accept `ZoomPercent` as a parameter.

In `CreateEnvelopeWizardPopup.razor`, added the `ZoomPercent` parameter to the `SenderPdfImageEditor` component with a default value of `100`.
2026-11-30 15:45:19 +01:00
eae1f7baa8 Increase max zoom and improve zoom styling
Increased the maximum zoom percentage (`MaxZoomPercent`) in `SenderPdfImageEditor.razor` from 300 to 1000, enabling higher zoom levels for PDFs.

Updated the `GetZoomStyle` method to use a CSS variable (`--sender-editor-zoom`) for better flexibility and consistency in applying zoom styles.

Introduced the `--sender-editor-zoom` CSS variable in `envelope-viewer.css` and replaced the `max-width` property with a dynamic `width` calculation to ensure zoom levels affect the editor's layout.
2026-11-30 14:41:08 +01:00
d54e094ef4 Add configurable mouse wheel zoom to PDF editor
Introduced the `EnableWheelZoom` parameter in `SenderPdfImageEditor.razor` to allow toggling mouse wheel zoom functionality. Updated the JavaScript interop call to pass this parameter to the `ensureZoomOverride` function in `envelope-editor.js`.

Modified the `OnEditorWheelAsync` method to respect the `EnableWheelZoom` setting, preventing zoom actions when disabled. Updated `CreateEnvelopeWizardPopup.razor` to explicitly disable wheel zoom for its instance of the PDF editor.

Enhanced `ensureZoomOverride` in `envelope-editor.js` to handle the `enableWheelZoom` parameter, attaching or updating the `zoomOverrideEnableWheelZoom` dataset attribute to control zoom behavior dynamically.
2026-11-30 14:26:23 +01:00
700d635946 Enhance sender preview card styling
Added a border, border-radius, and linear gradient background to the `.sender-create-wizard__document-preview-card` for improved visual appearance. Introduced an inset box-shadow for subtle depth. Updated padding in `.sender-create-wizard__document-preview-card .sender-image-editor` to `0.35rem` for better spacing.
2026-11-30 14:21:29 +01:00
eded61928f Simplify document preview structure and styles
Removed unnecessary `sender-create-wizard__document-preview-wrap` wrapper in `CreateEnvelopeWizardPopup.razor` to simplify the HTML structure. Updated `sender-page.css` to remove associated styles and adjusted `.sender-create-wizard__document-preview-card` to directly style child elements.

Introduced `.sender-create-wizard__document-preview-card .sender-image-editor__page-block` for cleaner and minimalistic page block styling. Ensured layout and appearance remain consistent after the structural changes.
2026-11-30 14:15:46 +01:00
735f590c60 Add quality control for PDF rendering pipeline
Introduce a `qualityPercent` parameter to control the quality of rendered PDF page images. Updated `IPdfPageImageRenderer` and its implementation to support this parameter, normalizing it within defined bounds and dynamically adjusting rendering DPI.

Updated `PdfRenderController` to accept an optional `qualityPercent` query parameter, propagate it through the pipeline, and include it in cache keys. Modified `PdfRenderService` to construct API requests with the quality parameter.

Added `CreateEnvelopeWizardRenderOptions` with a default `PreviewQualityPercent` of 55% for rendering previews in `CreateEnvelopeWizardPopup`. Adjusted caching logic and cache key format to account for quality-specific results.
2026-11-30 14:04:42 +01:00
af24bb61ee Improve upload panel resizing performance
Refactored the upload panel resizing logic in `CreateEnvelopeWizardPopup` to reduce .NET interop calls and improve responsiveness.

- Added a `@ref` attribute and `_bodyLayoutRef` field to reference the upload panel layout element.
- Updated `startWizardUploadPanelResize` in `envelope-editor.js` to accept and use a `hostEl` parameter for direct DOM manipulation.
- Removed `OnUploadPanelResizeMove` from `CreateEnvelopeWizardPopup.razor` as it is no longer needed.
- Updated `OnUploadPanelResizeEnd` to handle the final width passed from JavaScript.
- Modified `stopWizardUploadPanelResize` to include the final width when invoking the .NET method.
- Cleaned up unused references and state properties in `envelope-editor.js`.

These changes reduce latency during resizing and ensure the application state remains consistent.
2026-11-30 13:55:40 +01:00
4653670b2c Enhance upload panel resizing with JS interop
Introduced JavaScript interop for dynamic resizing of the upload
panel in `CreateEnvelopeWizardPopup`. Added `DotNetObjectReference`
to enable communication between Blazor and JavaScript, replacing
synchronous resizing logic with asynchronous calls for improved
performance.

Refactored event handlers and updated state management to ensure
proper handling of resizing operations. Enhanced `envelope-editor.js`
with a dedicated `_wizardResize` object to manage resizing state
and optimize performance using `requestAnimationFrame`.

Added cleanup logic with `DisposeAsync` to release resources and
prevent memory leaks. Removed redundant event handlers from the
Razor file, delegating resizing logic to JavaScript. Improved
error handling for JavaScript calls to ensure robustness.
2026-11-30 13:35:46 +01:00
3eb74e8054 Add conditional toolbar styling for PDF image editor
Updated `SenderPdfImageEditor.razor` to conditionally apply the `sender-image-editor__pages--no-toolbar` class based on the `ShowToolbar` property. Added a corresponding CSS rule in `envelope-viewer.css` to remove top padding when the toolbar is hidden.
2026-11-30 13:19:39 +01:00
176bf35689 Allow default onwheel behavior in SenderPdfImageEditor
Removed the `@onwheel:preventDefault="true"` attribute from the
`<div>` element in `SenderPdfImageEditor.razor`. This change
enables the default browser behavior for the `onwheel` event,
allowing native scrolling or other default interactions within
the `pdf-editor-wrapper` element.
2026-11-30 13:11:08 +01:00
bfe24bf766 Add ShowToolbar parameter to SenderPdfImageEditor
Introduced a new `ShowToolbar` parameter to the `SenderPdfImageEditor` component, allowing external control over toolbar visibility. Updated the rendering logic to conditionally display the toolbar based on `ShowToolbar` and `PageCount`. Modified `CreateEnvelopeWizardPopup` to explicitly set `ShowToolbar` to `false` when using the `SenderPdfImageEditor` component.
2026-11-30 12:59:26 +01:00
bf9895c9ba Add PDF preview and improve document upload UX
Enhanced `CreateEnvelopeWizardPopup.razor` with PDF preview functionality using `SenderPdfImageEditor` and `PdfRenderService`. Added `_documentPagePreviews` to store rendered pages and `DocumentPdfDataUrl` for base64-encoded PDF data. Updated document upload logic to render pages and handle errors gracefully. Cleared `_documentPagePreviews` on reset.

Modified `PdfFileDropZone.razor` to include a spacer for better layout when no document is present. Updated `sender-page.css` to improve layout responsiveness, add dynamic resizing, and refine styles for document preview and drop zone. Removed unused `sender-create-wizard__document-meta` class.

These changes improve the user experience by providing PDF previews, enhancing layout consistency, and ensuring robust error handling during document uploads.
2026-11-30 12:32:30 +01:00
0c27219542 Improve error handling for invalid/missing PDF data
Added localized strings in German, English, and French for new error messages related to invalid PDF data and missing page preview data. Updated `SenderPdfImageEditor.razor` to display appropriate messages when `PdfDataUrl` is invalid or empty, or when no page preview data is available. Replaced `PageCount <= 0` condition with `string.IsNullOrWhiteSpace(PdfDataUrl)` for better validation. Removed the native PDF preview iframe in favor of consistent error message handling.
2026-11-30 10:40:44 +01:00
9a986e1b9b Add configurable logging tuning options
Introduced `LoggingTuningOptions` to centralize runtime logging configurations, including EF Core and Serilog request logging.

- Added `EfCoreLoggingOptions` for SQL logging, log levels, sensitive data logging, and detailed errors.
- Added `RequestLoggingOptions` for enabling/disabling Serilog HTTP request logging and excluding specific path prefixes.
- Updated `Program.cs` to dynamically configure EF Core and request logging based on `LoggingTuningOptions`.
- Added `LoggingTuning` section to `appsettings.json` and `appsettings.Development.json` for externalized configuration.
- Removed hardcoded EF Core logging settings for improved flexibility and maintainability.
2026-11-30 09:53:34 +01:00
e4ce91ee8b Add Windows Service support and version update
Updated project version to 2.2.0-beta. Added support for running the application as a Windows Service using `Microsoft.Extensions.Hosting.WindowsServices`. Introduced `WindowsServiceHostingOptions` for configuration, including `Enabled` and `ServiceName` properties.

Added a new configuration section in `appsettings.json` for Windows Service settings. Integrated service management logic in `Program.cs`. Included a batch script `manage-service.bat` for installing, uninstalling, and managing the Windows Service.
2026-11-30 09:27:01 +01:00
6657b6b15a Add remote trigger support for finalization worker
Introduced `RemoteEnvelopeFinalizationTrigger` to enable triggering the envelope finalization worker via a remote HTTP endpoint. Added `BackgroundServicesOptions` for centralized configuration of background services, including enabling/disabling the local worker and configuring the remote trigger URL.

Enhanced `TriggerFinalizationWorkerBehavior` with improved error handling and logging using `ILogger`. Added `DisableControllerConvention` to dynamically exclude controllers based on configuration.

Updated `Program.cs` for conditional service registration and improved configuration loading. Modified `appsettings.json` and `appsettings.Development.json` to include remote trigger settings. Incremented project version to `2.1.0-beta`.

Refactored code for better maintainability, scalability, and observability.
2026-11-27 13:33:40 +01:00
fa5f28a58f Add TriggerFinalizationWorkerBehavior to pipeline
Updated IEnvelopeFinalizationTrigger to support CancellationToken
in TriggerAsync for improved cancellation handling. Introduced
TriggerFinalizationWorkerBehavior to trigger finalization in the
SigningCommand pipeline. Updated DependencyInjection to include
the new behavior. Refactored EnvelopeFinalizationTrigger to align
with interface changes and removed unused using directives.
2026-11-27 13:08:16 +01:00
43758e3390 Add envelope finalization trigger and workflow updates
Introduced `EnvelopeFinalizationTrigger` to enable external
triggering of the `EnvelopeFinalizationWorker` for immediate
envelope processing. Updated `EnvelopeFinalizationWorker` to
support both polling and external triggers, improving
performance and flexibility.

Added `BackgroundServicesController` with an API endpoint to
trigger the worker, including configuration checks for
availability. Temporarily used `[AllowAnonymous]` with plans
to replace it with sender-scoped authorization.

Enhanced manual testing workflows in `AGENTS.md`:
- Standardized request-to-domain mapping policy.
- Migrated dynamic SQL to parameterized queries for security.
- Improved UX for deterministic row double-click behavior.
- Implemented SPA-style language switching.
- Added sender-scoped caching for recent receiver suggestions.

Updated dependency injection in `Program.cs` to register
`EnvelopeFinalizationTrigger` and ensure the worker is only
enabled when configured.
2026-11-27 13:07:50 +01:00
58d7d34562 Add conditional EnvelopeFinalizationWorker service
Introduce a configuration-based mechanism to enable or disable
the `EnvelopeFinalizationWorker` hosted service.

- Updated `Program.cs` to conditionally register the service
  based on the `BackgroundServices:EnableEnvelopeFinalizationWorker`
  configuration setting.
- Added `BackgroundServices` section to `appsettings.json`
  with the worker disabled by default.
- Added `BackgroundServices` section to `appsettings.Development.json`
  with the worker enabled in the development environment.
2026-11-27 11:22:35 +01:00
f66a8c374b Remove ReadSignedEnvelopeQuery and related handler
The `ReadSignedEnvelopeQuery.cs` file has been entirely removed, including the `ReadSignedEnvelopeQuery` record, its properties (`Burned`, `UserId`), and the `Authorized` method. The associated `ReadSignedEnvelopeQueryHandler` class, which implemented the `IRequestHandler` interface, has also been deleted.

This removal includes the deletion of `using` directives for namespaces such as `AutoMapper`, `MediatR`, and `Microsoft.EntityFrameworkCore`. The functionality for querying signed envelopes is no longer needed or has been replaced elsewhere in the codebase.
2026-11-27 11:10:13 +01:00
af6d172087 Improve robustness of EnvelopeFinalizationWorker
- Reduced polling interval from 1 minute to 10 seconds.
- Added failure handling with a 6-hour block duration for retries.
- Introduced `BlockedEnvelopes` to track and exclude failed envelopes.
- Implemented cleanup for expired blocks in `BlockedEnvelopes`.
- Enhanced error logging to include block duration details.
- Updated debug logging to show counts of blocked envelopes.
- Refactored code for better readability and maintainability.
- Added necessary `using` directives for new functionality.
2026-11-26 19:40:47 +01:00
8423f95999 Refine envelope query logic in finalization worker
Updated the query in `EnvelopeFinalizationWorker` to:
- Remove the condition `e.Status == EnvelopeStatus.EnvelopeCompletelySigned`.
- Add a check to ensure envelopes have at least one receiver.
- Verify all receivers have corresponding signed history entries.
These changes ensure only valid envelopes are processed.
2026-11-26 17:34:36 +01:00
98ef8005f0 Refactor FinalizeEnvelopeCommand and handler logic
Simplified the `FinalizeEnvelopeCommand` by removing unused properties (`BurnedAllowed` and `SaveDocResult`) and streamlining its structure. Enhanced the `FinalizeEnvelopeCommandHandler` with additional dependencies (`ILogger` and `IRepository<History>`) for logging and history access.

Improved envelope query to include related entities (`Documents.Elements`, `Histories`, and `User`) for comprehensive data processing. Refined validation logic to ensure all receivers have signed the document and added detailed error messages for better user feedback.

Updated document processing to save the signed document (`docResult`) directly to the repository. Enhanced notification handling with improved content, error handling, and logging for both receivers and the sender.

Removed redundant code and updated `EnvelopeFinalizationWorker` to align with the new command structure. These changes improve maintainability, robustness, and clarity of the envelope finalization process.
2026-11-26 17:08:28 +01:00
0dbbbaa207 Add email template support and improve type safety
Updated documentation to include details on the `TBSIG_EMAIL_TEMPLATE` table, its structure, and runtime behavior. Enhanced code by introducing the `IDocument` interface and adding properties/methods to support email templates and document signing workflows. Replaced `int` with the `EnvelopeStatus` enum for improved type safety. Removed unused `Signed` property from `EnvelopeReceiverDto`. Added extension methods for `IDocument` and `IDocReceiverElement` to verify signing status. Updated deployment and troubleshooting guides to highlight email template requirements.
2026-11-26 16:41:52 +01:00
8cd4a1b888 Refactor EnvelopeFinalizationWorker and Program.cs
Reorganized `EnvelopeFinalizationWorker` by changing its namespace from `EnvelopeGenerator.Server.Services` to `EnvelopeGenerator.Server.BackgroundServices` to better reflect its role as a background service. Added placeholder XML documentation comments to the class and its `ExecuteAsync` method.

Simplified service registrations in `Program.cs` by removing fully qualified names for `IEnvelopeAuthService`, `EnvelopeReceiverAuthorizationService`, and `EnvelopeReceiverPageDataService`. Updated the `AddHostedService` call for `EnvelopeFinalizationWorker` to use the simplified class name. Replaced the fully qualified `PdfSharpFontResolver` assignment with a simplified reference.

Removed unused `using` directives, including `DevExpress.Blazor` and others, to clean up the codebase. Added `using EnvelopeGenerator.Server.BackgroundServices` to reference the updated namespace.

These changes improve code readability, reduce redundancy, and align the structure with best practices.
2026-11-25 16:55:11 +01:00
a84712b708 Add Serilog UI access control with allow-list support
Introduced a new `SerilogUiAccessOptions` class to define an allow-list of usernames and emails for accessing the Serilog UI.

Added `SerilogUiSenderAuthorizationFilter` to enforce access control by authenticating requests using the `AuthScheme.Sender` scheme and validating against the configured allow-list.

Updated `Program.cs` to:
- Configure `SerilogUiAccessOptions` from `appsettings.json`.
- Register and apply the `SerilogUiSenderAuthorizationFilter` as an async authorization filter for Serilog UI.
- Add middleware to handle `/serilog-ui` requests and redirect unauthorized users to `/sender`.
- Reintroduce `app.UseSerilogUi()` after the custom middleware.
- Add routes `/log` and `/logs` to redirect to `/serilog-ui`.

Updated `appsettings.json` to include a `SerilogUiAccess` section for configuring allowed users.

These changes ensure that only authenticated and authorized users can access the Serilog UI.
2026-11-25 16:46:13 +01:00
dfeb56aa9c Switch logging framework from NLog to Serilog
Replaced NLog with Serilog for improved logging capabilities.
Updated `EnvelopeGenerator.Server.csproj` to include Serilog
dependencies and removed NLog-related packages. Configured
Serilog with console, file, and SQLite sinks, and integrated
Serilog UI for log viewing.

Modified `Program.cs` to initialize Serilog, added middleware
for request logging and UI, and replaced NLog exception
handling with Serilog's `Log.Fatal`. Updated `appsettings.json`
and `appsettings.Development.json` to include Serilog
configuration and removed NLog-specific settings.

Performed code cleanup by removing unused NLog directives
and adding Serilog-related imports.
2026-11-25 13:47:16 +01:00
b096cb0e00 Update version and adjust WebAssembly build settings
Updated the `EnvelopeGenerator.Server` project version from
`2.0.0-beta` to `2.0.1-beta`, indicating a minor update with
potential bug fixes or improvements.

Modified the `publish.bat` script to enable native builds for
WebAssembly by setting `WasmBuildNative` to `true`. Added the
`WasmEnableSIMD` property and set it to `false` to explicitly
disable SIMD support for WebAssembly builds, likely for
compatibility or performance considerations.
2026-11-24 18:23:26 +01:00
efc9dce2fe Update project version to 2.0.0-beta
Updated the versioning information in `EnvelopeGenerator.Server`:
- Changed `<Version>` from `1.12.0-beta` to `2.0.0-beta`.
- Changed `<FileVersion>` from `1.12.0.0` to `2.0.0.0`.
- Changed `<AssemblyVersion>` from `1.12.0.0` to `2.0.0.0`.

This major version update reflects significant changes or improvements in the project.
2026-11-24 14:48:37 +01:00
0fbaaf0b92 Refactor ReceiverPage for WebAssembly and state persistence
Switched from server-side Blazor (`InteractiveServer`) to client-side WebAssembly (`InteractiveWebAssembly`) rendering for `ReceiverPage` and `ReceiverRejectedPage`.

Refactored dependency injection:
- Removed: `IMediator`, `EnvelopeReceiverAuthorizationService`, `EnvelopeReceiverPageDataService`, `IPdfPageImageRenderer`.
- Added: `DocumentService`, `EnvelopeReceiverService`, `PdfRenderService`, `PersistentComponentState`.

Implemented state persistence using `PersistentComponentState` to improve user experience by restoring page state. Added `ReceiverPageInitialState` class and implemented `IDisposable` for cleanup.

Simplified authorization by replacing claims-based checks with `AuthService.CheckEnvelopeAccessAsync`. Updated service usage to streamline data fetching and PDF rendering.

Refactored `IsRejected` logic to rely solely on `EnvelopeStatus`. Cleaned up unused namespaces and modernized code patterns for better readability and maintainability.

Updated `PdfRenderController` to allow anonymous access to the `RenderPages` endpoint, enabling broader use cases.

Overall, these changes improve maintainability, simplify dependencies, and align the application with a more scalable client-side architecture.
2026-11-24 14:47:46 +01:00
24613bd598 Disable SIMD and remove fallback UI logic
Disabled WebAssembly SIMD support by adding `<WasmEnableSIMD>false</WasmEnableSIMD>` to the project file for compatibility or performance reasons.

Removed the fallback UI and associated JavaScript logic from `App.razor`, including error handling for WebAssembly startup failures and the fallback message display.

Simplified the Blazor startup script by removing error handling and fallback logic, leaving only the basic `window.Blazor.start()` call.
2026-11-24 14:12:17 +01:00
78924e3469 Refactor ReceiverPage styling and improve maintainability
Removed the envelope message icon from ReceiverPage.razor.
Replaced inline signing hint styles with a reusable CSS class
`receiver-signing-hint` for better maintainability. Added the
new class definition in envelope-viewer.css to standardize
styling for signing hints.
2026-11-24 14:01:08 +01:00
fdece11e1d Enhance signature navigation and localization
Added localized strings for navigation and signature-related features in multiple languages. Updated `SenderPdfImageEditor` to support hiding fields, highlighting active fields, and auto-scrolling to active fields. Improved `ReceiverPage` with navigation buttons, signature position display, and better field management.

Introduced a new JavaScript function for smooth scrolling to specific fields and added CSS styling for active field highlighting. Refactored code to simplify field handling and navigation logic. These changes improve the user experience for managing and navigating signature fields.
2026-11-24 13:28:46 +01:00
edf0c9d87f Add localization for receiver signing instructions
Added new localized strings for "Receiver_SignField_ClickToSign" and "Receiver_Signing_Instruction" in `Resource.de-DE.resx`, `Resource.en-US.resx`, and `Resource.fr-FR.resx` to support receiver signing instructions.

Updated `ReceiverPage.razor` to integrate `IStringLocalizer<Resource>` for localization support. Introduced a helper method `L(string key, string fallback)` to fetch localized strings with a fallback mechanism.

Modified `_signatures` rendering logic to display localized signing instructions when applicable. Updated `FieldOverlays` to use the localized string for the signature field label. Enhanced the UI to show a styled message box with signing instructions when not all fields are signed.
2026-11-24 11:56:05 +01:00
4fc00e02e7 Add FieldCursor parameter for customizable cursor styles
Introduced a `FieldCursor` parameter in the `SenderPdfImageEditor`
component to allow customization of the cursor style for fields,
defaulting to `"move"`. Updated the `GetFieldStyle` method to
include this parameter and apply the cursor style dynamically.

Modified the `foreach` loop in `SenderPdfImageEditor.razor` to
pass the `FieldCursor` parameter when rendering fields. Added
a `cursor` CSS property to the inline styles generated by
`GetFieldStyle`.

Updated `ReceiverPage.razor` to pass `"pointer"` as the
`FieldCursor` value to `SenderPdfImageEditor`. Also added
`@onclick:stopPropagation` to prevent click event propagation
from field elements.
2026-11-24 11:49:56 +01:00
e65531db57 Enhance signature field handling in PDF editor
Added a `FieldClick` parameter to `SenderPdfImageEditor` to handle field click events. Introduced `OnFieldClickAsync` to invoke the `FieldClick` callback. Updated `ReceiverPage.razor` to bind `FieldClick` to `OnSignatureFieldClickAsync`.

Enhanced signature application workflow by tracking applied fields with `_appliedSignatureFieldIndexes` and managing pending fields with `_pendingSignatureFieldIndex`. Added `AllSignatureFieldsApplied` to validate submission readiness. Updated `VisibleFieldOverlays` and `SignedOverlays` to reflect applied fields.

Refactored signature popup logic with `SignaturePopupVisible` for better state management. Improved submission validation to ensure all fields are signed before allowing submission. Various minor adjustments to improve user experience and state handling.
2026-11-24 11:35:15 +01:00
43a6837b9e Add support for restoring image signatures
Enhanced ReceiverPage.razor to display and manage the last uploaded image file name. Introduced `_savedImageFileName` to track the selected image file and render it conditionally in the UI. Added methods to restore and clear image signature states (`RestoreImageSignatureIfAvailableAsync` and `ClearSignatureTabStateAsync`).

Updated `receiver-signature.js` to improve image signature handling:
- Added `getSelectedImageFileName` to retrieve the selected file name.
- Added `loadExistingImageSignature` to render saved image signatures.
- Improved `initializeImage` to prevent duplicate event listeners.

Exposed new functions in the public API of `receiver-signature.js` and ensured proper state management for image signatures across tabs.
2026-11-23 16:04:43 +01:00
530bb7055a Add BlazorServerOptions for SignalR message size config
Introduced a new `BlazorServerOptions` class to manage Blazor Server runtime configuration. Added support for configuring the maximum SignalR message size via `appsettings.json` under the `BlazorServer` section. Updated `Program.cs` to apply this configuration to SignalR hub options and register `BlazorServerOptions` with the DI container.
2026-11-23 15:33:08 +01:00
f123d9e785 Center canvas elements in ReceiverPage.razor
Updated the `style` attribute of `<canvas>` elements to include `display: block;` and `margin: 0 auto;`, ensuring horizontal centering. Changes applied to `rp-typed-signature-pad` and `rp-image-signature-pad`.
2026-11-23 15:26:38 +01:00
37c370266e Preserve last active signature tab in popup
Added `_lastSavedSignatureTab` to store the last active signature tab. Updated `OpenSignaturePopup` to restore the last tab if a signature exists. Updated signature submission logic to save the current tab before closing the popup.
2026-11-23 14:58:05 +01:00
262798f256 Adjust z-index value in element style calculation
Reduced the z-index from 40 to 30 in the return statement of a method to modify the stacking order of the element. This change may affect how the element overlaps with others on the page.
2026-11-23 14:55:33 +01:00
7e16f9612b Improve signature restoration and event handling
Added `RestoreDrawSignatureIfAvailableAsync` in `ReceiverPage.razor` to restore previously captured signatures on the "Draw" tab using `JSRuntime`. Updated `OnPopupShownAsync` and `SetSignatureTabAsync` to invoke this method.

In `receiver-signature.js`, fixed comment formatting and added `_detachPad` to cleanly remove event listeners from signature pads. Updated `initialize` to handle reinitialization of canvases by detaching old event listeners and reattaching new ones, preventing redundant listeners and ensuring proper cleanup.

These changes enhance signature restoration functionality and improve event listener management to prevent memory leaks and ensure robust behavior.
2026-11-23 14:42:42 +01:00
97c6190cba Improve DxPopup usability with enhanced close options
The `CloseOnOutsideClick` property was set to `true`, allowing the popup to close when clicking outside of it. The `ShowCloseButton` property was also set to `true`, enabling the display of a close button. Additionally, the `CloseOnEscape` property was set to `true`, allowing the popup to close when the Escape key is pressed.

These changes enhance the user experience by providing multiple intuitive ways to close the popup, making it more user-friendly.
2026-11-23 14:27:02 +01:00
f110772700 Increase signature canvas size and improve styling
Updated the signature popup and canvas dimensions in `ReceiverPage.razor` to enhance usability. Increased the height of all signature canvases to 360px and adjusted styles for better alignment and display.

Refined `envelope-viewer.css` by modifying the `sender-image-editor__signature-image-wrap` class to reduce flex size and padding. Added a new class for signature images to ensure proper scaling and object-fit behavior. Improved spacing and readability in `sender-image-editor__signature-meta` and introduced a new `sender-image-editor__signature-place` class for styling the signature place with italic font and smaller size.
2026-11-23 14:06:24 +01:00
e6ee3098a5 Add signature overlay and submission functionality
Enhanced `SenderPdfImageEditor` to render signature overlays
with dynamic positioning and metadata display. Introduced
`SenderPdfSignatureOverlay` record to represent signature
data. Updated `ReceiverPage` to integrate signature capture
and submission, including a confirmation popup and error
handling. Removed legacy signature caching logic.

Added new state variables and computed properties to manage
signature overlays and submission state. Marked legacy
`ReceiverSignedPage` route as obsolete. Improved styling in
`envelope-viewer.css` for signature overlays.
2026-11-23 12:40:07 +01:00
e43386ef4f Add conditional field removal and overlay improvements
Updated `SenderPdfImageEditor` to conditionally display the "Remove" button using a new `ShowFieldRemoveButton` parameter. Integrated dynamic field overlays in `ReceiverPage` and `ReceiverSignedPage` using `SenderPdfFieldOverlay`. Removed `DrawSignaturePlaceholders` method and simplified `_displayPdfBytes` assignment. Added a guard clause in `OnFieldMouseDownAsync` to prevent unnecessary execution.
2026-11-20 13:38:59 +01:00
d2e8a01068 Refactor PDF rendering: replace DxReportViewer
Replaced DevExpress DxReportViewer and XtraReport with a custom
solution using SenderPdfImageEditor and PdfPageImageRenderer.
PDF handling now uses byte arrays and renders pages as images,
removing dependencies on DevExpress reporting components.

- Removed DxReportViewer and XtraReport usage.
- Introduced SenderPdfImageEditor for PDF rendering.
- Added PdfPageImageRenderer for rendering pages as images.
- Removed BuildReport and DataUrlToBytes methods.
- Updated CSS and JavaScript references.
- Simplified navigation and state management.
- Refactored signature handling logic.
- Removed IDisposable implementation.
2026-11-20 13:02:00 +01:00
712fdb61d3 Improve Blazor WASM error handling and bump version
Enhanced error handling in Blazor WebAssembly startup:
- Added `getErrorText` to extract error messages.
- Introduced `isWasmStartupFailure` for WASM-specific errors.
- Updated `showStartupFallback` to prevent duplicate execution.
- Refined event listeners for `unhandledrejection` and `error`.
- Removed unused `started` variable.

Updated `EnvelopeGenerator.Server.csproj` version numbers:
- `Version` to 1.12.0-beta.
- `FileVersion` to 1.12.0.0.
- `AssemblyVersion` to 1.12.0.0.
2026-11-19 19:56:45 +01:00
ee89a794ea Add fallback UI, HTTP warning, and disable Wasm native builds
Added a fallback UI in `App.razor` to handle startup failures, including a message for unsupported browsers and a reload button. Updated `blazor.web.js` to use `autostart="false"` and added JavaScript for error handling.

Introduced an HTTP warning in `LoginReceiverPage.razor` to alert users when using an unencrypted connection. Added the `IsSecureRequest` property to determine if the request is secure.

Disabled native WebAssembly builds by setting `<WasmBuildNative>` to `false` in `EnvelopeGenerator.Server.Client.csproj` and `publish.bat`.

Incremented version numbers in `EnvelopeGenerator.Server.csproj` to `1.11.0-beta`. Added new CSS classes for styling the fallback UI.
2026-11-18 16:23:40 +01:00