support preview img,audio,video for FileDetail.vue
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Model, Page, UserView } from "timi-web";
|
||||
import { Model, Page, PrismjsType, UserView } from "timi-web";
|
||||
|
||||
export type Repository = {
|
||||
id: number;
|
||||
@ -61,3 +61,30 @@ export type File = {
|
||||
|
||||
children: boolean;
|
||||
}
|
||||
|
||||
export enum FileViewerType {
|
||||
|
||||
NOT_SUPPORT = "NOT_SUPPORT",
|
||||
AUDIO = "AUDIO",
|
||||
VIDEO = "VIDEO",
|
||||
IMAGE = "IMAGE",
|
||||
TEXT = "TEXT",
|
||||
CODE = "CODE",
|
||||
MARKDOWN = "MARKDOWN",
|
||||
}
|
||||
|
||||
export type OpenFile = {
|
||||
|
||||
path: string;
|
||||
name: string;
|
||||
raw?: ArrayBuffer;
|
||||
rawURL: string;
|
||||
rawFile: File;
|
||||
data?: string;
|
||||
removable: boolean;
|
||||
isPreview: boolean;
|
||||
activatedAt?: number;
|
||||
mimeType?: string;
|
||||
viewerType?: FileViewerType;
|
||||
prismjsType?: PrismjsType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user