Add signature navigation to PDF viewer toolbar
This commit introduces a signature navigation feature in the PDF viewer: - Removed zoom preset buttons to make space for the new toolbar. - Added "Previous" and "Next" buttons for navigating signatures. - Displayed a signature counter with signed/total signatures and a badge for unsigned signatures or completion status. - Introduced state variables (`_totalSignatures`, `_signedSignatures`, `_unsignedSignatures`) to track signature progress. - Implemented methods for navigating signatures (`GoToPreviousSignature`, `GoToNextSignature`, `UpdateSignatureCounterAsync`). - Enhanced JavaScript with `getSignatureNavState`, `goToNextSignature`, and `goToPreviousSignature` for navigation logic. - Updated CSS for the toolbar and signature navigation, including responsive adjustments and hover effects. - Improved error handling during signature counter updates. - Updated `RenderSignatureButtonsAsync` to refresh the signature counter after rendering. These changes improve the user experience by enabling efficient navigation and tracking of signatures in the PDF viewer.
This commit is contained in:
@@ -216,30 +216,32 @@ body.resizing {
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
backdrop-filter: blur(20px);
|
||||
border-radius: 12px;
|
||||
padding: 0.75rem 1.75rem;
|
||||
padding: 0.75rem 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 2rem;
|
||||
gap: 1.5rem;
|
||||
box-shadow:
|
||||
0 4px 16px rgba(0, 0, 0, 0.1),
|
||||
0 0 0 1px rgba(126, 34, 206, 0.1);
|
||||
border: 1px solid rgba(126, 34, 206, 0.15);
|
||||
flex-shrink: 0;
|
||||
width: 90%;
|
||||
max-width: 1200px;
|
||||
width: 95%;
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
.pdf-toolbar__section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pdf-toolbar__zoom-section {
|
||||
gap: 0.75rem;
|
||||
flex: 1;
|
||||
max-width: 500px;
|
||||
max-width: 400px;
|
||||
min-width: 280px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -341,8 +343,8 @@ body.resizing {
|
||||
.pdf-toolbar__zoom-slider {
|
||||
-webkit-appearance: none;
|
||||
width: 100%;
|
||||
min-width: 240px;
|
||||
max-width: 450px;
|
||||
min-width: 180px;
|
||||
max-width: 350px;
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
background: linear-gradient(90deg,
|
||||
@@ -395,6 +397,71 @@ body.resizing {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Signature Navigation Styles */
|
||||
.pdf-toolbar__signature-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
background: linear-gradient(135deg, rgba(126, 34, 206, 0.05) 0%, rgba(42, 82, 152, 0.05) 100%);
|
||||
border: 1px solid rgba(126, 34, 206, 0.2);
|
||||
border-radius: 10px;
|
||||
padding: 0.25rem 0.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pdf-toolbar__btn--signature-nav {
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
padding: 0.25rem;
|
||||
background: white;
|
||||
border: 1px solid rgba(126, 34, 206, 0.25);
|
||||
}
|
||||
|
||||
.pdf-toolbar__btn--signature-nav:hover:not(:disabled) {
|
||||
background: linear-gradient(135deg, #7e22ce 0%, #2a5298 100%);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.pdf-toolbar__btn--signature-nav:hover:not(:disabled) svg {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.pdf-toolbar__signature-counter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
padding: 0 0.375rem;
|
||||
}
|
||||
|
||||
.pdf-toolbar__signature-counter svg {
|
||||
color: #7e22ce;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pdf-toolbar__signature-counter-text {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pdf-toolbar__signature-badge {
|
||||
font-size: 0.625rem;
|
||||
font-weight: 700;
|
||||
padding: 0.1875rem 0.5rem;
|
||||
border-radius: 5px;
|
||||
background: linear-gradient(135deg, rgba(126, 34, 206, 0.1) 0%, rgba(42, 82, 152, 0.1) 100%);
|
||||
color: #7e22ce;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pdf-toolbar__signature-badge--complete {
|
||||
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
|
||||
color: #059669;
|
||||
}
|
||||
|
||||
.pdf-frame {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
|
||||
Reference in New Issue
Block a user