discourse/app/assets/javascripts/wizard/addon/routes/wizard.js
Jarek Radosz fcb4e5a1a1
DEV: Make wizard an ember addon (#17027)
Co-authored-by: David Taylor <david@taylorhq.com>
2022-06-17 14:50:21 +02:00

22 lines
472 B
JavaScript

import Route from "@ember/routing/route";
import { findWizard } from "wizard/models/wizard";
export default Route.extend({
model() {
return findWizard();
},
activate() {
document.body.classList.add("wizard");
this.controllerFor("application").setProperties({
showTop: false,
showFooter: false,
});
},
deactivate() {
document.body.classList.remove("wizard");
this.controllerFor("application").set("showTop", true);
},
});