discourse/app/assets/javascripts/admin/addon/templates/dashboard.hbs
Martin Brennan a879bcdc35
DEV: Introduce <DPageHeader /> and <DPageSubheader /> components (#30146)
This converts the `<AdminPageHeader />` component and the
`<AdminPageSubheader />` components into new components
that can be used outside of admin, and updates the CSS classes.
Also introduces a `<DPageActionButton />` component and child
components for the header action buttons.

I have to keep the old admin-only components around for
now until plugins are updated, then we can remove it,
and remove the re-exports that are done within
admin-page-action-button.gjs
2024-12-18 08:13:39 +10:00

65 lines
1.7 KiB
Handlebars

<span>
<PluginOutlet @name="admin-dashboard-top" @connectorTagName="div" />
</span>
<DPageHeader @hideTabs={{true}}>
<:breadcrumbs>
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin.dashboard.title"}} />
</:breadcrumbs>
</DPageHeader>
{{#if this.showVersionChecks}}
<div class="section-top">
<div class="version-checks">
<VersionChecks @versionCheck={{this.versionCheck}} @tagName="" />
</div>
</div>
{{/if}}
<DashboardProblems
@loadingProblems={{this.loadingProblems}}
@problems={{this.problems}}
@problemsTimestamp={{this.problemsTimestamp}}
@refreshProblems={{action "refreshProblems"}}
/>
<nav>
<ul class="nav nav-pills">
<li class="navigation-item general">
<LinkTo @route="admin.dashboard.general" class="navigation-link">
{{i18n "admin.dashboard.general_tab"}}
</LinkTo>
</li>
{{#if this.isModerationTabVisible}}
<li class="navigation-item moderation">
<LinkTo @route="admin.dashboardModeration" class="navigation-link">
{{i18n "admin.dashboard.moderation_tab"}}
</LinkTo>
</li>
{{/if}}
{{#if this.isSecurityTabVisible}}
<li class="navigation-item security">
<LinkTo @route="admin.dashboardSecurity" class="navigation-link">
{{i18n "admin.dashboard.security_tab"}}
</LinkTo>
</li>
{{/if}}
{{#if this.isReportsTabVisible}}
<li class="navigation-item reports">
<LinkTo @route="admin.dashboardReports" class="navigation-link">
{{i18n "admin.dashboard.reports_tab"}}
</LinkTo>
</li>
{{/if}}
<PluginOutlet @name="admin-dashboard-tabs-after" />
</ul>
</nav>
{{outlet}}
<span>
<PluginOutlet @name="admin-dashboard-bottom" @connectorTagName="div" />
</span>