discourse/app/assets/javascripts/admin/addon/components/admin-wrapper.js
David Taylor a433b30650
DEV: Convert admin component definitions to native class syntax (#20311)
This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
2023-02-23 15:32:53 +00:00

16 lines
514 B
JavaScript

import Component from "@ember/component";
export default class AdminWrapper extends Component {
didInsertElement() {
super.didInsertElement(...arguments);
document.querySelector("html").classList.add("admin-area");
document.querySelector("body").classList.add("admin-interface");
}
willDestroyElement() {
super.willDestroyElement(...arguments);
document.querySelector("html").classList.remove("admin-area");
document.querySelector("body").classList.remove("admin-interface");
}
}