2024-03-06 08:24:29 +08:00
|
|
|
import Route from "@ember/routing/route";
|
|
|
|
|
|
|
|
export default class AdminCustomizeThemesShowSchemaRoute extends Route {
|
|
|
|
model(params) {
|
|
|
|
const theme = this.modelFor("adminCustomizeThemesShow");
|
|
|
|
const setting = theme.settings.findBy("setting", params.setting_name);
|
|
|
|
|
|
|
|
return {
|
2024-03-13 06:52:46 +08:00
|
|
|
theme,
|
|
|
|
setting,
|
2024-03-06 08:24:29 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
setupController() {
|
|
|
|
super.setupController(...arguments);
|
|
|
|
this.controllerFor("adminCustomizeThemes").set("editingTheme", true);
|
|
|
|
|
|
|
|
this.controllerFor("adminCustomizeThemes.show").set(
|
|
|
|
"editingThemeSetting",
|
|
|
|
true
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
deactivate() {
|
|
|
|
this.controllerFor("adminCustomizeThemes").set("editingTheme", false);
|
|
|
|
|
|
|
|
this.controllerFor("adminCustomizeThemes.show").set(
|
|
|
|
"editingThemeSetting",
|
|
|
|
false
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|