discourse/app/assets/javascripts/admin/addon/routes/admin-emojis.js
Ted Johansson 189d98f3ca
DEV: Convert admin emojis UI to new layout (#29615)
This PR converts the custom emoji UI in the admin pages to follow the new admin UI guidelines.
2024-11-11 15:04:15 +08:00

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));
}
}