REFACTOR: Remove `Discourse.SiteSettings` from some controllers

REFACTOR: Remove Discourse.SiteSettings from some controllers

diff --git a/app/assets/javascripts/discourse/app/controllers/flag.js b/app/assets/javascripts/discourse/app/controllers/flag.js
index 9eb3ae7..c1fe019 100644
--- a/app/assets/javascripts/discourse/app/controllers/flag.js
+++ b/app/assets/javascripts/discourse/app/controllers/flag.js
@@ -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
       );
     }
diff --git a/app/assets/javascripts/discourse/app/controllers/tags-show.js b/app/assets/javascripts/discourse/app/controllers/tags-show.js
index 413cc27..66833df 100644
--- a/app/assets/javascripts/discourse/app/controllers/tags-show.js
+++ b/app/assets/javascripts/discourse/app/controllers/tags-show.js
@@ -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")
diff --git a/app/assets/javascripts/discourse/app/controllers/user-invited-show.js b/app/assets/javascripts/discourse/app/controllers/user-invited-show.js
index 7e8f67e..c75b308 100644
--- a/app/assets/javascripts/discourse/app/controllers/user-invited-show.js
+++ b/app/assets/javascripts/discourse/app/controllers/user-invited-show.js
@@ -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);
           }
diff --git a/app/assets/javascripts/discourse/app/controllers/user.js b/app/assets/javascripts/discourse/app/controllers/user.js
index b466f08..e0ee6c6 100644
--- a/app/assets/javascripts/discourse/app/controllers/user.js
+++ b/app/assets/javascripts/discourse/app/controllers/user.js
@@ -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()

GitHub sha: f83c3831

This commit appears in #10280 which was merged by eviltrout.