refactor(webui): modularize file viewer components into registry-driven architecture

This commit is contained in:
yiling
2026-07-05 10:51:42 +08:00
parent 229070fe19
commit 4cc35d3453
28 changed files with 1161 additions and 1043 deletions
@@ -0,0 +1,16 @@
import { FileTypeDefinition } from '../types'
import ImageViewer from './image-viewer'
import { CompareImagePane } from './compare-image-pane'
export const imageTypeDefinition: FileTypeDefinition = {
id: 'image',
name: 'Image',
match: (file) => !!file.mediaType?.startsWith('image/'),
viewer: ImageViewer,
comparePane: CompareImagePane,
commentsConfig: {
hasTimestamp: false,
hasAnnotations: true,
hasAiBots: true,
},
}