mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 21:08:03 +08:00
DEV: refactors admin-plugins/admin-site-settings (#15244)
- drops jQuery usage - removes apparently useless clearfix - uses @action - drops unused clearFilter function in admin-plugins
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { action } from "@ember/object";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -13,13 +14,11 @@ export default Controller.extend({
|
||||
.compact();
|
||||
},
|
||||
|
||||
actions: {
|
||||
clearFilter() {
|
||||
this.setProperties({ filter: "", onlyOverridden: false });
|
||||
},
|
||||
|
||||
toggleMenu() {
|
||||
$(".admin-detail").toggleClass("mobile-closed mobile-open");
|
||||
},
|
||||
@action
|
||||
toggleMenu() {
|
||||
const adminDetail = document.querySelector(".admin-detail");
|
||||
["mobile-closed", "mobile-open"].forEach((state) => {
|
||||
adminDetail.classList.toggle(state);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user