2023-11-02 08:34:37 +08:00
|
|
|
import { inject as service } from "@ember/service";
|
2019-10-22 21:46:10 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2023-11-02 08:34:37 +08:00
|
|
|
import { MAIN_PANEL } from "discourse/services/sidebar-state";
|
2023-10-18 18:07:09 +08:00
|
|
|
import I18n from "discourse-i18n";
|
2019-10-22 21:46:10 +08:00
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
export default class AdminRoute extends DiscourseRoute {
|
2023-11-02 08:34:37 +08:00
|
|
|
@service sidebarState;
|
|
|
|
|
2015-08-08 00:06:55 +08:00
|
|
|
titleToken() {
|
|
|
|
return I18n.t("admin_title");
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2015-08-08 00:06:55 +08:00
|
|
|
|
|
|
|
activate() {
|
|
|
|
this.controllerFor("application").setProperties({
|
|
|
|
showTop: false,
|
|
|
|
});
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2015-08-08 00:06:55 +08:00
|
|
|
|
|
|
|
deactivate() {
|
|
|
|
this.controllerFor("application").set("showTop", true);
|
2023-11-02 08:34:37 +08:00
|
|
|
this.sidebarState.setPanel(MAIN_PANEL);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
|
|
|
}
|