mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 09:53:43 +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.
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
import Component from "@glimmer/component";
|
|
import { inject as service } from "@ember/service";
|
|
import AdminPluginConfigArea from "./admin-plugin-config-area";
|
|
import AdminPluginConfigMetadata from "./admin-plugin-config-metadata";
|
|
import AdminPluginConfigTopNav from "./admin-plugin-config-top-nav";
|
|
|
|
export default class AdminPluginConfigPage extends Component {
|
|
@service currentUser;
|
|
@service adminPluginNavManager;
|
|
|
|
get mainAreaClasses() {
|
|
let classes = ["admin-plugin-config-page__main-area"];
|
|
|
|
if (this.adminPluginNavManager.isSidebarMode) {
|
|
classes.push("-with-inner-sidebar");
|
|
} else {
|
|
classes.push("-without-inner-sidebar");
|
|
}
|
|
|
|
return classes.join(" ");
|
|
}
|
|
|
|
<template>
|
|
<div class="admin-plugin-config-page">
|
|
{{#if this.adminPluginNavManager.isTopMode}}
|
|
<AdminPluginConfigTopNav />
|
|
{{/if}}
|
|
|
|
<AdminPluginConfigMetadata @plugin={{@plugin}} />
|
|
|
|
<div class="admin-plugin-config-page__content">
|
|
<div class={{this.mainAreaClasses}}>
|
|
<AdminPluginConfigArea>
|
|
{{yield}}
|
|
</AdminPluginConfigArea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
}
|