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

15 lines
362 B
Plaintext
Raw Normal View History

2018-06-15 11:03:24 -04:00
import { default as computed } from "ember-addons/ember-computed-decorators";
export default Ember.Controller.extend({
2018-06-15 11:03:24 -04:00
@computed("model", "model.@each")
sortedThemes(themes) {
return _.sortBy(themes.content, t => {
2018-06-15 11:03:24 -04:00
return [
!t.get("default"),
!t.get("user_selectable"),
t.get("name").toLowerCase()
];
});
}
});