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";
|
2017-04-17 15:56:13 -04:00
|
|
|
|
|
|
|
export default Ember.Controller.extend({
|
2018-08-30 15:23:15 -04:00
|
|
|
currentTab: THEMES,
|
|
|
|
|
|
|
|
@computed("model", "model.@each.component")
|
2018-08-23 21:30:00 -04:00
|
|
|
fullThemes(themes) {
|
2018-08-30 15:23:15 -04:00
|
|
|
return themes.filter(t => !t.get("component"));
|
2018-08-23 21:30:00 -04:00
|
|
|
},
|
|
|
|
|
2018-08-30 15:23:15 -04:00
|
|
|
@computed("model", "model.@each.component")
|
2018-08-23 21:30:00 -04:00
|
|
|
childThemes(themes) {
|
|
|
|
return themes.filter(t => t.get("component"));
|
2019-02-20 14:58:31 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
@computed("model", "model.@each.component")
|
|
|
|
installedThemes(themes) {
|
|
|
|
return themes.map(t => t.name);
|
2017-04-17 15:56:13 -04:00
|
|
|
}
|
|
|
|
});
|