discourse/app/assets/javascripts/admin/addon/controllers/admin-customize-themes.js
Krzysztof Kotlarek c4ff6bd40e
DEV: remove old themes/components code (#32875)
Recently, themes page was rebranded and put
`/admin/config/customize/themes`. In this PR, old
`/admin/customize/themes` was removed. In addition, when an admin visits
an old URL, they are redirected to the new one.
2025-05-26 09:21:15 +08:00

22 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 || [];
}
}