discourse/app/assets/javascripts/admin/addon/routes/admin-site-settings-index.js
Martin Brennan f95464ba81
Revert "UX: Hide inner site settings sidebar if admin sidebar enabled (#31047)" (#31267)
This reverts commit 91e9c1c81343990d5ebbb3a3bb7c68ec4445d610.

After feedback, for now we are reverting this change. This is not
permanent, the settings sidebar will be removed again, after we:

* Visually group the settings the same way as the sidebar does
  on All Settings
* Add more settings pages to the main admin sidebar to cover the ~250
  settings not yet represented there
2025-02-11 12:47:40 +10:00

19 lines
520 B
JavaScript

/**
Handles when you click the Site Settings tab in admin, but haven't
chosen a category. It will redirect to the first category.
**/
import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
export default class AdminSiteSettingsIndexRoute extends DiscourseRoute {
@service router;
beforeModel() {
this.router.replaceWith(
"adminSiteSettingsCategory",
this.controllerFor("adminSiteSettings").get("visibleSiteSettings")[0]
.nameKey
);
}
}