FEATURE: Add admin-area class to HTML tag (#12459)

This commit is contained in:
Kris 2021-03-21 20:36:26 -04:00 committed by GitHub
parent 942ee1e218
commit 9526c1a27b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,13 @@ import Component from "@ember/component";
export default Component.extend({
didInsertElement() {
this._super(...arguments);
$("body").addClass("admin-interface");
document.querySelector("html").classList.add("admin-area");
document.querySelector("body").classList.add("admin-interface");
},
willDestroyElement() {
this._super(...arguments);
$("body").removeClass("admin-interface");
document.querySelector("html").classList.remove("admin-area");
document.querySelector("body").classList.remove("admin-interface");
},
});