mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-23 07:31:09 +02:00
* build kv-patch-editor component * add tests * use validator helpers in kv-object-editor * update class name in version-history * remove is- from css class * move whitespace warning and non-string values warning messages to validators util * break editor component into smaller ones * fix typo * add docs * rename files and move to directory, add tests for new templates * fix some bugs and add tests! * fix validation bug and update tests * capitalize item in helper * remove comment * and one more comment change
51 lines
1.6 KiB
Handlebars
51 lines
1.6 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
<Hds::Modal
|
|
@onClose={{fn (mut @showMessagePreviewModal) false}}
|
|
id="message-alert-preview"
|
|
class="is-calc-large-height two-thirds-width"
|
|
data-test-modal="preview image"
|
|
as |M|
|
|
>
|
|
<M.Body class="is-paddingless is-overflow-hidden">
|
|
<Hds::Alert
|
|
@type="page"
|
|
@color="highlight"
|
|
@onDismiss={{fn (mut @showMessagePreviewModal) false}}
|
|
class="has-bottom-margin-s"
|
|
data-test-custom-alert={{@message.title}}
|
|
as |A|
|
|
>
|
|
<A.Title data-test-custom-alert-title={{@message.title}}>{{@message.title}}</A.Title>
|
|
{{#each (new-line-split @message.message) as |msg|}}
|
|
<A.Description data-test-custom-alert-description={{@message.title}}>
|
|
{{msg}}
|
|
</A.Description>
|
|
{{/each}}
|
|
{{#unless (is-empty-value @message.link)}}
|
|
{{#each-in @message.link as |title href|}}
|
|
<A.LinkStandalone
|
|
@color="secondary"
|
|
@icon="external-link"
|
|
@isHrefExternal={{true}}
|
|
@iconPosition="trailing"
|
|
@text={{title}}
|
|
@href={{href}}
|
|
data-test-custom-alert-action="link"
|
|
/>
|
|
{{/each-in}}
|
|
{{/unless}}
|
|
|
|
</Hds::Alert>
|
|
<img
|
|
src={{img-path (if @message.authenticated "~/custom-messages-dashboard.png" "~/custom-messages-login.png")}}
|
|
alt={{if @message.authenticated "dashboard page preview" "login page preview"}}
|
|
/>
|
|
</M.Body>
|
|
<M.Footer as |F|>
|
|
<Hds::Button @text="Close preview" {{on "click" F.close}} data-test-modal-button="Close" />
|
|
</M.Footer>
|
|
</Hds::Modal> |