mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 10:58:23 +08:00
e0cc29d658
* FEATURE: themes and components split * two seperate methods to switch theme type * use strict equality operator
20 lines
552 B
JavaScript
20 lines
552 B
JavaScript
import { default as computed } from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Ember.Controller.extend({
|
|
@computed("model", "model.@each", "model.@each.component")
|
|
fullThemes(themes) {
|
|
return _.sortBy(themes.filter(t => !t.get("component")), t => {
|
|
return [
|
|
!t.get("default"),
|
|
!t.get("user_selectable"),
|
|
t.get("name").toLowerCase()
|
|
];
|
|
});
|
|
},
|
|
|
|
@computed("model", "model.@each", "model.@each.component")
|
|
childThemes(themes) {
|
|
return themes.filter(t => t.get("component"));
|
|
}
|
|
});
|