DEV: add CSS class for composer action

This CSS class can be used to style specific composer actions
This commit is contained in:
Sam Saffron 2020-07-27 16:50:43 +10:00
parent 179335b5e3
commit de5ef5d895
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export default Component.extend(KeyEnterEscape, {
"composer.creatingPrivateMessage:private-message",
"composeState",
"composer.loading",
"prefixedComposerAction",
"composer.canEditTitle:edit-title",
"composer.createdPost:created-post",
"composer.creatingTopic:topic",
@ -42,6 +43,11 @@ export default Component.extend(KeyEnterEscape, {
"currentUserPrimaryGroupClass"
],
@discourseComputed("composer.action")
prefixedComposerAction(action) {
return `composer-action-${action}`;
},
@discourseComputed("currentUser.primary_group_name")
currentUserPrimaryGroupClass(primaryGroupName) {
return primaryGroupName && `group-${primaryGroupName}`;