2021-07-20 12:54:19 +03:00
|
|
|
<KoenigCard
|
2021-07-26 19:00:11 +03:00
|
|
|
@icon={{if (eq this.selectedSegment.name "Free members") "koenig/card-indicator-email" "koenig/card-indicator-email"}}
|
|
|
|
@iconTooltip={{concat "Delivered to " (lowercase this.selectedSegment.name) " only"}}
|
2021-07-20 12:54:19 +03:00
|
|
|
@class={{concat (kg-style "container-card") " kg-email-card mih10 miw-100 relative"}}
|
2021-07-20 20:33:39 +03:00
|
|
|
@style={{@cardStyle}}
|
|
|
|
@headerOffset={{@headerOffset}}
|
2021-07-20 12:54:19 +03:00
|
|
|
@toolbar={{this.toolbar}}
|
2021-07-20 20:33:39 +03:00
|
|
|
@payload={{@payload}}
|
|
|
|
@isSelected={{@isSelected}}
|
|
|
|
@isEditing={{@isEditing}}
|
|
|
|
@selectCard={{@selectCard}}
|
|
|
|
@deselectCard={{@deselectCard}}
|
|
|
|
@editCard={{@editCard}}
|
|
|
|
@saveCard={{@saveCard}}
|
|
|
|
@saveAsSnippet={{@saveAsSnippet}}
|
|
|
|
@onLeaveEdit={{this.leaveEditMode}}
|
|
|
|
@addParagraphAfterCard={{@addParagraphAfterCard}}
|
|
|
|
@moveCursorToPrevSection={{@moveCursorToPrevSection}}
|
|
|
|
@moveCursorToNextSection={{@moveCursorToNextSection}}
|
|
|
|
@editor={{@editor}}
|
2021-07-20 12:54:19 +03:00
|
|
|
as |card|
|
|
|
|
>
|
2021-07-20 20:33:39 +03:00
|
|
|
{{#if @isEditing}}
|
2021-07-20 12:54:19 +03:00
|
|
|
<KoenigTextReplacementHtmlInput
|
2021-07-20 20:33:39 +03:00
|
|
|
@html={{@payload.html}}
|
2021-07-20 12:54:19 +03:00
|
|
|
@placeholder="Email only content..."
|
|
|
|
@autofocus={{true}}
|
|
|
|
@class="miw-100 bn bg-transparent"
|
2021-07-20 20:33:39 +03:00
|
|
|
@onChange={{this.updateHtml}}
|
2021-07-26 19:00:11 +03:00
|
|
|
@onFocus={{fn (mut this.contentFocused) true}}
|
|
|
|
@onBlur={{fn (mut this.contentFocused) false}}
|
2021-07-20 20:33:39 +03:00
|
|
|
@didCreateEditor={{this.registerEditor}}
|
2021-07-20 12:54:19 +03:00
|
|
|
/>
|
2021-07-26 19:00:11 +03:00
|
|
|
<form class="flex mt4">
|
|
|
|
<label for="button-text-input" class="sr-only">CTA button text</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="gh-btn email-cta-button-text-input mr4"
|
|
|
|
id="button-text-input"
|
|
|
|
name="button-text"
|
|
|
|
value={{@payload.buttonText}}
|
|
|
|
placeholder={{if this.buttonFocused "" "Add button text"}}
|
|
|
|
{{on "input" this.setButtonText}}
|
|
|
|
{{on "focus" (fn (mut this.buttonFocused) true)}}
|
|
|
|
{{on "blur" (fn (mut this.buttonFocused) false)}}
|
|
|
|
{{on-key "Enter" (fn this.focusElement "#button-url-input")}}
|
|
|
|
>
|
|
|
|
|
|
|
|
<label for="button-url-input" class="sr-only">CTA URL</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="gh-input email-cta-button-url-input"
|
|
|
|
id="button-url-input"
|
|
|
|
name="button-url"
|
|
|
|
value={{@payload.buttonUrl}}
|
|
|
|
placeholder="https://yoursite.com/#/portal/signup/"
|
|
|
|
{{on "input" this.setButtonUrl}}
|
|
|
|
{{on-key "Enter" this.blurElement}}
|
|
|
|
>
|
|
|
|
</form>
|
2021-07-20 12:54:19 +03:00
|
|
|
<div class="kg-card-help">
|
|
|
|
<p>
|
2021-07-21 20:39:21 +03:00
|
|
|
<span>
|
|
|
|
Only visible to
|
|
|
|
<PowerSelect
|
|
|
|
@options={{this.segments}}
|
|
|
|
@selected={{this.selectedSegment}}
|
|
|
|
@onChange={{this.setSegment}}
|
|
|
|
@searchEnabled={{false}}
|
|
|
|
@triggerComponent="gh-power-select/trigger"
|
|
|
|
@triggerClass="ember-power-select-inline"
|
|
|
|
as |segment|
|
|
|
|
>
|
|
|
|
{{segment.name}}
|
|
|
|
</PowerSelect>
|
|
|
|
when delievered by email.
|
2021-07-26 19:00:11 +03:00
|
|
|
This card will not be published on your site.
|
2021-07-21 20:39:21 +03:00
|
|
|
</span>
|
2021-07-20 12:54:19 +03:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<p>{{{this.formattedHtml}}}</p>
|
|
|
|
<div class="koenig-card-click-overlay"></div>
|
|
|
|
{{/if}}
|
|
|
|
</KoenigCard>
|