Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove unused service injections (#34750)

Jarek Radosz2914e7712a37
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-config/color-palettes/index.js b/app/assets/javascripts/admin/addon/controllers/admin-config/color-palettes/index.js
index 23b0732efdd..87eb59a92b0 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-config/color-palettes/index.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-config/color-palettes/index.js
@@ -14,8 +14,6 @@ export default class AdminConfigColorPalettesIndexController extends Controller
@service dialog;
@service toasts;
@service session;
- @service site;
- @service siteSettings;
@service interfaceColor;
@tracked defaultTheme = null;
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-embedding/index.js b/app/assets/javascripts/admin/addon/controllers/admin-embedding/index.js
index 86a57d95bf9..d410bfce246 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-embedding/index.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-embedding/index.js
@@ -5,7 +5,6 @@ import { service } from "@ember/service";
import discourseComputed from "discourse/lib/decorators";
export default class AdminEmbeddingIndexController extends Controller {
- @service router;
@service site;
@controller adminEmbedding;
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-plugins/index.js b/app/assets/javascripts/admin/addon/controllers/admin-plugins/index.js
index d6bdf430a2d..61496f2920c 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-plugins/index.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-plugins/index.js
@@ -8,7 +8,6 @@ import SiteSetting from "admin/models/site-setting";
export default class AdminPluginsIndexController extends Controller {
@service session;
- @service adminPluginNavManager;
@service router;
get searchableProps() {
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-users-list/show.js b/app/assets/javascripts/admin/addon/controllers/admin-users-list/show.js
index 6f93ec9ed27..7a6ee8a7532 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-users-list/show.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-users-list/show.js
@@ -15,7 +15,6 @@ import AdminUser from "admin/models/admin-user";
const MAX_BULK_SELECT_LIMIT = 100;
export default class AdminUsersListShowController extends Controller {
- @service dialog;
@service modal;
@service toasts;
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-web-hooks/edit.js b/app/assets/javascripts/admin/addon/controllers/admin-web-hooks/edit.js
index be9c433948d..8cf44e58346 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-web-hooks/edit.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-web-hooks/edit.js
@@ -8,7 +8,6 @@ import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n";
export default class AdminWebHooksEditController extends Controller {
- @service dialog;
@service router;
@service siteSettings;
diff --git a/app/assets/javascripts/admin/addon/routes/admin-badges/show.js b/app/assets/javascripts/admin/addon/routes/admin-badges/show.js
index 1ca793d4805..b7e351055c5 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-badges/show.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-badges/show.js
@@ -5,7 +5,6 @@ import Badge from "discourse/models/badge";
import { i18n } from "discourse-i18n";
export default class AdminBadgesShowRoute extends Route {
- @service dialog;
@service adminBadges;
serialize(model) {
diff --git a/app/assets/javascripts/admin/addon/routes/admin-config/color-palettes/index.js b/app/assets/javascripts/admin/addon/routes/admin-config/color-palettes/index.js
index dee8d4f2915..492715d5f78 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-config/color-palettes/index.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-config/color-palettes/index.js
@@ -1,12 +1,9 @@
import Route from "@ember/routing/route";
-import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import ColorScheme from "admin/models/color-scheme";
import Theme from "admin/models/theme";
export default class AdminConfigColorPalettesIndexRoute extends Route {
- @service store;
-
async model() {
return await ajax("/admin/config/colors");
}
diff --git a/app/assets/javascripts/admin/addon/routes/admin-config/customize.js b/app/assets/javascripts/admin/addon/routes/admin-config/customize.js
index e5275c636a4..a83b2326948 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-config/customize.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-config/customize.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class AdminConfigThemesAndComponentsRoute extends DiscourseRoute {
- @service router;
-
titleToken() {
return i18n("admin.config.themes_and_components.title");
}
diff --git a/app/assets/javascripts/admin/addon/routes/admin-plugins.js b/app/assets/javascripts/admin/addon/routes/admin-plugins.js
index a579bf1d3d9..bb99f30c159 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-plugins.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-plugins.js
@@ -1,11 +1,8 @@
-import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
import AdminPlugin from "admin/models/admin-plugin";
export default class AdminPluginsRoute extends DiscourseRoute {
- @service router;
-
async model() {
const plugins = await this.store.findAll("plugin");
return plugins.map((plugin) => AdminPlugin.create(plugin));
diff --git a/app/assets/javascripts/admin/addon/routes/admin-plugins/show.js b/app/assets/javascripts/admin/addon/routes/admin-plugins/show.js
index 3a32cd29213..1fbc086c11d 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-plugins/show.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-plugins/show.js
@@ -5,7 +5,6 @@ import DiscourseRoute from "discourse/routes/discourse";
import AdminPlugin from "admin/models/admin-plugin";
export default class AdminPluginsShowRoute extends DiscourseRoute {
- @service router;
@service adminPluginNavManager;
async model(params) {
diff --git a/app/assets/javascripts/admin/addon/routes/admin-plugins/show/settings.js b/app/assets/javascripts/admin/addon/routes/admin-plugins/show/settings.js
index f3ad08b93ee..ffa85755d2e 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-plugins/show/settings.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-plugins/show/settings.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class AdminPluginsShowSettingsRoute extends DiscourseRoute {
- @service router;
-
queryParams = {
filter: { replace: true },
};
diff --git a/app/assets/javascripts/admin/addon/routes/admin.js b/app/assets/javascripts/admin/addon/routes/admin.js
index f813e1e6e7d..ee9105fd8b2 100644
--- a/app/assets/javascripts/admin/addon/routes/admin.js
+++ b/app/assets/javascripts/admin/addon/routes/admin.js
@@ -8,10 +8,6 @@ import { i18n } from "discourse-i18n";
import AdminSearchModal from "admin/components/modal/admin-search";
export default class AdminRoute extends DiscourseRoute {
- @service sidebarState;
- @service siteSettings;
- @service store;
- @service currentUser;
@service adminSidebarStateManager;
@service modal;
diff --git a/app/assets/javascripts/admin/addon/services/admin-plugin-nav-manager.js b/app/assets/javascripts/admin/addon/services/admin-plugin-nav-manager.js
index b92256e1fae..34775714644 100644
--- a/app/assets/javascripts/admin/addon/services/admin-plugin-nav-manager.js
+++ b/app/assets/javascripts/admin/addon/services/admin-plugin-nav-manager.js
@@ -1,10 +1,8 @@
import { tracked } from "@glimmer/tracking";
-import Service, { service } from "@ember/service";
+import Service from "@ember/service";
import { configNavForPlugin } from "discourse/lib/admin-plugin-config-nav";
export default class AdminPluginNavManager extends Service {
- @service currentUser;
-
@tracked currentPlugin;
// NOTE (martin) This is a temporary solution so we know whether to
diff --git a/app/assets/javascripts/admin/addon/services/admin-search-data-source.js b/app/assets/javascripts/admin/addon/services/admin-search-data-source.js
index 02eeeaef8e3..d7b4636fcae 100644
--- a/app/assets/javascripts/admin/addon/services/admin-search-data-source.js
+++ b/app/assets/javascripts/admin/addon/services/admin-search-data-source.js
@@ -207,7 +207,6 @@ export class SettingLinkFormatter {
export default class AdminSearchDataSource extends Service {
@service router;
- @service siteSettings;
@service adminNavManager;
plugins = {};
diff --git a/app/assets/javascripts/discourse/app/components/composer-body.js b/app/assets/javascripts/discourse/app/components/composer-body.js
index c76dbbe31d3..1a7ce1a9cd8 100644
--- a/app/assets/javascripts/discourse/app/components/composer-body.js
+++ b/app/assets/javascripts/discourse/app/components/composer-body.js
@@ -1,7 +1,6 @@
/* eslint-disable ember/no-classic-components */
import Component from "@ember/component";
import { cancel, schedule } from "@ember/runloop";
-import { service } from "@ember/service";
import { classNameBindings } from "@ember-decorators/component";
import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
@@ -24,8 +23,6 @@ import Composer from "discourse/models/composer";
"currentUserPrimaryGroupClass"
)
export default class ComposerBody extends Component {
- @service capabilities;
-
elementId = "reply-control";
@discourseComputed("composer.action")
diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.gjs b/app/assets/javascripts/discourse/app/components/d-navigation.gjs
index c4beda8a833..a147f18b7c4 100644
--- a/app/assets/javascripts/discourse/app/components/d-navigation.gjs
+++ b/app/assets/javascripts/discourse/app/components/d-navigation.gjs
@@ -28,7 +28,6 @@ import CategoriesAdminDropdown from "select-kit/components/categories-admin-drop
@tagName("")
export default class DNavigation extends Component {
@service router;
- @service dialog;
@service site;
@tracked filterMode;
diff --git a/app/assets/javascripts/discourse/app/components/discovery-topics-list.js b/app/assets/javascripts/discourse/app/components/discovery-topics-list.js
index 20dadda8bb8..54f3ff2f7a9 100644
--- a/app/assets/javascripts/discourse/app/components/discovery-topics-list.js
+++ b/app/assets/javascripts/discourse/app/components/discovery-topics-list.js
@@ -6,7 +6,6 @@ import { observes, on } from "@ember-decorators/object";
@classNames("contents")
export default class DiscoveryTopicsList extends Component {
- @service appEvents;
@service documentTitle;
@on("didInsertElement")
diff --git a/app/assets/javascripts/discourse/app/components/global-notice.gjs b/app/assets/javascripts/discourse/app/components/global-notice.gjs
index 8f5a832e791..0c8e46190f5 100644
--- a/app/assets/javascripts/discourse/app/components/global-notice.gjs
+++ b/app/assets/javascripts/discourse/app/components/global-notice.gjs
@@ -21,8 +21,6 @@ export function addGlobalNotice(text, id, options = {}) {
const GLOBAL_NOTICE_DISMISSED_PROMPT_KEY = "dismissed-global-notice-v2";
class Notice extends EmberObject {
- @service("logsNotice") logsNoticeService;
-
text = null;
id = null;
options = null;
diff --git a/app/assets/javascripts/discourse/app/components/group-selector.gjs b/app/assets/javascripts/discourse/app/components/group-selector.gjs
index 949470baaad..cc6b2776a23 100644
--- a/app/assets/javascripts/discourse/app/components/group-selector.gjs
+++ b/app/assets/javascripts/discourse/app/components/group-selector.gjs
@@ -2,14 +2,11 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { array } from "@ember/helper";
import { action } from "@ember/object";
-import { service } from "@ember/service";
import { isEmpty } from "@ember/utils";
import DMultiSelect from "discourse/components/d-multi-select";
import { i18n } from "discourse-i18n";
export default class GroupSelector extends Component {
- @service siteSettings;
-
@tracked selectedGroups = [];
constructor() {
diff --git a/app/assets/javascripts/discourse/app/components/modal/flag.gjs b/app/assets/javascripts/discourse/app/components/modal/flag.gjs
index ac8e1aa7ad4..3baded64566 100644
--- a/app/assets/javascripts/discourse/app/components/modal/flag.gjs
+++ b/app/assets/javascripts/discourse/app/components/modal/flag.gjs
@@ -24,7 +24,7 @@ export default class Flag extends Component {
@service currentUser;
@service siteSettings;
@service appEvents;
-
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service site; // FIXME: used by flag-target objects
@tracked userDetails;
diff --git a/app/assets/javascripts/discourse/app/components/post-text-selection.gjs b/app/assets/javascripts/discourse/app/components/post-text-selection.gjs
index a28b489bdeb..f38f5088c8f 100644
--- a/app/assets/javascripts/discourse/app/components/post-text-selection.gjs
+++ b/app/assets/javascripts/discourse/app/components/post-text-selection.gjs
@@ -53,7 +53,6 @@ export default class PostTextSelection extends Component {
@service appEvents;
@service capabilities;
@service currentUser;
- @service site;
@service siteSettings;
@service menu;
@service modal;
diff --git a/app/assets/javascripts/discourse/app/components/topic-list/list.gjs b/app/assets/javascripts/discourse/app/components/topic-list/list.gjs
index 69af9a62f31..ec8b655ef97 100644
--- a/app/assets/javascripts/discourse/app/components/topic-list/list.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-list/list.gjs
@@ -32,7 +32,8 @@ import ItemViewsCell from "./item/views-cell";
export default class TopicList extends Component {
@service currentUser;
- @service topicTrackingState;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service topicTrackingState; // accessed via `self` variable
@cached
get columns() {
diff --git a/app/assets/javascripts/discourse/app/components/user-menu/notifications-list.js b/app/assets/javascripts/discourse/app/components/user-menu/notifications-list.js
index e5593587d26..6df089fa83d 100644
--- a/app/assets/javascripts/discourse/app/components/user-menu/notifications-list.js
+++ b/app/assets/javascripts/discourse/app/components/user-menu/notifications-list.js
@@ -35,7 +35,6 @@ export default class UserMenuNotificationsList extends UserMenuItemsList {
@service currentUser;
@service siteSettings;
@service site;
- @service store;
@service modal;
get filterByTypes() {
diff --git a/app/assets/javascripts/discourse/app/controllers/application.js b/app/assets/javascripts/discourse/app/controllers/application.js
index e0fcf116864..3f5316b6b7c 100644
--- a/app/assets/javascripts/discourse/app/controllers/application.js
+++ b/app/assets/javascripts/discourse/app/controllers/application.js
@@ -11,9 +11,9 @@ import { isTesting } from "discourse/lib/environment";
const HIDE_SIDEBAR_KEY = "sidebar-hidden";
export default class ApplicationController extends Controller {
- @service router;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service router; // used in the route template
@service footer;
- @service header;
@service sidebarState;
queryParams = [{ navigationMenuQueryParamOverride: "navigation_menu" }];
diff --git a/app/assets/javascripts/discourse/app/controllers/discovery/list.js b/app/assets/javascripts/discourse/app/controllers/discovery/list.js
index 4ae4fc7c0d4..025bdcb80fa 100644
--- a/app/assets/javascripts/discourse/app/controllers/discovery/list.js
+++ b/app/assets/javascripts/discourse/app/controllers/discovery/list.js
@@ -49,7 +49,6 @@ export function addDiscoveryQueryParam(p, opts) {
export default class DiscoveryListController extends Controller {
@service composer;
@service siteSettings;
- @service site;
@service currentUser;
@service router;
@service topicTrackingState;
diff --git a/app/assets/javascripts/discourse/app/controllers/full-page-search.js b/app/assets/javascripts/discourse/app/controllers/full-page-search.js
index 86383d5bd32..8c74d376a60 100644
--- a/app/assets/javascripts/discourse/app/controllers/full-page-search.js
+++ b/app/assets/javascripts/discourse/app/controllers/full-page-search.js
@@ -45,7 +45,6 @@ export function registerFullPageSearchType(
export default class FullPageSearchController extends Controller {
@service composer;
- @service modal;
@service appEvents;
@service siteSettings;
@service searchPreferencesManager;
diff --git a/app/assets/javascripts/discourse/app/controllers/group/activity.js b/app/assets/javascripts/discourse/app/controllers/group/activity.js
index af7b3f2dc26..f630cec1090 100644
--- a/app/assets/javascripts/discourse/app/controllers/group/activity.js
+++ b/app/assets/javascripts/discourse/app/controllers/group/activity.js
@@ -2,7 +2,8 @@ import Controller from "@ember/controller";
import { service } from "@ember/service";
export default class GroupActivityController extends Controller {
- @service router;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service siteSettings; // used in the route template
queryParams = ["category_id"];
}
diff --git a/app/assets/javascripts/discourse/app/controllers/login.js b/app/assets/javascripts/discourse/app/controllers/login.js
index 1172568d0a4..08372286967 100644
--- a/app/assets/javascripts/discourse/app/controllers/login.js
+++ b/app/assets/javascripts/discourse/app/controllers/login.js
@@ -22,10 +22,10 @@ import { i18n } from "discourse-i18n";
export default class LoginPageController extends Controller {
@service siteSettings;
- @service router;
@service capabilities;
@service dialog;
- @service site;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service site; // used in the route template
@service login;
@service modal;
diff --git a/app/assets/javascripts/discourse/app/lib/composer-video-thumbnail-uppy.js b/app/assets/javascripts/discourse/app/lib/composer-video-thumbnail-uppy.js
index 8db074d3232..183598fe40f 100644
--- a/app/assets/javascripts/discourse/app/lib/composer-video-thumbnail-uppy.js
+++ b/app/assets/javascripts/discourse/app/lib/composer-video-thumbnail-uppy.js
@@ -13,9 +13,7 @@ import { i18n } from "discourse-i18n";
//
// https://github.com/discourse/discourse/blob/110a3025dbf5c7205cec498c7d83dc258d994cfe/app/models/post.rb#L1013-L1035
export default class ComposerVideoThumbnailUppy {
- @service dialog;
@service siteSettings;
- @service session;
@service capabilities;
@tracked _uppyUpload;
diff --git a/app/assets/javascripts/discourse/app/lib/post-bookmark-manager.js b/app/assets/javascripts/discourse/app/lib/post-bookmark-manager.js
index 2b4e4198270..5ae76104b89 100644
--- a/app/assets/javascripts/discourse/app/lib/post-bookmark-manager.js
+++ b/app/assets/javascripts/discourse/app/lib/post-bookmark-manager.js
@@ -10,7 +10,6 @@ import { BookmarkFormData } from "discourse/lib/bookmark-form-data";
import Bookmark from "discourse/models/bookmark";
export default class PostBookmarkManager {
- @service currentUser;
@service bookmarkApi;
@controller("topic") topicController;
diff --git a/app/assets/javascripts/discourse/app/lib/post-bulk-select-helper.js b/app/assets/javascripts/discourse/app/lib/post-bulk-select-helper.js
index 39f90c6f8bb..e337cf52e31 100644
--- a/app/assets/javascripts/discourse/app/lib/post-bulk-select-helper.js
+++ b/app/assets/javascripts/discourse/app/lib/post-bulk-select-helper.js
@@ -1,7 +1,6 @@
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { getOwner, setOwner } from "@ember/owner";
-import { service } from "@ember/service";
import { TrackedArray } from "@ember-compat/tracked-built-ins";
/**
@@ -15,8 +14,6 @@ import { TrackedArray } from "@ember-compat/tracked-built-ins";
* - Bulk action execution
*/
export default class PostBulkSelectHelper {
- @service modal;
-
@tracked loading = false;
@tracked lastClickedPost = null;
@tracked posts = null;
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/base-community-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/base-community-section-link.js
index 26a151f2318..8981172ff90 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/base-community-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/base-community-section-link.js
@@ -5,10 +5,16 @@ import { service } from "@ember/service";
* Base class representing a sidebar community section link interface.
*/
export default class BaseCommunitySectionLink {
+ // TODO: All those are used by subclasses
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service currentUser;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service appEvents;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service router;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service siteSettings;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service topicTrackingState;
constructor(owner, { inMoreDrawer, overriddenName, overriddenIcon } = {}) {
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/badges-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/badges-section-link.js
index 37e571ebc35..7cc374ebd3e 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/badges-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/badges-section-link.js
@@ -1,7 +1,10 @@
+import { service } from "@ember/service";
import BaseSectionLink from "discourse/lib/sidebar/base-community-section-link";
import { i18n } from "discourse-i18n";
export default class BadgesSectionLink extends BaseSectionLink {
+ @service siteSettings;
+
get name() {
return "badges";
}
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js
index 0062fde62ea..d6fd1d4444b 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js
@@ -1,8 +1,12 @@
import { tracked } from "@glimmer/tracking";
+import { service } from "@ember/service";
import BaseSectionLink from "discourse/lib/sidebar/base-community-section-link";
import { i18n } from "discourse-i18n";
export default class EverythingSectionLink extends BaseSectionLink {
+ @service currentUser;
+ @service topicTrackingState;
+
@tracked totalUnread = 0;
@tracked totalNew = 0;
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/faq-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
index 317aa520c83..99d245224e1 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
@@ -1,7 +1,10 @@
+import { service } from "@ember/service";
import BaseSectionLink from "discourse/lib/sidebar/base-community-section-link";
import { i18n } from "discourse-i18n";
export default class FAQSectionLink extends BaseSectionLink {
+ @service siteSettings;
+
get renameToGuidelines() {
return (
this.siteSettings.experimental_rename_faq_to_guidelines && !this.href
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/groups-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/groups-section-link.js
index 11d2dc964de..dec7b4303fa 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/groups-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/groups-section-link.js
@@ -1,7 +1,10 @@
+import { service } from "@ember/service";
import BaseSectionLink from "discourse/lib/sidebar/base-community-section-link";
import { i18n } from "discourse-i18n";
export default class GroupsSectionLink extends BaseSectionLink {
+ @service siteSettings;
+
get name() {
return "groups";
}
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/section.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/section.js
index a394fee76dc..5f6f6c8a104 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/section.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/section.js
@@ -35,11 +35,7 @@ const SPECIAL_LINKS_MAP = {
};
export default class CommunitySection {
- @service appEvents;
- @service currentUser;
- @service modal;
@service router;
- @service siteSettings;
@service topicTrackingState;
@tracked links;
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/users-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/users-section-link.js
index ddd304dd1da..dd85a3e66ce 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/users-section-link.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/users-section-link.js
@@ -1,7 +1,11 @@
+import { service } from "@ember/service";
import BaseSectionLink from "discourse/lib/sidebar/base-community-section-link";
import { i18n } from "discourse-i18n";
export default class UsersSectionLink extends BaseSectionLink {
+ @service currentUser;
+ @service siteSettings;
+
get name() {
return "users";
}
diff --git a/app/assets/javascripts/discourse/app/lib/textarea-text-manipulation.js b/app/assets/javascripts/discourse/app/lib/textarea-text-manipulation.js
index 8ad4c569789..968a447dc47 100644
--- a/app/assets/javascripts/discourse/app/lib/textarea-text-manipulation.js
+++ b/app/assets/javascripts/discourse/app/lib/textarea-text-manipulation.js
@@ -61,7 +61,6 @@ export default class TextareaTextManipulation {
@service appEvents;
@service siteSettings;
@service capabilities;
- @service currentUser;
allowPreview = true;
diff --git a/app/assets/javascripts/discourse/app/lib/topic-bookmark-manager.js b/app/assets/javascripts/discourse/app/lib/topic-bookmark-manager.js
index dc901136e8b..c3862dc35f5 100644
--- a/app/assets/javascripts/discourse/app/lib/topic-bookmark-manager.js
+++ b/app/assets/javascripts/discourse/app/lib/topic-bookmark-manager.js
@@ -6,7 +6,6 @@ import { BookmarkFormData } from "discourse/lib/bookmark-form-data";
import Bookmark from "discourse/models/bookmark";
export default class TopicBookmarkManager {
- @service currentUser;
@service bookmarkApi;
@controller("topic") topicController;
diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js
index 95969c198a9..04ad12ef150 100644
--- a/app/assets/javascripts/discourse/app/models/user.js
+++ b/app/assets/javascripts/discourse/app/models/user.js
@@ -212,7 +212,6 @@ export default class User extends RestModel.extend(Evented) {
}
@service appEvents;
- @service userTips;
@tracked do_not_disturb_until;
@tracked status;
diff --git a/app/assets/javascripts/discourse/app/routes/application.js b/app/assets/javascripts/discourse/app/routes/application.js
index e4f9cf20877..a6c6d0b6a30 100644
--- a/app/assets/javascripts/discourse/app/routes/application.js
+++ b/app/assets/javascripts/discourse/app/routes/application.js
@@ -17,7 +17,6 @@ import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class ApplicationRoute extends DiscourseRoute {
- @service capabilities;
@service clientErrorHandler;
@service composer;
@service currentUser;
@@ -25,11 +24,9 @@ export default class ApplicationRoute extends DiscourseRoute {
@service documentTitle;
@service historyStore;
@service loadingSlider;
- @service login;
@service modal;
@service router;
@service site;
- @service siteSettings;
@service restrictedRouting;
@setting("title") siteTitle;
diff --git a/app/assets/javascripts/discourse/app/routes/discovery/categories.js b/app/assets/javascripts/discourse/app/routes/discovery/categories.js
index 2153e846500..a73b32626c2 100644
--- a/app/assets/javascripts/discourse/app/routes/discovery/categories.js
+++ b/app/assets/javascripts/discourse/app/routes/discovery/categories.js
@@ -12,8 +12,6 @@ import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class DiscoveryCategoriesRoute extends DiscourseRoute {
- @service modal;
- @service router;
@service session;
templateName = "discovery/categories";
diff --git a/app/assets/javascripts/discourse/app/routes/posts.js b/app/assets/javascripts/discourse/app/routes/posts.js
index 44fe05b83ab..1d178e0e9d3 100644
--- a/app/assets/javascripts/discourse/app/routes/posts.js
+++ b/app/assets/javascripts/discourse/app/routes/posts.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import Posts from "discourse/models/posts";
import DiscourseRoute from "discourse/routes/discourse";
export default class PostsRoute extends DiscourseRoute {
- @service router;
-
async model() {
return Posts.find();
}
diff --git a/app/assets/javascripts/discourse/app/routes/tag/show.js b/app/assets/javascripts/discourse/app/routes/tag/show.js
index 9e8c31c964f..2ddb16e48d0 100644
--- a/app/assets/javascripts/discourse/app/routes/tag/show.js
+++ b/app/assets/javascripts/discourse/app/routes/tag/show.js
@@ -20,7 +20,6 @@ const ALL = "all";
@disableImplicitInjections
export default class TagShowRoute extends DiscourseRoute {
- @service composer;
@service router;
@service currentUser;
@service store;
diff --git a/app/assets/javascripts/discourse/app/routes/user/index.js b/app/assets/javascripts/discourse/app/routes/user/index.js
index 4cb22f5f930..5b809a15463 100644
--- a/app/assets/javascripts/discourse/app/routes/user/index.js
+++ b/app/assets/javascripts/discourse/app/routes/user/index.js
@@ -4,7 +4,6 @@ import DiscourseRoute from "discourse/routes/discourse";
export default class UserIndex extends DiscourseRoute {
@service router;
- @service site;
@service currentUser;
@service siteSettings;
diff --git a/app/assets/javascripts/discourse/app/services/emoji-store.js b/app/assets/javascripts/discourse/app/services/emoji-store.js
index d942e149065..f0d9b0f546e 100644
--- a/app/assets/javascripts/discourse/app/services/emoji-store.js
+++ b/app/assets/javascripts/discourse/app/services/emoji-store.js
@@ -1,5 +1,5 @@
import { tracked } from "@glimmer/tracking";
-import Service, { service } from "@ember/service";
+import Service from "@ember/service";
import { TrackedArray, TrackedObject } from "@ember-compat/tracked-built-ins";
import { isSkinTonableEmoji } from "pretty-text/emoji";
import KeyValueStore from "discourse/lib/key-value-store";
@@ -12,8 +12,6 @@ export const MAX_TRACKED_EMOJIS = MAX_DISPLAYED_EMOJIS * 2;
export const DEFAULT_DIVERSITY = 1;
export default class EmojiStore extends Service {
- @service siteSettings;
-
@tracked list;
store = new KeyValueStore(STORE_NAMESPACE);
diff --git a/app/assets/javascripts/discourse/app/services/header.js b/app/assets/javascripts/discourse/app/services/header.js
index bba03d62a94..83570be3953 100644
--- a/app/assets/javascripts/discourse/app/services/header.js
+++ b/app/assets/javascripts/discourse/app/services/header.js
@@ -11,7 +11,6 @@ const VALID_HEADER_BUTTONS_TO_HIDE = ["search", "login", "signup", "menu"];
@disableImplicitInjections
export default class Header extends Service {
- @service siteSettings;
@service scrollDirection;
@service site;
diff --git a/app/assets/javascripts/discourse/app/services/history-store.js b/app/assets/javascripts/discourse/app/services/history-store.js
index a5edc2df86a..46c917cb055 100644
--- a/app/assets/javascripts/discourse/app/services/history-store.js
+++ b/app/assets/javascripts/discourse/app/services/history-store.js
@@ -1,6 +1,6 @@
import { DEBUG } from "@glimmer/env";
import { cached } from "@glimmer/tracking";
-import Service, { service } from "@ember/service";
+import Service from "@ember/service";
import { TrackedMap } from "@ember-compat/tracked-built-ins";
import { bind } from "discourse/lib/decorators";
import { isTesting } from "discourse/lib/environment";
@@ -17,8 +17,6 @@ const HANDLED_TRANSITIONS = new WeakSet();
*/
@disableImplicitInjections
export default class HistoryStore extends Service {
- @service router;
-
#routeData = new TrackedMap();
#uuid;
#pendingStore = DEBUG && isTesting() ? new TrackedMap() : null;
diff --git a/app/assets/javascripts/discourse/app/services/screen-track.js b/app/assets/javascripts/discourse/app/services/screen-track.js
index 7074d36c3b4..fdce7c8738c 100644
--- a/app/assets/javascripts/discourse/app/services/screen-track.js
+++ b/app/assets/javascripts/discourse/app/services/screen-track.js
@@ -24,7 +24,6 @@ export default class ScreenTrack extends Service {
@service currentUser;
@service keyValueStore;
@service session;
- @service siteSettings;
@service topicTrackingState;
_ajaxFailures = 0;
diff --git a/app/assets/javascripts/discourse/app/services/sidebar-state.js b/app/assets/javascripts/discourse/app/services/sidebar-state.js
index ef8fdb01e4d..2683c824237 100644
--- a/app/assets/javascripts/discourse/app/services/sidebar-state.js
+++ b/app/assets/javascripts/discourse/app/services/sidebar-state.js
@@ -18,8 +18,6 @@ import {
@disableImplicitInjections
export default class SidebarState extends Service {
@service keyValueStore;
- @service currentUser;
- @service siteSettings;
@tracked currentPanelKey = currentPanelKey;
@tracked mode = COMBINED_MODE;
diff --git a/app/assets/javascripts/discourse/app/static/prosemirror/lib/text-manipulation.js b/app/assets/javascripts/discourse/app/static/prosemirror/lib/text-manipulation.js
index 7d10506726d..1b140b5619e 100644
--- a/app/assets/javascripts/discourse/app/static/prosemirror/lib/text-manipulation.js
+++ b/app/assets/javascripts/discourse/app/static/prosemirror/lib/text-manipulation.js
@@ -1,7 +1,6 @@
// @ts-check
import { getOwner, setOwner } from "@ember/owner";
import { next } from "@ember/runloop";
-import { service } from "@ember/service";
import { TrackedObject } from "@ember-compat/tracked-built-ins";
import { lift, setBlockType, toggleMark, wrapIn } from "prosemirror-commands";
import { Slice } from "prosemirror-model";
@@ -22,8 +21,6 @@ import { hasMark, inNode, isNodeActive } from "./plugin-utils";
/** @implements {TextManipulation} */
export default class ProsemirrorTextManipulation {
- @service siteSettings;
-
allowPreview = false;
/** @type {import("prosemirror-model").Schema} */
diff --git a/app/assets/javascripts/discourse/tests/acceptance/implicit-injections-test.js b/app/assets/javascripts/discourse/tests/acceptance/implicit-injections-test.js
index 75ab0f29a05..0e4c1c28e3d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/implicit-injections-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/implicit-injections-test.js
@@ -17,6 +17,7 @@ acceptance("Implicit injections shims", function () {
test("it allows overlaying explicit injections", function (assert) {
class MyService extends Service {
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@service session;
}
const serviceInstance = MyService.create();
diff --git a/app/assets/javascripts/discourse/tests/unit/utils/optional-service-test.gjs b/app/assets/javascripts/discourse/tests/unit/utils/optional-service-test.gjs
index e62c8e0f042..eb23d4970e9 100644
--- a/app/assets/javascripts/discourse/tests/unit/utils/optional-service-test.gjs
+++ b/app/assets/javascripts/discourse/tests/unit/utils/optional-service-test.gjs
@@ -25,7 +25,9 @@ const EmberObjectComponent = Component.extend({
});
class NativeComponent extends Component {
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@optionalService foo;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
@optionalService("bar") baz;
name = "";
diff --git a/plugins/automation/admin/assets/javascripts/discourse/routes/admin-plugins/show/automation/index.js b/plugins/automation/admin/assets/javascripts/discourse/routes/admin-plugins/show/automation/index.js
index 84704a1210b..5ef952367b6 100644
--- a/plugins/automation/admin/assets/javascripts/discourse/routes/admin-plugins/show/automation/index.js
+++ b/plugins/automation/admin/assets/javascripts/discourse/routes/admin-plugins/show/automation/index.js
@@ -3,7 +3,7 @@ import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
export default class AutomationIndex extends DiscourseRoute {
- @service router;
+ @service store;
model() {
return this.store.findAll("discourse-automation-automation");
diff --git a/plugins/chat/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-chat-incoming-webhooks/new.js b/plugins/chat/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-chat-incoming-webhooks/new.js
index 87db78dee7b..f07f74f667c 100644
--- a/plugins/chat/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-chat-incoming-webhooks/new.js
+++ b/plugins/chat/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-chat-incoming-webhooks/new.js
@@ -6,7 +6,6 @@ import DiscourseRoute from "discourse/routes/discourse";
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
export default class DiscourseChatIncomingWebhooksNew extends DiscourseRoute {
- @service adminPluginNavManager;
@service currentUser;
async model() {
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/channel.js b/plugins/chat/assets/javascripts/discourse/components/chat/composer/channel.js
index 9bee259674f..46f37a58f1e 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/channel.js
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/composer/channel.js
@@ -5,8 +5,10 @@ import { i18n } from "discourse-i18n";
import ChatComposer from "../../chat-composer";
export default class ChatComposerChannel extends ChatComposer {
- @service("chat-channel-composer") composer;
- @service("chat-channel-pane") pane;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service("chat-channel-composer") composer; // used in the parent class
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service("chat-channel-pane") pane; // used in the parent class
@service currentUser;
@service chatDraftsManager;
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/thread.js b/plugins/chat/assets/javascripts/discourse/components/chat/composer/thread.js
index 580401d3ac6..b22baab34fd 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/thread.js
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/composer/thread.js
@@ -7,7 +7,8 @@ import ChatComposer from "../../chat-composer";
export default class ChatComposerThread extends ChatComposer {
@service("chat-channel-composer") channelComposer;
- @service("chat-thread-composer") composer;
+ // NOTE: eslint-disable-next-line discourse/no-unused-services
+ @service("chat-thread-composer") composer; // used in the parent class
@service("chat-thread-pane") pane;
@service currentUser;
@service chatDraftsManager;
diff --git a/plugins/chat/assets/javascripts/discourse/controllers/chat-draft-channel.js b/plugins/chat/assets/javascripts/discourse/controllers/chat-draft-channel.js
index 6920746131f..faa4e8cd3d1 100644
--- a/plugins/chat/assets/javascripts/discourse/controllers/chat-draft-channel.js
+++ b/plugins/chat/assets/javascripts/discourse/controllers/chat-draft-channel.js
@@ -1,6 +1,3 @@
import Controller from "@ember/controller";
-import { service } from "@ember/service";
-export default class ChatDraftChannelController extends Controller {
- @service chat;
-}
+export default class ChatDraftChannelController extends Controller {}
diff --git a/plugins/chat/assets/javascripts/discourse/controllers/chat/channel.js b/plugins/chat/assets/javascripts/discourse/controllers/chat/channel.js
index 5c72341b8aa..447b2122562 100644
--- a/plugins/chat/assets/javascripts/discourse/controllers/chat/channel.js
+++ b/plugins/chat/assets/javascripts/discourse/controllers/chat/channel.js
@@ -1,10 +1,7 @@
import { tracked } from "@glimmer/tracking";
import Controller from "@ember/controller";
-import { service } from "@ember/service";
export default class ChatChannelController extends Controller {
- @service chat;
-
@tracked targetMessageId = null;
// Backwards-compatibility
diff --git a/plugins/chat/assets/javascripts/discourse/controllers/chat/channel/thread.js b/plugins/chat/assets/javascripts/discourse/controllers/chat/channel/thread.js
index 733836a0020..2a7d33a6f62 100644
--- a/plugins/chat/assets/javascripts/discourse/controllers/chat/channel/thread.js
+++ b/plugins/chat/assets/javascripts/discourse/controllers/chat/channel/thread.js
@@ -1,9 +1,6 @@
import { tracked } from "@glimmer/tracking";
import Controller from "@ember/controller";
-import { service } from "@ember/service";
export default class ChatChannelThreadController extends Controller {
- @service chat;
-
@tracked targetMessageId = null;
}
diff --git a/plugins/chat/assets/javascripts/discourse/controllers/chat/index.js b/plugins/chat/assets/javascripts/discourse/controllers/chat/index.js
index 5a94321fc7a..b8dd3789ce2 100644
--- a/plugins/chat/assets/javascripts/discourse/controllers/chat/index.js
+++ b/plugins/chat/assets/javascripts/discourse/controllers/chat/index.js
@@ -1,6 +1,3 @@
import Controller from "@ember/controller";
-import { service } from "@ember/service";
-export default class ChatIndexController extends Controller {
- @service chat;
-}
+export default class ChatIndexController extends Controller {}
diff --git a/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js b/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js
index 9b3de8fec43..f28796f4b7d 100644
--- a/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js
+++ b/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js
@@ -21,9 +21,7 @@ class ChatSetupInit {
@service router;
@service("chat") chatService;
@service chatHistory;
- @service site;
@service siteSettings;
- @service currentUser;
@service appEvents;
constructor(owner) {
diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
index 976be871afe..24fb10cd8cf 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
@@ -33,7 +33,6 @@ export function resetRemovedChatComposerSecondaryActions() {
export default class ChatemojiReactions {
@service appEvents;
- @service dialog;
@service chat;
@service chatChannelComposer;
@service chatThreadComposer;
@@ -42,7 +41,6 @@ export default class ChatemojiReactions {
@service chatApi;
@service currentUser;
@service site;
- @service router;
@service modal;
@service capabilities;
@service siteSettings;
diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-threads-manager.js b/plugins/chat/assets/javascripts/discourse/lib/chat-threads-manager.js
index fe712f5796d..c77b94204e9 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/chat-threads-manager.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/chat-threads-manager.js
@@ -14,7 +14,6 @@ import ChatThread from "discourse/plugins/chat/discourse/models/chat-thread";
*/
export default class ChatThreadsManager {
- @service chatTrackingStateManager;
@service chatChannelsManager;
@service chatApi;
diff --git a/plugins/chat/assets/javascripts/discourse/lib/hashtag-types/channel.js b/plugins/chat/assets/javascripts/discourse/lib/hashtag-types/channel.js
index 4df19a76e1e..723f1ea62c5 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/hashtag-types/channel.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/hashtag-types/channel.js
@@ -5,7 +5,6 @@ import { iconHTML } from "discourse/lib/icon-library";
export default class ChannelHashtagType extends HashtagTypeBase {
@service chatChannelsManager;
@service currentUser;
- @service site;
get type() {
return "channel";
diff --git a/plugins/chat/assets/javascripts/discourse/lib/textarea-interactor.js b/plugins/chat/assets/javascripts/discourse/lib/textarea-interactor.js
index a11578ae871..7d8d03af8d1 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/textarea-interactor.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/textarea-interactor.js
@@ -12,7 +12,6 @@ import TextareaTextManipulation from "discourse/lib/textarea-text-manipulation";
export default class TextareaInteractor extends EmberObject {
@service capabilities;
@service site;
- @service siteSettings;
textManipulation;
diff --git a/plugins/chat/assets/javascripts/discourse/models/chat-chatable.js b/plugins/chat/assets/javascripts/discourse/models/chat-chatable.js
index 7287a78d72e..f2a58c6c782 100644
--- a/plugins/chat/assets/javascripts/discourse/models/chat-chatable.js
+++ b/plugins/chat/assets/javascripts/discourse/models/chat-chatable.js
@@ -1,5 +1,4 @@
import { tracked } from "@glimmer/tracking";
-import { service } from "@ember/service";
import Category from "discourse/models/category";
import Group from "discourse/models/group";
import User from "discourse/models/user";
@@ -34,8 +33,6 @@ export default class ChatChatable {
});
}
- @service chatChannelsManager;
-
@tracked identifier;
@tracked type;
@tracked model;
diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat/channel/threads.js b/plugins/chat/assets/javascripts/discourse/routes/chat/channel/threads.js
index 873ff958378..9ffff4b759b 100644
--- a/plugins/chat/assets/javascripts/discourse/routes/chat/channel/threads.js
+++ b/plugins/chat/assets/javascripts/discourse/routes/chat/channel/threads.js
@@ -4,7 +4,6 @@ import DiscourseRoute from "discourse/routes/discourse";
export default class ChatChannelThreads extends DiscourseRoute {
@service router;
- @service chatThreadListPane;
@service chatStateManager;
@service chat;
diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat/channels.js b/plugins/chat/assets/javascripts/discourse/routes/chat/channels.js
index 00e9c52823d..860d36abc4c 100644
--- a/plugins/chat/assets/javascripts/discourse/routes/chat/channels.js
+++ b/plugins/chat/assets/javascripts/discourse/routes/chat/channels.js
@@ -5,7 +5,6 @@ export default class ChatChannelsRoute extends DiscourseRoute {
@service chat;
@service chatChannelsManager;
@service router;
- @service siteSettings;
activate() {
this.chat.activeChannel = null;
diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat/index.js b/plugins/chat/assets/javascripts/discourse/routes/chat/index.js
index 6143b9d870f..02aac33363d 100644
--- a/plugins/chat/assets/javascripts/discourse/routes/chat/index.js
+++ b/plugins/chat/assets/javascripts/discourse/routes/chat/index.js
@@ -6,7 +6,6 @@ export default class ChatIndexRoute extends DiscourseRoute {
@service chatChannelsManager;
@service router;
@service siteSettings;
- @service currentUser;
get hasThreads() {
if (!this.siteSettings.chat_threads_enabled) {
diff --git a/plugins/chat/assets/javascripts/discourse/routes/preferences/chat.js b/plugins/chat/assets/javascripts/discourse/routes/preferences/chat.js
index 69b9659ead0..8e438423cda 100644
--- a/plugins/chat/assets/javascripts/discourse/routes/preferences/chat.js
+++ b/plugins/chat/assets/javascripts/discourse/routes/preferences/chat.js
@@ -3,7 +3,6 @@ import { defaultHomepage } from "discourse/lib/utilities";
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default class PreferencesChatRoute extends RestrictedUserRoute {
- @service chat;
@service router;
@service siteSettings;
@service currentUser;
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js b/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js
index 0a5f004e41e..3334c995cb3 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-channels-manager.js
@@ -19,8 +19,6 @@ export default class ChatChannelsManager extends Service {
@service chatSubscriptionsManager;
@service chatStateManager;
@service currentUser;
- @service router;
- @service site;
@service siteSettings;
@tracked _cached = new TrackedObject();
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js b/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
index e5bf3128216..136b794ab6c 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
@@ -254,7 +254,6 @@ export default class ChatDrawerRouter extends Service {
@service chatHistory;
@service chat;
@service siteSettings;
- @service chatStateManager;
@service chatChannelsManager;
@tracked component = null;
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-state-manager.js b/plugins/chat/assets/javascripts/discourse/services/chat-state-manager.js
index 7fc0143a62a..c3355b80979 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-state-manager.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-state-manager.js
@@ -24,7 +24,6 @@ export function resetChatDrawerStateCallbacks() {
export default class ChatStateManager extends Service {
@service chat;
- @service chatHistory;
@service router;
@service site;
@service chatDrawerRouter;
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js b/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js
index 02cb387e386..fd77dc2dbf7 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-subscriptions-manager.js
@@ -6,9 +6,7 @@ import { CHANNEL_STATUSES } from "discourse/plugins/chat/discourse/models/chat-c
import ChatChannelArchive from "../models/chat-channel-archive";
export default class ChatSubscriptionsManager extends Service {
- @service store;
@service chatChannelsManager;
- @service chatTrackingStateManager;
@service currentUser;
@service appEvents;
@service chat;
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-thread-pane.js b/plugins/chat/assets/javascripts/discourse/services/chat-thread-pane.js
index d7b77b55211..e0c2ec478b2 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-thread-pane.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-thread-pane.js
@@ -2,7 +2,6 @@ import { service } from "@ember/service";
import ChatChannelPane from "./chat-channel-pane";
export default class ChatThreadPane extends ChatChannelPane {
- @service chat;
@service router;
get thread() {
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat.js b/plugins/chat/assets/javascripts/discourse/services/chat.js
index 3c2f5fa950a..47d87919f6f 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat.js
@@ -23,13 +23,11 @@ export default class Chat extends Service {
@service chatApi;
@service appEvents;
@service currentUser;
- @service chatNotificationManager;
@service chatSubscriptionsManager;
@service chatStateManager;
@service chatDraftsManager;
@service presence;
@service router;
- @service site;
@service chatChannelsManager;
@service chatTrackingStateManager;
diff --git a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-spam.js b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-spam.js
index 66fd3cf4bee..b3aeb4bca02 100644
--- a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-spam.js
+++ b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-spam.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
export default class DiscourseAiSpamRoute extends DiscourseRoute {
- @service store;
-
model() {
return ajax("/admin/plugins/discourse-ai/ai-spam.json");
}
diff --git a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-translations.js b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-translations.js
index 37eed40add8..a3c61021aad 100644
--- a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-translations.js
+++ b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-translations.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
export default class DiscourseAiTranslationsRoute extends DiscourseRoute {
- @service store;
-
model() {
return ajax("/admin/plugins/discourse-ai/ai-translations.json");
}
diff --git a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-usage.js b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-usage.js
index 08a0399c822..f16b1b2a1ff 100644
--- a/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-usage.js
+++ b/plugins/discourse-ai/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-ai-usage.js
@@ -1,10 +1,7 @@
-import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
export default class DiscourseAiUsageRoute extends DiscourseRoute {
- @service store;
-
model() {
return ajax("/admin/plugins/discourse-ai/ai-usage.json");
}
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-translations.gjs b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-translations.gjs
index 91dff7ed910..bff9ac8ce5f 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-translations.gjs
+++ b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-translations.gjs
@@ -16,7 +16,6 @@ import MultiSelect from "select-kit/components/multi-select";
export default class AiTranslations extends Component {
@service router;
- @service store;
@service languageNameLookup;
@service site;
@service siteSettings;
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/connectors/composer-fields/persona-llm-selector.gjs b/plugins/discourse-ai/assets/javascripts/discourse/connectors/composer-fields/persona-llm-selector.gjs
index c9afb316db5..2f420a85c74 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/connectors/composer-fields/persona-llm-selector.gjs
+++ b/plugins/discourse-ai/assets/javascripts/discourse/connectors/composer-fields/persona-llm-selector.gjs
@@ -1,6 +1,5 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
-import { service } from "@ember/service";
import AiPersonaLlmSelector from "discourse/plugins/discourse-ai/discourse/components/ai-persona-llm-selector";
function isBotMessage(composer, currentUser) {
@@ -19,15 +18,12 @@ function isBotMessage(composer, currentUser) {
}
export default class BotSelector extends Component {
- static shouldRender(args, context) {
+ static shouldRender(args, { currentUser }) {
return (
- context?.currentUser?.ai_enabled_personas &&
- isBotMessage(args.model, context.currentUser)
+ currentUser?.ai_enabled_personas && isBotMessage(args.model, currentUser)
);
}
- @service currentUser;
-
@action
setPersonaIdOnComposer(id) {
this.args.outletArgs.model.metaData = { ai_persona_id: id };
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs b/plugins/discourse-ai/assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs
index 0e3c8b86731..c368e426d84 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs
+++ b/plugins/discourse-ai/assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs
@@ -18,7 +18,6 @@ export default class AiFullPageDiscobotDiscoveries extends Component {
@service capabilities;
@service discobotDiscoveries;
- @service site;
get previewLength() {
if (!this.capabilities.viewport.md) {
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/connectors/topic-map-participants-after/ai-conversation-invite.gjs b/plugins/discourse-ai/assets/javascripts/discourse/connectors/topic-map-participants-after/ai-conversation-invite.gjs
index 9da032fc236..9463a7abb65 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/connectors/topic-map-participants-after/ai-conversation-invite.gjs
+++ b/plugins/discourse-ai/assets/javascripts/discourse/connectors/topic-map-participants-after/ai-conversation-invite.gjs
@@ -11,10 +11,8 @@ export default class AiConversationInvite extends Component {
return args.topic.is_bot_pm;
}
- @service site;
@service modal;
@service header;
- @service sidebarState;
get participants() {
const participants = [
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/services/ai-bot-conversations-hidden-submit.js b/plugins/discourse-ai/assets/javascripts/discourse/services/ai-bot-conversations-hidden-submit.js
index bc7bc02eb9d..e818c9c8a06 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/services/ai-bot-conversations-hidden-submit.js
+++ b/plugins/discourse-ai/assets/javascripts/discourse/services/ai-bot-conversations-hidden-submit.js
@@ -7,7 +7,6 @@ import { getUploadMarkdown } from "discourse/lib/uploads";
import { i18n } from "discourse-i18n";
export default class AiBotConversationsHiddenSubmit extends Service {
- @service aiConversationsSidebarManager;
@service appEvents;
@service composer;
@service dialog;
diff --git a/plugins/discourse-assign/assets/javascripts/discourse/connectors/advanced-search-options-below/assigned-advanced-search.gjs b/plugins/discourse-assign/assets/javascripts/discourse/connectors/advanced-search-options-below/assigned-advanced-search.gjs
index 25ed4c1dd4b..2e20ba044a1 100644
--- a/plugins/discourse-assign/assets/javascripts/discourse/connectors/advanced-search-options-below/assigned-advanced-search.gjs
+++ b/plugins/discourse-assign/assets/javascripts/discourse/connectors/advanced-search-options-below/assigned-advanced-search.gjs
@@ -2,19 +2,16 @@
import Component from "@ember/component";
import { hash } from "@ember/helper";
import { action } from "@ember/object";
-import { service } from "@ember/service";
import { classNames } from "@ember-decorators/component";
import { i18n } from "discourse-i18n";
import EmailGroupUserChooser from "select-kit/components/email-group-user-chooser";
@classNames("assigned-advanced-search")
export default class AssignedAdvancedSearch extends Component {
- static shouldRender(args, component) {
- return component.currentUser?.can_assign;
+ static shouldRender(args, { currentUser }) {
+ return currentUser?.can_assign;
}
- @service currentUser;
-
@action
onChangeAssigned(value) {
this.outletArgs.onChangeSearchedTermField(
diff --git a/plugins/discourse-assign/assets/javascripts/discourse/controllers/user-activity/assigned.js b/plugins/discourse-assign/assets/javascripts/discourse/controllers/user-activity/assigned.js
index 608c21cc6e8..742a69fe642 100644
--- a/plugins/discourse-assign/assets/javascripts/discourse/controllers/user-activity/assigned.js
+++ b/plugins/discourse-assign/assets/javascripts/discourse/controllers/user-activity/assigned.js
@@ -1,6 +1,5 @@
import { inject as controller } from "@ember/controller";
import { action } from "@ember/object";
-import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import UserTopicsList from "discourse/controllers/user-topics-list";
import discourseDebounce from "discourse/lib/debounce";
@@ -11,7 +10,6 @@ import { iconHTML } from "discourse/lib/icon-library";
import { i18n } from "discourse-i18n";
export default class UserActivityAssigned extends UserTopicsList {
- @service taskActions;
@controller user;
queryParams = ["order", "ascending", "search"];
diff --git a/plugins/discourse-assign/assets/javascripts/discourse/routes/user-activity/assigned.js b/plugins/discourse-assign/assets/javascripts/discourse/routes/user-activity/assigned.js
index ee03749afb1..8d7e0544a9f 100644
--- a/plugins/discourse-assign/assets/javascripts/discourse/routes/user-activity/assigned.js
+++ b/plugins/discourse-assign/assets/javascripts/discourse/routes/user-activity/assigned.js
@@ -3,7 +3,8 @@ import UserTopicListRoute from "discourse/routes/user-topic-list";
import { i18n } from "discourse-i18n";
export default class UserActivityAssigned extends UserTopicListRoute {
- @service router;
+ @service currentUser;
+ @service store;
templateName = "user-activity.assigned";
controllerName = "user-activity.assigned";
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/components/category-calendar.gjs b/plugins/discourse-calendar/assets/javascripts/discourse/components/category-calendar.gjs
index bef635ebdda..038bf2ed6ba 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/components/category-calendar.gjs
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/components/category-calendar.gjs
@@ -13,7 +13,6 @@ export default class CategoryCalendar extends Component {
@service currentUser;
@service router;
@service siteSettings;
- @service store;
@service discoursePostEventApi;
@bind
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/components/post-calendar.gjs b/plugins/discourse-calendar/assets/javascripts/discourse/components/post-calendar.gjs
index 23fec844e8e..9e43627be12 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/components/post-calendar.gjs
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/components/post-calendar.gjs
@@ -11,11 +11,9 @@ import { colorToHex, contrastColor, stringToColor } from "../lib/colors";
import FullCalendar from "./full-calendar";
export default class PostCalendar extends Component {
- @service currentUser;
@service siteSettings;
@service capabilities;
@service postCalendar;
- @service store;
@tracked post = this.args.post;
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/connectors/user-custom-preferences/region.gjs b/plugins/discourse-calendar/assets/javascripts/discourse/connectors/user-custom-preferences/region.gjs
index 018423f4baa..18063ae3803 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/connectors/user-custom-preferences/region.gjs
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/connectors/user-custom-preferences/region.gjs
@@ -1,18 +1,15 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
-import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import { i18n } from "discourse-i18n";
import RegionInput from "../../components/region-input";
import { TIME_ZONE_TO_REGION } from "../../lib/regions";
export default class Region extends Component {
- static shouldRender(args, component) {
- return component.siteSettings.calendar_enabled;
+ static shouldRender(args, { siteSettings }) {
+ return siteSettings.calendar_enabled;
}
- @service siteSettings;
-
@action
onChange(value) {
this.args.outletArgs.model.set("custom_fields.holidays-region", value);
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/index.js b/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/index.js
index 471cf031b35..d0d69c181e8 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/index.js
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/index.js
@@ -1,9 +1,6 @@
import Controller from "@ember/controller";
-import { service } from "@ember/service";
export default class DiscoursePostEventUpcomingEventsIndexController extends Controller {
- @service router;
-
get initialView() {
return this.model.view;
}
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/mine.js b/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/mine.js
index 324d87f9ce0..0dce9d65ab2 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/mine.js
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/controllers/discourse-post-event-upcoming-events/mine.js
@@ -1,9 +1,6 @@
import Controller from "@ember/controller";
-import { service } from "@ember/service";
export default class DiscoursePostEventUpcomingEventsMineController extends Controller {
- @service router;
-
get initialView() {
return this.model.view;
}
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/services/discourse-post-event-service.js b/plugins/discourse-calendar/assets/javascripts/discourse/services/discourse-post-event-service.js
index 7218b96ec69..ffbec515567 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/services/discourse-post-event-service.js
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/services/discourse-post-event-service.js
@@ -1,7 +1,6 @@
import Service, { service } from "@ember/service";
export default class DiscoursePostEventService extends Service {
- @service siteSettings;
@service discoursePostEventApi;
async fetchEvents(params = {}) {
diff --git a/plugins/discourse-gamification/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-gamification-leaderboards/show.js b/plugins/discourse-gamification/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-gamification-leaderboards/show.js
index 16d261174a7..989588d509c 100644
--- a/plugins/discourse-gamification/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-gamification-leaderboards/show.js
+++ b/plugins/discourse-gamification/admin/assets/javascripts/discourse/routes/admin-plugins/show/discourse-gamification-leaderboards/show.js
@@ -1,11 +1,8 @@
-import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import GamificationLeaderboard from "discourse/plugins/discourse-gamification/discourse/models/gamification-leaderboard";
export default class DiscourseGamificationLeaderboardShow extends DiscourseRoute {
- @service adminPluginNavManager;
-
model(params) {
const leaderboardsData = this.modelFor(
"adminPlugins.show.discourse-gamification-leaderboards"
diff --git a/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-reaction-post.gjs b/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-reaction-post.gjs
index a3320ec69eb..febf18248fb 100644
--- a/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-reaction-post.gjs
+++ b/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-reaction-post.gjs
@@ -2,7 +2,6 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { hash } from "@ember/helper";
import { action } from "@ember/object";
-import { equal } from "@ember/object/computed";
import { service } from "@ember/service";
import UserStreamItem from "discourse/components/user-stream-item";
import avatar from "discourse/helpers/avatar";
@@ -14,15 +13,11 @@ let cachedNames = new Map();
let pendingSearch = null;
export default class DiscourseReactionsReactionPost extends Component {
- @service site;
@service siteSettings;
@tracked updatedExcerpt = this.args.reaction.post.excerpt;
@tracked updatedExpandedExcerpt = this.args.reaction.post.expandedExcerpt;
- @equal("args.reaction.post.post_type", "site.post_types.moderator_action")
- moderatorAction;
-
constructor() {
super(...arguments);
this.updateMentionedUsernames();
diff --git a/plugins/discourse-solved/assets/javascripts/discourse/components/solved-accepted-answer.gjs b/plugins/discourse-solved/assets/javascripts/discourse/components/solved-accepted-answer.gjs
index c0f6aec376b..3dd111ed647 100644
--- a/plugins/discourse-solved/assets/javascripts/discourse/components/solved-accepted-answer.gjs
+++ b/plugins/discourse-solved/assets/javascripts/discourse/components/solved-accepted-answer.gjs
@@ -10,7 +10,6 @@ import { i18n } from "discourse-i18n";
export default class SolvedAcceptedAnswer extends Component {
@service siteSettings;
- @service store;
get topic() {
return this.args.post.topic;
diff --git a/plugins/discourse-templates/assets/javascripts/discourse/connectors/editor-preview/d-templates.gjs b/plugins/discourse-templates/assets/javascripts/discourse/connectors/editor-preview/d-templates.gjs
index 7a100692045..defc82f6740 100644
--- a/plugins/discourse-templates/assets/javascripts/discourse/connectors/editor-preview/d-templates.gjs
+++ b/plugins/discourse-templates/assets/javascripts/discourse/connectors/editor-preview/d-templates.gjs
@@ -16,7 +16,6 @@ export default class DTemplatesEditorPreview extends Component {
}
@service appEvents;
- @service site;
templatesVisible = false;
onInsertTemplate;