feat: Add post actions dropdown menu

Adds a dropdown menu for comments and posts to perform actions like pinning, unpinning, reporting etc.
This commit is contained in:
Kshitij Sobti
2021-09-11 11:47:27 +05:30
parent 669aa22400
commit 5db87f54bb
19 changed files with 578 additions and 253 deletions

View File

@@ -12,6 +12,27 @@ export const ThreadType = {
DISCUSSION: 'discussion',
};
/**
* Edit actions for posts and comments
* @readonly
* @enum {string}
*/
export const ContentActions = {
EDIT_CONTENT: 'raw_body',
PIN: 'pin',
ENDORSE: 'endorsed',
CLOSE: 'closed',
REPORT: 'abuse_flagged',
DELETE: 'delete',
FOLLOWING: 'following',
CHANGE_GROUP: 'group_id',
MARK_READ: 'read',
CHANGE_TITLE: 'title',
CHANGE_TOPIC: 'topic_id',
CHANGE_TYPE: 'type',
VOTE: 'voted',
};
/**
* Enum for request status.
* @readonly
@@ -140,3 +161,8 @@ export const Routes = {
TOPIC: `${BASE_PATH}/topics/:topicId`,
},
};
export const ALL_ROUTES = []
.concat(Routes.COMMENTS.PATH)
.concat(Routes.TOPICS.PATH)
.concat([Routes.POSTS.ALL_POSTS, Routes.POSTS.MY_POSTS]);