FileManager use fuse
This commit is contained in:
@@ -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",
|
||||
})
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
export interface Filename {
|
||||
name: string
|
||||
height: number
|
||||
width: number
|
||||
ctime: number
|
||||
mtime: number
|
||||
}
|
||||
|
||||
export interface ModelInfo {
|
||||
name: string
|
||||
path: string
|
||||
|
||||
Reference in New Issue
Block a user