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