2019-10-23 13:06:54 -04:00
|
|
|
import Controller from "@ember/controller";
|
2020-01-16 18:56:53 +01:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2023-10-10 19:38:59 +01:00
|
|
|
import { THEMES } from "admin/models/theme";
|
2017-04-17 15:56:13 -04:00
|
|
|
|
2023-03-15 09:42:12 +00:00
|
|
|
export default class AdminCustomizeThemesController extends Controller {
|
|
|
|
currentTab = THEMES;
|
2018-08-30 22:23:15 +03:00
|
|
|
|
2019-11-07 15:38:28 -06:00
|
|
|
@discourseComputed("model", "model.@each.component")
|
2018-08-24 04:30:00 +03:00
|
|
|
fullThemes(themes) {
|
2018-08-30 22:23:15 +03:00
|
|
|
return themes.filter((t) => !t.get("component"));
|
2023-03-15 09:42:12 +00:00
|
|
|
}
|
2018-08-24 04:30:00 +03:00
|
|
|
|
2019-11-07 15:38:28 -06:00
|
|
|
@discourseComputed("model", "model.@each.component")
|
2018-08-24 04:30:00 +03:00
|
|
|
childThemes(themes) {
|
|
|
|
return themes.filter((t) => t.get("component"));
|
2023-03-15 09:42:12 +00:00
|
|
|
}
|
2019-02-20 14:58:31 -05:00
|
|
|
|
2021-02-25 00:10:17 +03:00
|
|
|
@discourseComputed("model.content")
|
|
|
|
installedThemes(content) {
|
|
|
|
return content || [];
|
2023-03-15 09:42:12 +00:00
|
|
|
}
|
|
|
|
}
|