discourse/app/assets/javascripts/admin/routes/admin-customize-themes.js.es6
Penar Musaraj 3500acf2f6 FIX: refresh admin/customize/themes route after import
Fixes an issue where the imported color schemes of a theme were not available immediately in the UI.
2019-01-31 14:29:09 -05:00

28 lines
583 B
JavaScript

import showModal from "discourse/lib/show-modal";
export default Ember.Route.extend({
model() {
return this.store.findAll("theme");
},
setupController(controller, model) {
this._super(controller, model);
controller.set("editingTheme", false);
},
actions: {
importModal() {
showModal("admin-import-theme", { admin: true });
},
addTheme(theme) {
this.refresh();
this.transitionTo("adminCustomizeThemes.show", theme.get("id"));
},
showCreateModal() {
showModal("admin-create-theme", { admin: true });
}
}
});