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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
627 B
JavaScript
Raw Normal View History

import Controller from "@ember/controller";
2018-08-30 15:23:15 -04:00
import { THEMES } from "admin/models/theme";
import discourseComputed from "discourse-common/utils/decorators";
export default class AdminCustomizeThemesController extends Controller {
currentTab = THEMES;
2018-08-30 15:23:15 -04:00
@discourseComputed("model", "model.@each.component")
fullThemes(themes) {
2018-08-30 15:23:15 -04:00
return themes.filter((t) => !t.get("component"));
}
@discourseComputed("model", "model.@each.component")
childThemes(themes) {
return themes.filter((t) => t.get("component"));
}
@discourseComputed("model.content")
installedThemes(content) {
return content || [];
}
}