mirror of
https://github.com/discourse/discourse.git
synced 2024-12-30 08:04:53 +08:00
32665cf9dd
Enables our new eslint rules which enforce consistent i18n imports. For more info, see 0d58b40cd7
55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
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 { ajax } from "discourse/lib/ajax";
|
|
import { bind } from "discourse-common/utils/decorators";
|
|
import { i18n } from "discourse-i18n";
|
|
import AdminFilteredSiteSettings from "admin/components/admin-filtered-site-settings";
|
|
import SiteSetting from "admin/models/site-setting";
|
|
|
|
export default class AdminConfigAreasEmojisSettings extends Component {
|
|
@service siteSettings;
|
|
@tracked settings;
|
|
|
|
@bind
|
|
loadSettings() {
|
|
ajax("/admin/config/site_settings.json", {
|
|
data: {
|
|
filter_area: "emojis",
|
|
},
|
|
}).then((result) => {
|
|
this.settings = [
|
|
{
|
|
name: "All",
|
|
nameKey: "all_results",
|
|
siteSettings: result.site_settings.map((setting) =>
|
|
SiteSetting.create(setting)
|
|
),
|
|
},
|
|
];
|
|
});
|
|
}
|
|
|
|
<template>
|
|
<DBreadcrumbsItem
|
|
@path="/admin/customize/emojis/settings"
|
|
@label={{i18n "settings"}}
|
|
/>
|
|
|
|
<div
|
|
class="content-body admin-config-area__settings admin-detail pull-left"
|
|
{{didInsert this.loadSettings}}
|
|
>
|
|
{{#if this.settings}}
|
|
<AdminFilteredSiteSettings
|
|
@initialFilter={{@initialFilter}}
|
|
@onFilterChanged={{@onFilterChanged}}
|
|
@settings={{this.settings}}
|
|
/>
|
|
{{/if}}
|
|
</div>
|
|
</template>
|
|
}
|