mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-21 19:42:54 +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.
20 lines
592 B
Text
Vendored
20 lines
592 B
Text
Vendored
import Component from "@glimmer/component";
|
|
import { service } from "@ember/service";
|
|
import { i18n } from "discourse-i18n";
|
|
import AdminBadgesList from "admin/components/admin-badges-list";
|
|
|
|
export default class AdminBadgesIndex extends Component {
|
|
@service adminBadges;
|
|
|
|
get badges() {
|
|
return this.adminBadges.badges;
|
|
}
|
|
|
|
<template>
|
|
<AdminBadgesList @badges={{this.badges}} />
|
|
<section class="current-badge content-body">
|
|
<h2>{{i18n "admin.badges.badge_intro.title"}}</h2>
|
|
<p>{{i18n "admin.badges.badge_intro.description"}}</p>
|
|
</section>
|
|
</template>
|
|
}
|