mirror of
https://github.com/discourse/discourse.git
synced 2024-12-09 15:43:39 +08:00
8632ea5a63
This commit changes the custom flags admin config area to use the AdminPageHeader component and conforms to the new admin UI guidelines. Also makes some slight modifications to the reusable components to handle using a @route for an action button.
34 lines
975 B
Plaintext
34 lines
975 B
Plaintext
import { hash } from "@ember/helper";
|
|
import { htmlSafe } from "@ember/template";
|
|
import i18n from "discourse-common/helpers/i18n";
|
|
import {
|
|
DangerButton,
|
|
DefaultButton,
|
|
PrimaryButton,
|
|
} from "admin/components/admin-page-action-button";
|
|
|
|
const AdminPageSubheader = <template>
|
|
<div class="admin-page-subheader">
|
|
<div class="admin-page-subheader__title-row">
|
|
<h3 class="admin-page-subheader__title">{{i18n @titleLabel}}</h3>
|
|
<div class="admin-page-subheader__actions">
|
|
{{yield
|
|
(hash Primary=PrimaryButton Default=DefaultButton Danger=DangerButton)
|
|
to="actions"
|
|
}}
|
|
</div>
|
|
|
|
{{#if @descriptionLabel}}
|
|
<p class="admin-page-header__description">
|
|
{{i18n @descriptionLabel}}
|
|
{{#if @learnMoreUrl}}
|
|
{{htmlSafe (i18n "learn_more_with_link" url=@learnMoreUrl)}}
|
|
{{/if}}
|
|
</p>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</template>;
|
|
|
|
export default AdminPageSubheader;
|