2022-06-17 20:50:21 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2023-06-15 12:01:04 +08:00
|
|
|
import DisableSidebar from "discourse/mixins/disable-sidebar";
|
2023-10-11 02:38:59 +08:00
|
|
|
import { findWizard } from "wizard/models/wizard";
|
2022-06-17 20:50:21 +08:00
|
|
|
|
2023-06-15 12:01:04 +08:00
|
|
|
export default Route.extend(DisableSidebar, {
|
2022-06-17 20:50:21 +08:00
|
|
|
model() {
|
|
|
|
return findWizard();
|
|
|
|
},
|
|
|
|
|
|
|
|
activate() {
|
2023-06-15 12:01:04 +08:00
|
|
|
this._super(...arguments);
|
|
|
|
|
2022-06-17 20:50:21 +08:00
|
|
|
document.body.classList.add("wizard");
|
2022-10-04 14:23:20 +08:00
|
|
|
|
2022-06-17 20:50:21 +08:00
|
|
|
this.controllerFor("application").setProperties({
|
|
|
|
showTop: false,
|
2022-10-04 14:23:20 +08:00
|
|
|
showSiteHeader: false,
|
2022-06-17 20:50:21 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
deactivate() {
|
2023-06-15 12:01:04 +08:00
|
|
|
this._super(...arguments);
|
|
|
|
|
2022-06-17 20:50:21 +08:00
|
|
|
document.body.classList.remove("wizard");
|
2022-10-04 14:23:20 +08:00
|
|
|
|
|
|
|
this.controllerFor("application").setProperties({
|
|
|
|
showTop: true,
|
|
|
|
showSiteHeader: true,
|
|
|
|
});
|
2022-06-17 20:50:21 +08:00
|
|
|
},
|
|
|
|
});
|