Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: allow users to opt out from notifications
Some users find code review approval notifications annoying, allow them to opt out. This can be disabled from the pref->notification panel for the user
- Loading branch information
1 parent
78cdaee
commit ed69e78
Showing
6 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...javascripts/discourse/connectors/user-preferences-notifications/notify-code-review.js.es6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
//setupComponent(args, component) {}, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
SamSaffron
via email
Author
Member
|
||
shouldRender(args, component) { | ||
return component.currentUser && component.currentUser.admin; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...ipts/discourse/templates/connectors/user-preferences-notifications/notify-code-review.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="control-group"> | ||
<label class="control-label">{{i18n "code_review.title"}}</label> | ||
<div class="controls"> | ||
{{preference-checkbox | ||
labelKey="code_review.notify_on_approval" | ||
checked=model.custom_fields.notify_on_code_reviews}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment should be removed.