2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2018-06-15 23:03:24 +08:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
2017-04-12 22:52:52 +08:00
|
|
|
|
2019-10-24 00:39:32 +08:00
|
|
|
export default Route.extend({
|
2017-04-12 22:52:52 +08:00
|
|
|
model() {
|
2018-06-15 23:03:24 +08:00
|
|
|
return this.store.findAll("theme");
|
2017-04-12 22:52:52 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController(controller, model) {
|
|
|
|
this._super(controller, model);
|
|
|
|
controller.set("editingTheme", false);
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2019-02-21 03:58:31 +08:00
|
|
|
installModal() {
|
|
|
|
showModal("admin-install-theme", { admin: true });
|
2017-04-12 22:52:52 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
addTheme(theme) {
|
2019-02-01 03:29:09 +08:00
|
|
|
this.refresh();
|
2018-06-15 23:03:24 +08:00
|
|
|
this.transitionTo("adminCustomizeThemes.show", theme.get("id"));
|
2017-04-12 22:52:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|