1
0
Fork 0
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:
Fedor Katurov 2019-10-16 12:46:52 +07:00
parent 38a4c8e6a6
commit 770f3cb2aa
11 changed files with 137 additions and 31 deletions

View file

@ -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,
};

View file

@ -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;

View file

@ -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;

View file

@ -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;