REFACTOR: Remove `Discourse.SiteSettings` from some controllers
This commit is contained in:
parent
17bccbb52f
commit
f83c383177
|
@ -93,7 +93,7 @@ export default Controller.extend(ModalFunctionality, {
|
|||
if (selected.get("is_custom_flag")) {
|
||||
const len = this.get("message.length") || 0;
|
||||
return (
|
||||
len >= Discourse.SiteSettings.min_personal_message_post_length &&
|
||||
len >= this.siteSettings.min_personal_message_post_length &&
|
||||
len <= MAX_MESSAGE_LENGTH
|
||||
);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ export default Controller.extend(BulkTopicSelection, FilterModeMixin, {
|
|||
|
||||
@discourseComputed("category")
|
||||
showTagFilter() {
|
||||
return Discourse.SiteSettings.show_filter_by_tag;
|
||||
return this.siteSettings.show_filter_by_tag;
|
||||
},
|
||||
|
||||
@discourseComputed("additionalTags", "category", "tag.id")
|
||||
|
|
|
@ -21,7 +21,6 @@ export default Controller.extend({
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.set("searchTerm", "");
|
||||
},
|
||||
|
||||
|
@ -141,8 +140,7 @@ export default Controller.extend({
|
|||
model.invites.pushObjects(invite_model.invites);
|
||||
if (
|
||||
invite_model.invites.length === 0 ||
|
||||
invite_model.invites.length <
|
||||
Discourse.SiteSettings.invites_per_page
|
||||
invite_model.invites.length < this.siteSettings.invites_per_page
|
||||
) {
|
||||
this.set("canLoadMore", false);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ export default Controller.extend(CanCheckEmails, {
|
|||
|
||||
@discourseComputed("model.badge_count")
|
||||
showBadges(badgeCount) {
|
||||
return Discourse.SiteSettings.enable_badges && badgeCount > 0;
|
||||
return this.siteSettings.enable_badges && badgeCount > 0;
|
||||
},
|
||||
|
||||
@discourseComputed()
|
||||
|
|
Loading…
Reference in New Issue