mirror of
https://github.com/discourse/discourse.git
synced 2025-02-23 06:43:09 +08:00

This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
16 lines
514 B
JavaScript
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");
|
|
}
|
|
}
|