mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
added promoted switch button
This commit is contained in:
parent
25dade6c67
commit
c731bb9ad0
10 changed files with 153 additions and 34 deletions
|
@ -15,6 +15,7 @@ import { EditorUploadCoverButton } from '~/components/editors/EditorUploadCoverB
|
|||
import { modalShowPhotoswipe } from '../modal/actions';
|
||||
import { IEditorComponentProps } from '~/redux/node/types';
|
||||
import { EditorFiller } from '~/components/editors/EditorFiller';
|
||||
import { EditorPublicSwitch } from '~/components/editors/EditorPublicSwitch';
|
||||
|
||||
const prefix = 'NODE.';
|
||||
export const NODE_ACTIONS = {
|
||||
|
@ -63,6 +64,8 @@ export const EMPTY_NODE: INode = {
|
|||
|
||||
blocks: [],
|
||||
tags: [],
|
||||
is_public: true,
|
||||
is_promoted: true,
|
||||
|
||||
flow: {
|
||||
display: 'single',
|
||||
|
@ -120,14 +123,20 @@ export const NODE_EDITORS = {
|
|||
};
|
||||
|
||||
export const NODE_PANEL_COMPONENTS: Record<string, FC<IEditorComponentProps>[]> = {
|
||||
[NODE_TYPES.TEXT]: [EditorFiller, EditorUploadCoverButton],
|
||||
[NODE_TYPES.VIDEO]: [EditorFiller, EditorUploadCoverButton],
|
||||
[NODE_TYPES.IMAGE]: [EditorImageUploadButton, EditorFiller, EditorUploadCoverButton],
|
||||
[NODE_TYPES.TEXT]: [EditorFiller, EditorUploadCoverButton, EditorPublicSwitch],
|
||||
[NODE_TYPES.VIDEO]: [EditorFiller, EditorUploadCoverButton, EditorPublicSwitch],
|
||||
[NODE_TYPES.IMAGE]: [
|
||||
EditorImageUploadButton,
|
||||
EditorFiller,
|
||||
EditorUploadCoverButton,
|
||||
EditorPublicSwitch,
|
||||
],
|
||||
[NODE_TYPES.AUDIO]: [
|
||||
EditorAudioUploadButton,
|
||||
EditorImageUploadButton,
|
||||
EditorFiller,
|
||||
EditorUploadCoverButton,
|
||||
EditorPublicSwitch,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
@ -124,6 +124,8 @@ export interface INode {
|
|||
description?: string;
|
||||
is_liked?: boolean;
|
||||
is_heroic?: boolean;
|
||||
is_promoted?: boolean;
|
||||
is_public?: boolean;
|
||||
like_count?: number;
|
||||
|
||||
flow: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue