2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/app/assets/javascripts/admin/addon/controllers/admin-plugins.js

26 lines
554 B
JavaScript
Raw Normal View History

import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators";
export default Controller.extend({
@discourseComputed
adminRoutes: function () {
return this.model
.map((p) => {
2018-06-15 17:03:24 +02:00
if (p.get("enabled")) {
return p.admin_route;
}
})
.compact();
},
2018-07-03 11:14:53 +08:00
actions: {
clearFilter() {
this.setProperties({ filter: "", onlyOverridden: false });
},
toggleMenu() {
$(".admin-detail").toggleClass("mobile-closed mobile-open");
},
},
});