discourse/app/assets/javascripts/admin/addon/controllers/admin-plugins.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
585 B
JavaScript
Raw Normal View History

import { action } from "@ember/object";
import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators";
export default Controller.extend({
@discourseComputed
adminRoutes() {
return this.model
.map((p) => {
if (p.get("enabled")) {
return p.admin_route;
}
})
.compact();
},
@action
toggleMenu() {
const adminDetail = document.querySelector(".admin-detail");
["mobile-closed", "mobile-open"].forEach((state) => {
adminDetail.classList.toggle(state);
});
2018-07-03 11:14:53 +08:00
},
});