discourse/app/assets/javascripts/admin/addon/components/admin-wrapper.js

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

16 lines
514 B
JavaScript
Raw Normal View History

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");
}
}