mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 09:35:25 +08:00

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
19 lines
520 B
JavaScript
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
|
|
);
|
|
}
|
|
}
|