mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
99: fixed comments for SWR node
This commit is contained in:
parent
a1dfcc6048
commit
6964324ffb
13 changed files with 149 additions and 268 deletions
|
@ -47,7 +47,7 @@ export const nodePostLocalComment = (
|
|||
nodeId,
|
||||
comment,
|
||||
callback,
|
||||
type: NODE_ACTIONS.POST_COMMENT,
|
||||
type: NODE_ACTIONS.POST_LOCAL_COMMENT,
|
||||
});
|
||||
|
||||
export const nodeSetSendingComment = (is_sending_comment: boolean) => ({
|
||||
|
@ -60,34 +60,6 @@ export const nodeSetComments = (comments: IComment[]) => ({
|
|||
type: NODE_ACTIONS.SET_COMMENTS,
|
||||
});
|
||||
|
||||
export const nodeUpdateTags = (id: INode['id'], tags: string[]) => ({
|
||||
type: NODE_ACTIONS.UPDATE_TAGS,
|
||||
id,
|
||||
tags,
|
||||
});
|
||||
|
||||
export const nodeDeleteTag = (id: INode['id'], tagId: ITag['ID']) => ({
|
||||
type: NODE_ACTIONS.DELETE_TAG,
|
||||
id: id!,
|
||||
tagId,
|
||||
});
|
||||
|
||||
export const nodeSetTags = (tags: ITag[]) => ({
|
||||
type: NODE_ACTIONS.SET_TAGS,
|
||||
tags,
|
||||
});
|
||||
|
||||
export const nodeCreate = (node_type: INode['type'], isLab?: boolean) => ({
|
||||
type: NODE_ACTIONS.CREATE,
|
||||
node_type,
|
||||
isLab,
|
||||
});
|
||||
|
||||
export const nodeEdit = (id: INode['id']) => ({
|
||||
type: NODE_ACTIONS.EDIT,
|
||||
id,
|
||||
});
|
||||
|
||||
export const nodeLike = (id: INode['id']) => ({
|
||||
type: NODE_ACTIONS.LIKE,
|
||||
id,
|
||||
|
@ -104,17 +76,13 @@ export const nodeLock = (id: INode['id'], is_locked: boolean) => ({
|
|||
is_locked,
|
||||
});
|
||||
|
||||
export const nodeLockComment = (id: IComment['id'], is_locked: boolean) => ({
|
||||
export const nodeLockComment = (id: number, is_locked: boolean, nodeId: number) => ({
|
||||
type: NODE_ACTIONS.LOCK_COMMENT,
|
||||
nodeId,
|
||||
id,
|
||||
is_locked,
|
||||
});
|
||||
|
||||
export const nodeEditComment = (id: IComment['id']) => ({
|
||||
type: NODE_ACTIONS.EDIT_COMMENT,
|
||||
id,
|
||||
});
|
||||
|
||||
export const nodeSetEditor = (editor: INode) => ({
|
||||
type: NODE_ACTIONS.SET_EDITOR,
|
||||
editor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue