mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 17:53:46 +08:00
189d98f3ca
This PR converts the custom emoji UI in the admin pages to follow the new admin UI guidelines.
16 lines
450 B
JavaScript
16 lines
450 B
JavaScript
import EmberObject from "@ember/object";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
import I18n from "discourse-i18n";
|
|
|
|
export default class AdminEmojisRoute extends DiscourseRoute {
|
|
titleToken() {
|
|
return I18n.t("admin.emoji.title");
|
|
}
|
|
|
|
async model() {
|
|
const emojis = await ajax("/admin/customize/emojis.json");
|
|
return emojis.map((emoji) => EmberObject.create(emoji));
|
|
}
|
|
}
|