REFACTOR: Remove `Discourse.SiteSettings` from components
This commit is contained in:
parent
f83c383177
commit
9aab81f304
|
@ -76,7 +76,7 @@ export default buildCategoryPanel("general", {
|
|||
parentCategories() {
|
||||
return this.site
|
||||
.get("categoriesList")
|
||||
.filter(c => c.level + 1 < Discourse.SiteSettings.max_category_nesting);
|
||||
.filter(c => c.level + 1 < this.siteSettings.max_category_nesting);
|
||||
},
|
||||
|
||||
@discourseComputed(
|
||||
|
|
|
@ -42,8 +42,7 @@ export default Component.extend({
|
|||
|
||||
@discourseComputed("message.length")
|
||||
customMessageLengthClasses(messageLength) {
|
||||
return messageLength <
|
||||
Discourse.SiteSettings.min_personal_message_post_length
|
||||
return messageLength < this.siteSettings.min_personal_message_post_length
|
||||
? "too-short"
|
||||
: "ok";
|
||||
},
|
||||
|
@ -51,7 +50,7 @@ export default Component.extend({
|
|||
@discourseComputed("message.length")
|
||||
customMessageLength(messageLength) {
|
||||
const len = messageLength || 0;
|
||||
const minLen = Discourse.SiteSettings.min_personal_message_post_length;
|
||||
const minLen = this.siteSettings.min_personal_message_post_length;
|
||||
if (len === 0) {
|
||||
return I18n.t("flagging.custom_message.at_least", { count: minLen });
|
||||
} else if (len < minLen) {
|
||||
|
|
Loading…
Reference in New Issue