mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-11 18:10:10 +08:00
19 lines
689 B
TypeScript
19 lines
689 B
TypeScript
import type { AppDescriptor } from '../types';
|
|
import { ImageViewerApp } from './ImageViewer.tsx';
|
|
|
|
export const descriptor: AppDescriptor = {
|
|
key: 'image-viewer',
|
|
name: '图片查看器',
|
|
iconUrl: 'https://api.iconify.design/mdi:image.svg',
|
|
supported: (entry) => {
|
|
if (entry.is_dir) return false;
|
|
const ext = entry.name.split('.').pop()?.toLowerCase() || '';
|
|
return ['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg', 'bmp', 'ico', 'avif', 'arw', 'cr2', 'cr3', 'nef', 'rw2', 'orf', 'pef', 'dng'].includes(ext);
|
|
},
|
|
component: ImageViewerApp,
|
|
default: true,
|
|
defaultMaximized:true,
|
|
useSystemWindow:false,
|
|
defaultBounds: { width: 820, height: 620, x: 140, y: 96 }
|
|
};
|