2019-10-23 13:06:54 -04:00
|
|
|
import Controller from "@ember/controller";
|
2018-08-30 15:23:15 -04:00
|
|
|
import { THEMES } from "admin/models/theme";
|
2020-01-16 12:56:53 -05:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2017-04-17 15:56:13 -04:00
|
|
|
|
2019-10-23 13:06:54 -04:00
|
|
|
export default Controller.extend({
|
2018-08-30 15:23:15 -04:00
|
|
|
currentTab: THEMES,
|
|
|
|
|
2019-11-07 16:38:28 -05:00
|
|
|
@discourseComputed("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
|
|
|
},
|
|
|
|
|
2019-11-07 16:38:28 -05:00
|
|
|
@discourseComputed("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
|
|
|
},
|
|
|
|
|
2021-02-24 16:10:17 -05:00
|
|
|
@discourseComputed("model.content")
|
|
|
|
installedThemes(content) {
|
|
|
|
return content || [];
|
2017-04-17 15:56:13 -04:00
|
|
|
},
|
|
|
|
});
|