mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 17:41:55 +08:00
This change does two things: Modernizes the admin badges UI implementation. (Routes + controllers → components + services.) Adds a Settings tab to the new badges page. For all intents and purposes, this change is a lift-and-shift modernization. The addition of the settings tab is trivial once that is covered.
15 lines
361 B
JavaScript
Vendored
15 lines
361 B
JavaScript
Vendored
import { service } from "@ember/service";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
import { i18n } from "discourse-i18n";
|
|
|
|
export default class AdminBadgesRoute extends DiscourseRoute {
|
|
@service adminBadges;
|
|
|
|
titleToken() {
|
|
return i18n("admin.config.badges.title");
|
|
}
|
|
|
|
async model() {
|
|
await this.adminBadges.fetchBadges();
|
|
}
|
|
}
|