mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:27:42 +08:00

`discourse-common` was created in the past to share logic between the 'wizard' app and the main 'discourse' app. Since then, the wizard has been consolidated into the main app, so the separation of `discourse-common` is no longer useful. This commit moves `discourse-common/(lib|utils)/*` into `discourse/lib/*`, adds shims for the imports, and updates existing uses in core.
23 lines
618 B
JavaScript
23 lines
618 B
JavaScript
import Controller from "@ember/controller";
|
|
import discourseComputed from "discourse/lib/decorators";
|
|
import { THEMES } from "admin/models/theme";
|
|
|
|
export default class AdminCustomizeThemesController extends Controller {
|
|
currentTab = THEMES;
|
|
|
|
@discourseComputed("model", "model.@each.component")
|
|
fullThemes(themes) {
|
|
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 || [];
|
|
}
|
|
}
|