mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:02:46 +08:00
DEV: Option to always hide warning in the coposer (#21618)
This commit is contained in:
parent
4c4401b726
commit
d2516f39c3
|
@ -397,9 +397,13 @@ export default class ComposerController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@discourseComputed("model.creatingPrivateMessage", "model.targetRecipients")
|
@discourseComputed(
|
||||||
showWarning(creatingPrivateMessage, usernames) {
|
"model.creatingPrivateMessage",
|
||||||
if (!this.get("currentUser.staff")) {
|
"model.targetRecipients",
|
||||||
|
"model.warningsDisabled"
|
||||||
|
)
|
||||||
|
showWarning(creatingPrivateMessage, usernames, warningsDisabled) {
|
||||||
|
if (!this.get("currentUser.staff") || warningsDisabled) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1335,6 +1339,7 @@ export default class ComposerController extends Controller {
|
||||||
composeState: Composer.OPEN,
|
composeState: Composer.OPEN,
|
||||||
isWarning: false,
|
isWarning: false,
|
||||||
hasTargetGroups: opts.hasGroups,
|
hasTargetGroups: opts.hasGroups,
|
||||||
|
warningsDisabled: opts.warningsDisabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.model.targetRecipients) {
|
if (!this.model.targetRecipients) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user