Add document viewer
This commit is contained in:
@@ -1369,6 +1369,131 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ======================== */
|
||||
/* Document Viewer Modal */
|
||||
/* ======================== */
|
||||
|
||||
.doc-viewer-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(4px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.doc-viewer-modal {
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
width: auto;
|
||||
min-width: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.doc-viewer-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.doc-viewer-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.doc-viewer-close {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
padding: 0 4px;
|
||||
flex-shrink: 0;
|
||||
margin-left: 12px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.doc-viewer-close:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.doc-viewer-body {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.doc-viewer-loading,
|
||||
.doc-viewer-error {
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
padding: 40px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.doc-viewer-error {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.doc-viewer-image {
|
||||
max-width: 100%;
|
||||
max-height: calc(90vh - 80px);
|
||||
object-fit: contain;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.doc-viewer-audio {
|
||||
width: 100%;
|
||||
min-width: 300px;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.doc-viewer-pdf {
|
||||
width: 80vw;
|
||||
height: calc(90vh - 80px);
|
||||
max-width: 100%;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.doc-viewer-text {
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
color: var(--text-primary);
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
max-height: calc(90vh - 120px);
|
||||
overflow-y: auto;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ======================== */
|
||||
/* Responsive (<=768px) */
|
||||
/* ======================== */
|
||||
@@ -1532,6 +1657,23 @@
|
||||
.doc-detail-row-inline > div[style*="grid-column"] {
|
||||
grid-column: auto !important;
|
||||
}
|
||||
|
||||
.doc-viewer-overlay {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.doc-viewer-modal {
|
||||
max-width: 100vw;
|
||||
max-height: 100vh;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.doc-viewer-pdf {
|
||||
width: 100%;
|
||||
height: calc(100vh - 80px);
|
||||
}
|
||||
}
|
||||
|
||||
/* ======================== */
|
||||
|
||||
Reference in New Issue
Block a user