mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 19:15:04 +08:00
e0cc29d658
* FEATURE: themes and components split * two seperate methods to switch theme type * use strict equality operator
29 lines
647 B
JavaScript
29 lines
647 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) {
|
|
const all = this.modelFor("adminCustomizeThemes");
|
|
all.pushObject(theme);
|
|
this.transitionTo("adminCustomizeThemes.show", theme.get("id"));
|
|
},
|
|
|
|
showCreateModal() {
|
|
showModal("admin-create-theme", { admin: true });
|
|
}
|
|
}
|
|
});
|