mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 15:34:20 +08:00
5b8652965a
Why this change? This is still a work in progress but allows objects type theme setting to be saved.
33 lines
775 B
JavaScript
33 lines
775 B
JavaScript
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 {
|
|
theme,
|
|
setting,
|
|
};
|
|
}
|
|
|
|
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
|
|
);
|
|
}
|
|
}
|