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

22 lines
560 B
Plaintext
Raw Normal View History

2018-06-15 11:03:24 -04:00
import { default as computed } from "ember-addons/ember-computed-decorators";
2018-08-30 15:23:15 -04:00
import { THEMES } from "admin/models/theme";
export default Ember.Controller.extend({
2018-08-30 15:23:15 -04:00
currentTab: THEMES,
@computed("model", "model.@each.component")
fullThemes(themes) {
2018-08-30 15:23:15 -04:00
return themes.filter(t => !t.get("component"));
},
2018-08-30 15:23:15 -04:00
@computed("model", "model.@each.component")
childThemes(themes) {
return themes.filter(t => t.get("component"));
},
@computed("model", "model.@each.component")
installedThemes(themes) {
return themes.map(t => t.name);
}
});