feat: Add UI and logic to handle password-protected PDF documents.
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.document-viewer-panel__body > .document-viewer,
|
||||
.document-viewer-panel__body > .document-viewer--loading {
|
||||
.document-viewer-panel__body>.document-viewer,
|
||||
.document-viewer-panel__body>.document-viewer--loading {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
flex: 1;
|
||||
grid-area: details;
|
||||
}
|
||||
|
||||
.document-viewer__tabs-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -564,11 +565,69 @@
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.document-viewer__summary-tab-content {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.pdf-viewer__page-wrapper--contain .pdf-viewer__page {
|
||||
width: auto;
|
||||
max-width: 100vw;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: var(--surface-subtle);
|
||||
}
|
||||
|
||||
.pdf-viewer__password-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 2rem;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow-pop);
|
||||
max-width: 400px;
|
||||
margin: 1rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-message {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
color: var(--fg);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-input-group {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-input-group .button {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 0.5rem;
|
||||
border: 1px solid var(--outline);
|
||||
border-radius: 0.25rem;
|
||||
font-size: 1rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pdf-viewer__password-error {
|
||||
color: var(--danger);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
Reference in New Issue
Block a user