FileManager use fuse

This commit is contained in:
Qing
2023-12-29 10:59:09 +08:00
parent 0c985a431b
commit 85c3397b97
5 changed files with 35 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
import { ModelInfo, PowerPaintTask, Rect } from "@/lib/types"
import { Filename, ModelInfo, PowerPaintTask, Rect } from "@/lib/types"
import { Settings } from "@/lib/states"
import { srcToFile } from "@/lib/utils"
import axios from "axios"
@@ -186,7 +186,7 @@ export async function getMediaFile(tab: string, filename: string) {
throw new Error(errMsg)
}
export async function getMedias(tab: string) {
export async function getMedias(tab: string): Promise<Filename[]> {
const res = await fetch(`${API_ENDPOINT}/medias/${tab}`, {
method: "GET",
})

View File

@@ -1,3 +1,11 @@
export interface Filename {
name: string
height: number
width: number
ctime: number
mtime: number
}
export interface ModelInfo {
name: string
path: string