2021-06-02 13:15:03 -05:00
|
|
|
{{#if shouldShow}}
|
2022-06-11 06:54:30 -04:00
|
|
|
<div
|
|
|
|
|
class="campaign-banner"
|
|
|
|
|
style={{html-safe (concat "box-shadow: 5px 5px #" dropShadowColor)}}
|
|
|
|
|
>
|
2023-05-02 09:24:28 -05:00
|
|
|
<DButton @icon="times" @action={{this.dismissBanner}} class="close" />
|
2022-06-11 06:54:30 -04:00
|
|
|
|
2021-07-04 21:53:55 +02:00
|
|
|
<div class="campaign-banner-info" style={{html-safe this.bannerInfoStyle}}>
|
2021-06-21 09:01:35 -05:00
|
|
|
{{#if isGoalMet}}
|
2022-06-11 06:54:30 -04:00
|
|
|
<h2 class="campaign-banner-info-header">
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.success_title"}}
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<p class="campaign-banner-info-description">
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.success_body"}}
|
|
|
|
|
</p>
|
2021-06-21 09:01:35 -05:00
|
|
|
{{else}}
|
2022-06-11 06:54:30 -04:00
|
|
|
<h2 class="campaign-banner-info-header">
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.title"}}
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<p class="campaign-banner-info-description">
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.body"}}
|
|
|
|
|
</p>
|
2021-07-04 21:53:55 +02:00
|
|
|
|
2021-06-22 11:26:28 -05:00
|
|
|
{{#if product}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<LinkTo
|
|
|
|
|
@route="subscribe.show"
|
|
|
|
|
@model={{product}}
|
|
|
|
|
@disabled={{product.subscribed}}
|
2022-06-11 06:54:30 -04:00
|
|
|
class="btn btn-primary campaign-banner-info-button"
|
2023-05-02 09:24:28 -05:00
|
|
|
>
|
2022-06-11 06:54:30 -04:00
|
|
|
{{d-icon "far-heart"}}
|
|
|
|
|
{{d-icon "heart" class="hover-heart"}}
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.button"}}
|
2023-05-02 09:24:28 -05:00
|
|
|
</LinkTo>
|
2021-06-22 11:26:28 -05:00
|
|
|
{{else}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<LinkTo
|
|
|
|
|
@route="subscribe"
|
2022-06-11 06:54:30 -04:00
|
|
|
class="btn btn-primary campaign-banner-info-button"
|
2023-05-02 09:24:28 -05:00
|
|
|
>
|
2022-06-11 06:54:30 -04:00
|
|
|
{{d-icon "far-heart"}}
|
|
|
|
|
{{d-icon "heart" class="hover-heart"}}
|
|
|
|
|
{{i18n "discourse_subscriptions.campaign.button"}}
|
2023-05-02 09:24:28 -05:00
|
|
|
</LinkTo>
|
2021-06-22 11:26:28 -05:00
|
|
|
{{/if}}
|
2021-06-21 09:01:35 -05:00
|
|
|
{{/if}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</div>
|
2021-07-04 21:53:55 +02:00
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
<div class="campaign-banner-progress">
|
|
|
|
|
{{#if isGoalMet}}
|
2021-06-21 09:01:35 -05:00
|
|
|
<div class="fireworks">
|
|
|
|
|
<div class="before"></div>
|
|
|
|
|
<div class="after"></div>
|
|
|
|
|
</div>
|
2021-07-04 21:53:55 +02:00
|
|
|
|
2021-06-21 09:01:35 -05:00
|
|
|
<div class="campaign-banner-progress-success"></div>
|
2021-07-04 21:53:55 +02:00
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
{{#if subscriberGoal}}
|
|
|
|
|
<p class="campaign-banner-progress-description">
|
2022-06-11 06:54:30 -04:00
|
|
|
{{html-safe
|
|
|
|
|
(i18n
|
|
|
|
|
"discourse_subscriptions.campaign.goal_comparison"
|
|
|
|
|
current=subscribers
|
|
|
|
|
goal=goalTarget
|
|
|
|
|
)
|
|
|
|
|
}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</p>
|
|
|
|
|
{{else}}
|
|
|
|
|
<p class="campaign-banner-progress-description">
|
2022-06-11 06:54:30 -04:00
|
|
|
{{html-safe
|
|
|
|
|
(i18n
|
|
|
|
|
"discourse_subscriptions.campaign.goal_comparison"
|
|
|
|
|
current=(format-currency currency amountRaised)
|
|
|
|
|
goal=(format-currency currency goalTarget)
|
|
|
|
|
)
|
|
|
|
|
}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{i18n "discourse_subscriptions.campaign.raised"}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</p>
|
2022-06-11 06:54:30 -04:00
|
|
|
|
2021-07-04 21:53:55 +02:00
|
|
|
{{#if showContributors}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<ConditionalLoadingSpinner @condition={{loading}} @size="small">
|
2021-07-04 21:53:55 +02:00
|
|
|
<div class="campaign-banner-progress-users">
|
|
|
|
|
<p class="campaign-banner-progress-users-title">
|
2022-06-11 06:54:30 -04:00
|
|
|
<strong>
|
|
|
|
|
{{i18n
|
|
|
|
|
"discourse_subscriptions.campaign.recent_contributors"
|
|
|
|
|
}}
|
|
|
|
|
</strong>
|
2021-07-04 21:53:55 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div class="campaign-banner-progress-users-avatars">
|
|
|
|
|
{{#each contributors as |contributor|}}
|
2022-06-11 06:54:30 -04:00
|
|
|
{{avatar
|
|
|
|
|
contributor
|
|
|
|
|
avatarTemplatePath="avatar_template"
|
|
|
|
|
usernamePath="username"
|
|
|
|
|
namePath="name"
|
|
|
|
|
imageSize="small"
|
|
|
|
|
}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{/each}}
|
2021-06-02 13:15:03 -05:00
|
|
|
</div>
|
2021-07-04 21:53:55 +02:00
|
|
|
</div>
|
2023-05-02 09:24:28 -05:00
|
|
|
</ConditionalLoadingSpinner>
|
2021-07-04 21:53:55 +02:00
|
|
|
{{/if}}
|
2021-06-10 16:02:54 -05:00
|
|
|
{{/if}}
|
2021-06-02 13:15:03 -05:00
|
|
|
{{else}}
|
2021-06-10 16:02:54 -05:00
|
|
|
{{#if subscriberGoal}}
|
2022-06-11 06:54:30 -04:00
|
|
|
<progress
|
|
|
|
|
class="campaign-banner-progress-bar"
|
|
|
|
|
value={{subscribers}}
|
|
|
|
|
max={{siteSettings.discourse_subscriptions_campaign_goal}}
|
|
|
|
|
></progress>
|
|
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
<p class="campaign-banner-progress-description">
|
2022-06-11 06:54:30 -04:00
|
|
|
{{html-safe
|
|
|
|
|
(i18n
|
|
|
|
|
"discourse_subscriptions.campaign.goal_comparison"
|
|
|
|
|
current=subscribers
|
|
|
|
|
goal=goalTarget
|
|
|
|
|
)
|
|
|
|
|
}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</p>
|
|
|
|
|
{{else}}
|
2022-06-11 06:54:30 -04:00
|
|
|
<progress
|
|
|
|
|
class="campaign-banner-progress-bar"
|
|
|
|
|
value={{amountRaised}}
|
|
|
|
|
max={{siteSettings.discourse_subscriptions_campaign_goal}}
|
|
|
|
|
></progress>
|
|
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
<p class="campaign-banner-progress-description">
|
2022-06-11 06:54:30 -04:00
|
|
|
{{html-safe
|
|
|
|
|
(i18n
|
|
|
|
|
"discourse_subscriptions.campaign.goal_comparison"
|
|
|
|
|
current=(format-currency currency amountRaised)
|
|
|
|
|
goal=(format-currency currency goalTarget)
|
|
|
|
|
)
|
|
|
|
|
}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{i18n "discourse_subscriptions.campaign.raised"}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</p>
|
|
|
|
|
{{/if}}
|
2021-07-04 21:53:55 +02:00
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
{{#if showContributors}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<ConditionalLoadingSpinner @condition={{loading}} @size="small">
|
2021-06-10 16:02:54 -05:00
|
|
|
<div class="campaign-banner-progress-users">
|
|
|
|
|
<p class="campaign-banner-progress-users-title">
|
2022-06-11 06:54:30 -04:00
|
|
|
<strong>
|
|
|
|
|
{{i18n
|
|
|
|
|
"discourse_subscriptions.campaign.recent_contributors"
|
|
|
|
|
}}
|
|
|
|
|
</strong>
|
2021-06-10 16:02:54 -05:00
|
|
|
</p>
|
2022-06-11 06:54:30 -04:00
|
|
|
|
2021-06-10 16:02:54 -05:00
|
|
|
<div class="campaign-banner-progress-users-avatars">
|
|
|
|
|
{{#each contributors as |contributor|}}
|
2022-06-11 06:54:30 -04:00
|
|
|
{{avatar
|
|
|
|
|
contributor
|
|
|
|
|
avatarTemplatePath="avatar_template"
|
|
|
|
|
usernamePath="username"
|
|
|
|
|
namePath="name"
|
|
|
|
|
imageSize="small"
|
|
|
|
|
}}
|
2021-06-10 16:02:54 -05:00
|
|
|
{{/each}}
|
|
|
|
|
</div>
|
2021-06-02 13:15:03 -05:00
|
|
|
</div>
|
2023-05-02 09:24:28 -05:00
|
|
|
</ConditionalLoadingSpinner>
|
2021-06-10 16:02:54 -05:00
|
|
|
{{/if}}
|
2021-06-02 13:15:03 -05:00
|
|
|
{{/if}}
|
2021-06-10 16:02:54 -05:00
|
|
|
</div>
|
2021-06-02 13:15:03 -05:00
|
|
|
</div>
|
2023-01-04 12:39:58 +00:00
|
|
|
{{/if}}
|