Files
Starlight_Lancher/apps/app-frontend/src/providers/setup/image-viewer-editor.ts
T
AxTps 1b487da5c2
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
fix: 修复截图中心菜单/编辑不可用与导航项缺中文
2026-10-02 13:20:04 +08:00

16 lines
440 B
TypeScript

import {
type ImageViewerEditorData,
type ImageViewerEditorSource,
provideImageViewerEditor,
} from '@modrinth/ui'
import { readFile } from '@tauri-apps/plugin-fs'
export function setupImageViewerEditorProvider() {
provideImageViewerEditor({
async loadEditorData(source: ImageViewerEditorSource): Promise<ImageViewerEditorData> {
return {
source: new Blob([await readFile(source.path)], { type: 'image/png' }),
}
},
})
}