feat: PDF, markdown, and text inline preview with dark mode#179
Open
zjean wants to merge 15 commits intoAtalayaLabs:mainfrom
Open
feat: PDF, markdown, and text inline preview with dark mode#179zjean wants to merge 15 commits intoAtalayaLabs:mainfrom
zjean wants to merge 15 commits intoAtalayaLabs:mainfrom
Conversation
Add PDF.js v5.5.207 prebuilt viewer for enhanced PDF preview, marked.js v15 for GitHub-flavored markdown rendering, and highlight.js v11 for syntax highlighting in code blocks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add maximize/minimize button to toolbar. Toggle with click or F key. Escape exits fullscreen first, then closes modal on second press. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Mozilla PDF.js prebuilt viewer for full-featured PDF preview with search, page navigation, thumbnails sidebar, and zoom. Add OxiCloud theme overrides for toolbar colors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Render markdown files (.md, .markdown, .mdown, .mkd) as formatted HTML with GitHub-flavored markdown support (tables, task lists, strikethrough, autolinks). Code blocks get syntax highlighting via highlight.js. Libraries are lazy-loaded on first use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add [data-theme="dark"] styles for modal content, header, toolbar, controls, text viewer, and audio player. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. PDFs now bypass wopiEditor.canEdit() and always open in PDF.js viewer, regardless of WOPI configuration. 2. Fix null reference in toggleFullscreen() — use 'button.inline- viewer-fullscreen i' selector to avoid matching the fullscreen state class on .inline-viewer-content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Blob URLs for audio and video playback were blocked by CSP because media-src fell back to default-src 'self'. Add explicit media-src directive allowing blob: URLs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use i18n for "Modified" and "Folder" labels in grid card view - Translate error fallback list headers in filesView - Add dark mode colors for language selector .lang-code, icon and arrow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use i18n for upload notification text (uploading, complete, files label)
- Add proper nested upload.* translation keys to all 9 locales
- Fix {{double brace}} interpolation syntax for i18n params
- Add missing "markdown" file type to all locale files
- Bump service worker cache version to v16
Fixes AtalayaLabs#108
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add wasm-unsafe-eval, unsafe-inline styles, and blob: connect-src needed by PDF.js rendering and inline markdown/code highlighting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Support ?download=true to force Content-Disposition: attachment - Simplify viewer setup and use download param for file downloads Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change list view display from block to flex for proper column alignment - Remove duplicate display:flex declaration in fileList.css Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Text, markdown, PDF, audio, video and image files now open in the inline viewer instead of being intercepted by the WOPI editor. Bump SW cache to v17. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The inlineViewer had a duplicate WOPI intercept that didn't check for text-viewable files, causing .txt files to be sent to Collabora instead of the built-in text viewer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blob:for media, PDF.js worker) while keeping strict defaultsChanges
Backend
file_handler.rs: Support?download=truequery param for inline vs download content dispositionmain.rs: Serve/vendor/static assets for PDF.js, marked, and highlight.jsFrontend
Vendor libraries (new)
Test plan
.pdffile → should render in PDF.js viewer.mdfile → should render as formatted markdown with syntax highlighting.txtfile → should render in plain text viewer (not Collabora).docxfile → should still open in Collabora/WOPI editor🤖 Generated with Claude Code