discourse/app/assets/javascripts/admin/addon/routes/admin-customize-theme-components.js
Martin Brennan 986fb522be
FEATURE: Add theme-components route for admin (#24264)
This commit adds an /admin/customize/theme-components route,
that opens the theme page with the components tab pre-selected,
so people can navigate to that directly.
2023-11-08 13:42:27 +10:00

15 lines
392 B
JavaScript

import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";
import { COMPONENTS } from "admin/models/theme";
export default class AdminCustomizeThemeComponents extends Route {
@service router;
beforeModel(transition) {
transition.abort();
this.router.transitionTo("adminCustomizeThemes", {
queryParams: { tab: COMPONENTS },
});
}
}