mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
removing uploaded files
This commit is contained in:
parent
38a4c8e6a6
commit
770f3cb2aa
11 changed files with 137 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
import { ValueOf } from '~/redux/types';
|
||||
import { EditorDialog } from '~/containers/dialogs/EditorDialog';
|
||||
import { EditorDialogImage } from '~/containers/editors/EditorDialogImage';
|
||||
import { LoginDialog } from '~/containers/dialogs/LoginDialog';
|
||||
|
||||
export const MODAL_ACTIONS = {
|
||||
|
@ -14,7 +14,7 @@ export const DIALOGS = {
|
|||
};
|
||||
|
||||
export const DIALOG_CONTENT = {
|
||||
[DIALOGS.EDITOR_IMAGE]: EditorDialog,
|
||||
[DIALOGS.EDITOR_IMAGE]: EditorDialogImage,
|
||||
[DIALOGS.LOGIN]: LoginDialog,
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { FC } from 'react';
|
||||
import { IBlock, INode, ValueOf, IComment } from '../types';
|
||||
import { NodeImageBlock } from '~/components/node/NodeImageBlock';
|
||||
import { ImageEditor } from '~/components/editors/ImageEditor';
|
||||
|
||||
const prefix = 'NODE.';
|
||||
export const NODE_ACTIONS = {
|
||||
|
@ -74,3 +75,9 @@ export const EMPTY_COMMENT: IComment = {
|
|||
is_private: false,
|
||||
user: null,
|
||||
};
|
||||
|
||||
export const NODE_EDITORS = {
|
||||
[NODE_TYPES.IMAGE]: ImageEditor,
|
||||
};
|
||||
|
||||
export const MAX_NODE_FILES = 16;
|
||||
|
|
|
@ -58,7 +58,7 @@ export type UUID = string;
|
|||
export type IUploadType = 'image' | 'text' | 'audio' | 'video' | 'other';
|
||||
|
||||
export interface IFile {
|
||||
id?: UUID;
|
||||
id?: number;
|
||||
temp_id?: UUID;
|
||||
user_id?: UUID;
|
||||
node_id?: UUID;
|
||||
|
|
|
@ -6,7 +6,7 @@ export interface IUploadStatus {
|
|||
is_uploading: boolean;
|
||||
error: string;
|
||||
preview: string;
|
||||
uuid: UUID;
|
||||
uuid: IFile['id'];
|
||||
url: string;
|
||||
type: string;
|
||||
thumbnail_url: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue