discourse/app/assets/javascripts/admin/routes/admin-customize-themes.js.es6

25 lines
533 B
Plaintext
Raw Normal View History

import Route from "@ember/routing/route";
2018-06-15 23:03:24 +08:00
import showModal from "discourse/lib/show-modal";
export default Route.extend({
model() {
2018-06-15 23:03:24 +08:00
return this.store.findAll("theme");
},
setupController(controller, model) {
this._super(controller, model);
controller.set("editingTheme", false);
},
actions: {
installModal() {
showModal("admin-install-theme", { admin: true });
},
addTheme(theme) {
this.refresh();
2018-06-15 23:03:24 +08:00
this.transitionTo("adminCustomizeThemes.show", theme.get("id"));
}
}
});