From 658495be3d37df012fc2d33982ba2c0c950cf9a4 Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Tue, 9 Jun 2026 15:41:13 -0400 Subject: [PATCH] feat(MediaManager): add support for 'doc' view mode and corresponding icon --- src/app/components/MediaManager.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/MediaManager.tsx b/src/app/components/MediaManager.tsx index 7219866..da80131 100644 --- a/src/app/components/MediaManager.tsx +++ b/src/app/components/MediaManager.tsx @@ -40,6 +40,7 @@ import { Trash2, Upload, X, + Book, } from 'lucide-react'; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism'; @@ -155,6 +156,7 @@ function ViewerModeIcon({ mode, className }: { mode: ViewMode; className?: strin case 'hex': return ; case 'image': return ; case 'config': return ; + case 'doc': return ; } } @@ -624,6 +626,7 @@ export default function MediaManager({ initialPath = '/', rootPath, title, confi if (renameEntry !== null) return; if (entry.type === 'folder') { navigateTo(joinPath(path, entry.name)); return; } const targetMode = mode ?? defaultViewMode(entry); + if (targetMode === 'doc') { window.open(getWebDAVBaseUrl() + entry.path, '_blank'); return; } setViewEntry(entry); setViewMode(targetMode); setViewText(null);