mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
Rename .js.es6
to .js
in the admin application
This commit is contained in:
18
app/assets/javascripts/admin/controllers/admin-badges.js
Normal file
18
app/assets/javascripts/admin/controllers/admin-badges.js
Normal file
@ -0,0 +1,18 @@
|
||||
import Controller from "@ember/controller";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Controller.extend({
|
||||
routing: service("-routing"),
|
||||
|
||||
@discourseComputed("routing.currentRouteName")
|
||||
selectedRoute() {
|
||||
const currentRoute = this.routing.currentRouteName;
|
||||
const indexRoute = "adminBadges.index";
|
||||
if (currentRoute === indexRoute) {
|
||||
return "adminBadges.show";
|
||||
} else {
|
||||
return this.routing.currentRouteName;
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user