2024-03-13 11:15:12 +08:00
|
|
|
import Component from "@glimmer/component";
|
2024-06-07 09:31:46 +08:00
|
|
|
import { service } from "@ember/service";
|
2024-05-20 12:25:54 +08:00
|
|
|
import DBreadcrumbsContainer from "discourse/components/d-breadcrumbs-container";
|
|
|
|
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
|
|
|
import i18n from "discourse-common/helpers/i18n";
|
2024-03-13 11:15:12 +08:00
|
|
|
import AdminPluginConfigArea from "./admin-plugin-config-area";
|
2024-05-02 09:36:46 +08:00
|
|
|
import AdminPluginConfigMetadata from "./admin-plugin-config-metadata";
|
|
|
|
import AdminPluginConfigTopNav from "./admin-plugin-config-top-nav";
|
2024-03-13 11:15:12 +08:00
|
|
|
|
2024-05-02 09:36:46 +08:00
|
|
|
export default class AdminPluginConfigPage extends Component {
|
2024-03-13 11:15:12 +08:00
|
|
|
@service currentUser;
|
2024-03-21 11:42:06 +08:00
|
|
|
@service adminPluginNavManager;
|
2024-03-13 11:15:12 +08:00
|
|
|
|
|
|
|
get mainAreaClasses() {
|
|
|
|
let classes = ["admin-plugin-config-page__main-area"];
|
|
|
|
|
2024-03-21 11:42:06 +08:00
|
|
|
if (this.adminPluginNavManager.isSidebarMode) {
|
2024-03-13 11:15:12 +08:00
|
|
|
classes.push("-with-inner-sidebar");
|
|
|
|
} else {
|
|
|
|
classes.push("-without-inner-sidebar");
|
|
|
|
}
|
|
|
|
|
|
|
|
return classes.join(" ");
|
|
|
|
}
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="admin-plugin-config-page">
|
2024-05-20 12:25:54 +08:00
|
|
|
<DBreadcrumbsContainer />
|
|
|
|
|
2024-06-07 09:31:46 +08:00
|
|
|
<DBreadcrumbsItem @route="admin" @label={{i18n "admin_title"}} />
|
|
|
|
<DBreadcrumbsItem
|
|
|
|
@route="adminPlugins"
|
|
|
|
@label={{i18n "admin.plugins.title"}}
|
|
|
|
/>
|
|
|
|
<DBreadcrumbsItem
|
|
|
|
@route="adminPlugins.show"
|
|
|
|
@model={{@plugin}}
|
|
|
|
@label={{@plugin.nameTitleized}}
|
|
|
|
/>
|
2024-05-20 12:25:54 +08:00
|
|
|
|
2024-05-02 09:36:46 +08:00
|
|
|
<AdminPluginConfigMetadata @plugin={{@plugin}} />
|
|
|
|
|
2024-05-29 10:20:55 +08:00
|
|
|
{{#if this.adminPluginNavManager.isTopMode}}
|
|
|
|
<AdminPluginConfigTopNav />
|
|
|
|
{{/if}}
|
|
|
|
|
2024-03-13 11:15:12 +08:00
|
|
|
<div class="admin-plugin-config-page__content">
|
|
|
|
<div class={{this.mainAreaClasses}}>
|
2024-03-21 11:42:06 +08:00
|
|
|
<AdminPluginConfigArea>
|
2024-03-13 11:15:12 +08:00
|
|
|
{{yield}}
|
|
|
|
</AdminPluginConfigArea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
}
|