import { layout, escHtml } from './layout.ts'; import type { FileRow } from '../db/files.ts'; export function fileViewPage(file: FileRow, isOwner: boolean): string { const rawUrl = escHtml(`/f/${file.id}/raw`); const safeName = escHtml(file.original_name); const actions = `
`; const deleteForm = isOwner ? `` : ''; let media = ''; if (file.mime_type.startsWith('image/')) { media = `