mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
* It is now possible to follow a post in order to receive updates about it * Notifications are now sent when updates are published * Post status changes are now tracked * Update sidebar now shows the post status history * Mark a comment as a post update using the comment form * ... more ...
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
export const TOGGLE_COMMENT_REPLY = 'TOGGLE_COMMENT_REPLY';
|
|
interface ToggleCommentReplyAction {
|
|
type: typeof TOGGLE_COMMENT_REPLY;
|
|
commentId: number;
|
|
}
|
|
|
|
export const SET_COMMENT_REPLY_BODY = 'SET_COMMENT_REPLY_BODY';
|
|
interface SetCommentReplyBodyAction {
|
|
type: typeof SET_COMMENT_REPLY_BODY;
|
|
commentId: number;
|
|
body: string;
|
|
}
|
|
|
|
export const TOGGLE_COMMENT_IS_POST_UPDATE_FLAG = 'TOGGLE_COMMENT_IS_POST_UPDATE_FLAG';
|
|
interface ToggleCommentIsPostUpdateFlag {
|
|
type: typeof TOGGLE_COMMENT_IS_POST_UPDATE_FLAG;
|
|
commentId: number;
|
|
}
|
|
|
|
export const toggleCommentReply = (commentId: number): ToggleCommentReplyAction => ({
|
|
type: TOGGLE_COMMENT_REPLY,
|
|
commentId,
|
|
});
|
|
|
|
export const setCommentReplyBody = (commentId: number, body: string): SetCommentReplyBodyAction => ({
|
|
type: SET_COMMENT_REPLY_BODY,
|
|
commentId,
|
|
body,
|
|
});
|
|
|
|
export const toggleCommentIsPostUpdateFlag = (commentId: number): ToggleCommentIsPostUpdateFlag => ({
|
|
type: TOGGLE_COMMENT_IS_POST_UPDATE_FLAG,
|
|
commentId,
|
|
});
|
|
|
|
export type HandleCommentRepliesType =
|
|
ToggleCommentReplyAction |
|
|
SetCommentReplyBodyAction |
|
|
ToggleCommentIsPostUpdateFlag; |