diff --git a/web/static/dev.html b/web/static/dev.html index f52d706..ae1a453 100644 --- a/web/static/dev.html +++ b/web/static/dev.html @@ -222,6 +222,74 @@ #new-task-modal .err { color: var(--accent); font-size: 12px; margin-top: 8px; min-height: 1em; } #new-task-modal .actions { margin-top: 14px; display: flex; gap: 8px; justify-content: flex-end; } + /* ───── file preview modal ───── */ + #file-preview-modal { + position: fixed; inset: 0; background: rgba(0,0,0,0.5); + display: none; align-items: center; justify-content: center; z-index: 90; + } + #file-preview-modal.show { display: flex; } + #file-preview-modal .card { + background: var(--panel); border-radius: 6px; + width: 90vw; height: 90vh; max-width: 1200px; + display: flex; flex-direction: column; + box-shadow: 0 8px 24px rgba(0,0,0,.2); + } + #file-preview-modal .hdr { + display: flex; align-items: center; gap: 8px; + padding: 8px 12px; border-bottom: 1px solid var(--border); + } + #file-preview-modal .hdr .name { + flex: 1; font-weight: 500; overflow: hidden; + text-overflow: ellipsis; white-space: nowrap; + } + #file-preview-modal .body { + flex: 1; overflow: auto; padding: 12px; position: relative; + } + #file-preview-modal .body.center { + display: flex; align-items: center; justify-content: center; + } + #file-preview-modal .body .ph { + color: var(--muted); font-size: 13px; text-align: center; + } + #file-preview-modal .body img.preview-img { + max-width: 100%; max-height: 100%; object-fit: contain; + display: block; margin: 0 auto; + } + #file-preview-modal .body iframe.preview-frame { + width: 100%; height: 100%; border: 0; + } + #file-preview-modal .body pre.preview-text { + margin: 0; padding: 8px; background: var(--code-bg); + border-radius: 4px; white-space: pre-wrap; word-break: break-word; + font-family: ui-monospace, "SF Mono", Consolas, monospace; + font-size: 12px; line-height: 1.5; + } + #file-preview-modal .body .md-render { + max-width: 860px; margin: 0 auto; line-height: 1.7; + } + #file-preview-modal .body .md-render pre { + background: var(--code-bg); padding: 10px; border-radius: 4px; overflow: auto; + } + #file-preview-modal .body .md-render code { background: var(--code-bg); padding: 1px 4px; border-radius: 3px; } + #file-preview-modal .body .md-render pre code { background: transparent; padding: 0; } + #file-preview-modal .body .docx-host { background: #fff; } + #file-preview-modal .body .xlsx-tabs { + display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; + border-bottom: 1px solid var(--border); padding-bottom: 6px; + } + #file-preview-modal .body .xlsx-tabs button.active { + background: var(--accent-soft); border-color: var(--accent); color: var(--accent); + } + #file-preview-modal .body .xlsx-sheet { + overflow: auto; + } + #file-preview-modal .body .xlsx-sheet table { + border-collapse: collapse; font-size: 12px; + } + #file-preview-modal .body .xlsx-sheet td, #file-preview-modal .body .xlsx-sheet th { + border: 1px solid var(--border); padding: 4px 8px; white-space: nowrap; + } + .small { font-size: 12px; } .muted { color: var(--muted); } @@ -357,6 +425,19 @@ + +