mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 17:41:55 +08:00
Follow-up to https://github.com/discourse/discourse/pull/30953 This PR is a partial revert of the linked PR — it changes the "Themes and components" link in the admin sidebar back to the legacy `/admin/customize/themes` page and adds the themes list/sidebar back to the left hand side of the page. The new `/admin/config/customize/` route is still available, but it's not linked from anywhere. When accessing the new page and then navigating to a theme, the old components (e.g. the themes list) of the page are hidden. This allows us to iterate on the new page and improve until we're more ready to make it available more widely.
24 lines
701 B
JavaScript
Vendored
24 lines
701 B
JavaScript
Vendored
import { tracked } from "@glimmer/tracking";
|
|
import Controller from "@ember/controller";
|
|
import discourseComputed from "discourse/lib/decorators";
|
|
import { THEMES } from "admin/models/theme";
|
|
|
|
export default class AdminCustomizeThemesController extends Controller {
|
|
@tracked fromNewConfigPage = false;
|
|
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 || [];
|
|
}
|
|
}
|