mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 20:16:17 +08:00
24 lines
596 B
JavaScript
24 lines
596 B
JavaScript
import { tracked } from "@glimmer/tracking";
|
|
import Controller from "@ember/controller";
|
|
import { service } from "@ember/service";
|
|
|
|
export default class AdminBadgesController extends Controller {
|
|
@service router;
|
|
|
|
// Set by the route
|
|
@tracked badgeGroupings;
|
|
@tracked badgeTypes;
|
|
@tracked protectedSystemFields;
|
|
@tracked badgeTriggers;
|
|
|
|
get selectedRoute() {
|
|
const currentRoute = this.router.currentRouteName;
|
|
const indexRoute = "adminBadges.index";
|
|
if (currentRoute === indexRoute) {
|
|
return "adminBadges.show";
|
|
} else {
|
|
return currentRoute;
|
|
}
|
|
}
|
|
}
|