discourse/app/assets/javascripts/admin/routes/admin-site-settings-index.js.es6

14 lines
361 B
Plaintext
Raw Normal View History

2015-03-03 01:12:19 +08:00
/**
Handles when you click the Site Settings tab in admin, but haven't
chosen a category. It will redirect to the first category.
**/
export default Discourse.Route.extend({
beforeModel() {
2018-06-15 23:03:24 +08:00
this.replaceWith(
"adminSiteSettingsCategory",
this.controllerFor("adminSiteSettings").get("visibleSiteSettings")[0]
.nameKey
2018-06-15 23:03:24 +08:00
);
2015-03-03 01:12:19 +08:00
}
});