diff --git a/app/assets/javascripts/admin/addon/components/admin-config-areas/flags-settings.gjs b/app/assets/javascripts/admin/addon/components/admin-config-areas/flags-settings.gjs new file mode 100644 index 00000000000..5d465480370 --- /dev/null +++ b/app/assets/javascripts/admin/addon/components/admin-config-areas/flags-settings.gjs @@ -0,0 +1,47 @@ +import Component from "@glimmer/component"; +import { tracked } from "@glimmer/tracking"; +import didInsert from "@ember/render-modifiers/modifiers/did-insert"; +import { service } from "@ember/service"; +import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item"; +import SiteSettingFilter from "discourse/lib/site-setting-filter"; +import i18n from "discourse-common/helpers/i18n"; +import { bind } from "discourse-common/utils/decorators"; +import AdminFilteredSiteSettings from "admin/components/admin-filtered-site-settings"; +import SiteSetting from "admin/models/site-setting"; + +export default class AdminConfigAreasFlagsSettings extends Component { + @service siteSettings; + @tracked settings; + + @bind + loadSettings() { + SiteSetting.findAll({ + categories: ["spam", "rate_limits", "chat"], + }).then((settings) => { + this.settings = new SiteSettingFilter(settings).performSearch( + "flags", + {} + ); + }); + } + + +} diff --git a/app/assets/javascripts/admin/addon/components/admin-config-areas/flags.gjs b/app/assets/javascripts/admin/addon/components/admin-config-areas/flags.gjs index b5ba12975fd..0c7a08bcd14 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-areas/flags.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-areas/flags.gjs @@ -2,14 +2,13 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { action } from "@ember/object"; import { service } from "@ember/service"; -import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { SYSTEM_FLAG_IDS } from "discourse/lib/constants"; import i18n from "discourse-common/helpers/i18n"; import { bind } from "discourse-common/utils/decorators"; import AdminFlagItem from "admin/components/admin-flag-item"; -import AdminPageHeader from "admin/components/admin-page-header"; +import AdminPageSubheader from "admin/components/admin-page-subheader"; export default class AdminConfigAreasFlags extends Component { @service site; @@ -70,28 +69,19 @@ export default class AdminConfigAreasFlags extends Component { }