mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 09:23:44 +08:00
914f93b896
* Simplify config nav link generation to always inject the Settings tab * Auto-redirect to the first non-settings config link (if there is one) when the user lands on /admin/plugins/:plugin_id * Add `extras` to admin plugin serializer so plugins can add more data on first load * Add PikadayCalendar page object for system specs, extracted from the CalendarDateTimePicker to make it more generic.
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class AdminPluginsShowIndexRoute extends Route {
|
|
@service router;
|
|
@service adminPluginNavManager;
|
|
|
|
model() {
|
|
return this.modelFor("adminPlugins.show");
|
|
}
|
|
|
|
afterModel(model) {
|
|
if (this.adminPluginNavManager.currentPluginDefaultRoute) {
|
|
this.router.replaceWith(
|
|
this.adminPluginNavManager.currentPluginDefaultRoute,
|
|
model.id
|
|
);
|
|
}
|
|
}
|
|
}
|