2018-06-15 23:03:24 +08:00
|
|
|
import { default as computed } from "ember-addons/ember-computed-decorators";
|
2017-04-18 03:56:13 +08:00
|
|
|
|
|
|
|
export default Ember.Controller.extend({
|
2018-08-24 09:30:00 +08:00
|
|
|
@computed("model", "model.@each", "model.@each.component")
|
|
|
|
fullThemes(themes) {
|
|
|
|
return _.sortBy(themes.filter(t => !t.get("component")), t => {
|
2018-06-15 23:03:24 +08:00
|
|
|
return [
|
|
|
|
!t.get("default"),
|
|
|
|
!t.get("user_selectable"),
|
|
|
|
t.get("name").toLowerCase()
|
|
|
|
];
|
2017-04-18 03:56:13 +08:00
|
|
|
});
|
2018-08-24 09:30:00 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
@computed("model", "model.@each", "model.@each.component")
|
|
|
|
childThemes(themes) {
|
|
|
|
return themes.filter(t => t.get("component"));
|
2017-04-18 03:56:13 +08:00
|
|
|
}
|
|
|
|
});
|