2021-10-04 16:00:41 +03:00
<section class="gh-canvas circle-bg" {{ did-insert this .setup }} >
2021-05-17 14:35:31 +03:00
<GhCanvasHeader class="gh-canvas-header gh-setting-members-header">
2022-10-04 08:35:29 +03:00
<div class="flex flex-column">
<div class="gh-canvas-breadcrumb">
<LinkTo @route="settings">
Settings
</LinkTo>
{{ svg-jar "arrow-right-small" }} Membership
</div>
<h2 class="gh-canvas-title" data-test-screen-title>
Membership
</h2>
</div>
2021-03-29 14:49:09 +03:00
<section class="view-actions">
2021-04-14 21:02:36 +03:00
<GhTaskButton
2021-05-17 14:01:12 +03:00
@buttonText="Save"
2021-03-29 14:49:09 +03:00
@task= {{ this .saveSettingsTask }}
@successText="Saved"
@runningText="Saving"
@class="gh-btn gh-btn-primary gh-btn-icon"
2022-02-09 13:59:12 +03:00
{{ on-key "cmd+s" }}
2021-03-29 14:49:09 +03:00
data-test-button="save-settings"
/>
</section>
</GhCanvasHeader>
2021-05-17 10:58:15 +03:00
<section class="view-container settings-debug">
2021-05-17 14:01:12 +03:00
2022-07-06 12:01:57 +03:00
<div class="gh-main-layout gh-setting-membership content-preview">
2021-05-17 14:01:12 +03:00
<div class="gh-setting-members-basicsform">
2022-01-04 11:52:58 +03:00
<p class="intro">Fund your work with subscription revenue. Connect your Stripe account and offer premium content to your audience. Our creators are already making over $12 million per year, while <strong>Ghost takes 0% payment fees</strong>.</p>
2022-09-09 18:21:32 +03:00
2022-07-06 12:01:57 +03:00
<div class="flex flex-column justify-between mt3">
2021-05-18 12:09:42 +03:00
<section class="gh-expandable gh-setting-members-portalcta">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Portal Settings</h4>
<p class="gh-expandable-description">
Customize members modal signup flow
</p>
</div>
2021-05-25 12:09:13 +03:00
<button type="button" class="gh-btn gh-btn-green" disabled= {{ eq this .settings .membersSignupAccess "none" }} {{ on "click" this .openPortalSettings }} data-test-toggle="portal-settings">
2021-06-09 18:28:19 +03:00
<span>Customize Portal →</span>
2021-05-18 12:09:42 +03:00
</button>
2021-05-17 14:01:12 +03:00
</div>
</div>
2021-05-18 12:09:42 +03:00
</section>
2021-05-17 14:40:08 +03:00
2022-01-27 14:40:11 +03:00
<div class="gh-setting-rich-dropdown">
2021-05-20 16:43:04 +03:00
<Settings::MembersSubscriptionAccess @onChange= {{ this .membersSubscriptionAccessChanged }} />
2021-05-18 12:09:42 +03:00
<Settings::MembersDefaultPostAccess />
2022-08-12 17:06:06 +03:00
<Settings::MembersCommentAccess />
2021-05-18 12:09:42 +03:00
</div>
2021-05-17 14:01:12 +03:00
</div>
2021-05-17 10:58:15 +03:00
</div>
2021-05-17 14:01:12 +03:00
<div class="gh-setting-members-portalpreview">
2022-05-16 18:25:03 +03:00
<div class="gh-setting-members-portal-mock mock-enabled">
2021-05-25 11:40:17 +03:00
{{ # if ( or ( eq this .settings .membersSignupAccess 'none' ) this .switchFromNoneTask .isRunning ) }}
2022-02-19 01:36:01 +03:00
<div class="gh-setting-members-portal-disabled" data-test-portal-preview-disabled>
2021-05-19 19:58:06 +03:00
<span class="lightgrey"> {{ svg-jar "portal-logo-stroke" }} </span>
<h4>Portal disabled</h4>
<p>Change your Subscription Access setting to re-enable Portal</p>
</div>
2021-05-18 15:59:47 +03:00
{{ else }}
2021-05-18 18:36:18 +03:00
<GhSiteIframe
2021-05-24 21:14:31 +03:00
scrolling="no"
2021-05-18 18:36:18 +03:00
@src= {{ this .portalPreviewUrl }}
2021-05-24 16:03:08 +03:00
@invisibleUntilLoaded="portal-ready"
2021-05-27 15:20:37 +03:00
@onInserted= {{ this .portalPreviewInserted }}
2022-02-19 01:36:01 +03:00
@onDestroyed= {{ this .portalPreviewDestroyed }}
data-test-iframe="portal-preview"/>
2021-05-18 15:59:47 +03:00
{{ / if }}
2021-05-17 14:35:31 +03:00
</div>
2021-05-17 10:58:15 +03:00
</div>
</div>
2021-05-17 14:01:12 +03:00
<div class="gh-setting-members-tierscontainer">
<div class="gh-settings-members-tiersheader">
<h4 class="gh-main-section-header small bn">Membership tiers</h4>
2021-09-09 14:01:07 +03:00
{{ # if this .session .user .isAdmin }}
2022-05-24 17:53:03 +03:00
<button type="button" class="gh-btn gh-btn-outline gh-btn-stripe-status {{ if this .isConnectDisallowed "disabled" }} {{ if this .membersUtils .isStripeEnabled "connected" "" }} " {{ on "click" this .openStripeConnect }} >
2021-05-17 18:14:38 +03:00
<span>
2022-05-24 17:53:03 +03:00
{{ if this .membersUtils .isStripeEnabled "Connected to Stripe" "Stripe not connected" }}
2021-05-17 18:14:38 +03:00
</span>
2021-05-17 14:01:12 +03:00
</button>
2021-08-17 12:54:12 +03:00
{{ / if }}
2021-05-17 14:01:12 +03:00
</div>
2022-08-23 13:26:27 +03:00
<section class="gh-expandable gh-expendable-free-membership">
2021-05-17 14:01:12 +03:00
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
2022-01-19 10:34:08 +03:00
<h4 class="gh-expandable-title">Free</h4>
2021-05-19 19:07:25 +03:00
<p class="gh-expandable-description">Free member sign up settings</p>
2021-05-17 14:01:12 +03:00
</div>
2022-02-19 01:36:01 +03:00
<button type="button" class="gh-btn" {{ on "click" ( toggle "freeOpen" this ) }} data-test-button="toggle-free-settings"><span> {{ if this .freeOpen "Close" "Expand" }} </span></button>
2021-05-17 14:01:12 +03:00
</div>
<div class="gh-expandable-content">
{{ # liquid-if this .freeOpen }}
2022-02-19 01:36:01 +03:00
<div class="gh-setting-content-extended" data-test-free-settings-expanded>
2022-05-16 18:25:03 +03:00
<GhTierCard
@tier= {{ this .freeTier }}
@tiers= {{ this .tiers }}
@openEditTier= {{ this .openEditTier }}
/>
<GhFormGroup>
<label for="welcomePage" class="fw6">Welcome page</label>
<GhUrlInput
@id="welcomePage"
@value= {{ readonly this .freeTier .welcomePageURL }}
@baseUrl= {{ readonly this .siteUrl }}
@setResult= {{ this .setWelcomePageURL }}
@validateUrl= {{ this .validateWelcomePageURL }}
@placeholder= {{ readonly this .siteUrl }}
data-test-input="free-welcome-page"
2022-01-17 21:53:43 +03:00
/>
2022-05-16 18:25:03 +03:00
<p>Redirect to this URL after signup for a free membership</p>
</GhFormGroup>
2021-05-17 14:01:12 +03:00
</div>
{{ / liquid-if }}
</div>
</div>
</section>
<section class="gh-expandable">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Premium</h4>
2021-05-19 19:07:25 +03:00
<p class="gh-expandable-description">Set prices and paid member sign up settings</p>
2021-05-17 14:01:12 +03:00
</div>
2021-05-17 18:14:38 +03:00
2022-05-24 17:53:03 +03:00
{{ # if this .membersUtils .isStripeEnabled }}
2021-05-20 16:31:51 +03:00
<button type="button" class="gh-btn" {{ on "click" ( toggle "paidOpen" this ) }} data-test-toggle-pub-info><span> {{ if this .paidOpen "Close" "Expand" }} </span></button>
2021-05-17 18:14:38 +03:00
{{ else }}
2021-09-10 13:23:23 +03:00
<button type="button" class="stripe-connect {{ if ( or ( not this .session .user .isAdmin ) this .isConnectDisallowed ) "disabled" }} " {{ on "click" this .openStripeConnect }} >
2023-01-04 17:28:38 +03:00
<span></span>
2021-05-17 18:14:38 +03:00
</button>
{{ / if }}
2021-05-17 14:01:12 +03:00
</div>
2021-05-19 17:26:45 +03:00
{{ # if this .isConnectDisallowed }}
<div class="gh-setting-nossl">
<div class="gh-setting-nossl-container">
<span class="red"> {{ svg-jar "shield-lock" }} </span>
<h4>Your site is not secured</h4>
<p>Paid memberships through Ghost can only be run on sites secured by SSL (HTTPS vs. HTTP). More information on adding a free SSL Certificate to your Ghost site can be <a href="https://ghost.org/integrations/lets-encrypt/" target="_blank" rel="noopener noreferrer">found here</a>.</p>
</div>
</div>
{{ / if }}
2021-05-17 14:01:12 +03:00
<div class="gh-expandable-content">
{{ # liquid-if this .paidOpen }}
<div class="gh-setting-content-extended">
2022-05-11 20:11:54 +03:00
{{ # if this .fetchDefaultTier .isRunning }}
2021-05-17 17:29:07 +03:00
Loading...
{{ else }}
2022-05-16 18:25:03 +03:00
<GhMembershipTiersAlpha
@updatePortalPreview= {{ this .updatePortalPreview }}
@tiers= {{ this .paidTiers }}
@confirmTierSave= {{ this .confirmTierSave }}
/>
2021-05-17 17:29:07 +03:00
{{ / if }}
2021-05-17 14:01:12 +03:00
</div>
{{ / liquid-if }}
</div>
</div>
</section>
2021-05-14 16:33:18 +03:00
</div>
2021-03-29 14:49:09 +03:00
</section>
2021-05-17 10:58:15 +03:00
{{ # if this .showPortalSettings }}
2022-09-09 19:56:51 +03:00
<GhFullscreenModal
@modal="portal-settings"
2021-05-17 10:58:15 +03:00
@model= {{ hash
2021-05-19 17:36:46 +03:00
preloadTask=this.saveSettingsTask
2022-05-24 17:53:03 +03:00
openStripeConnect=this.openStripeConnect
2022-05-11 20:11:54 +03:00
tiers=this.tiers
2021-05-17 10:58:15 +03:00
}}
2021-05-17 14:40:08 +03:00
@close= {{ this .closePortalSettings }}
2021-05-17 10:58:15 +03:00
@modifier="full-overlay portal-settings" />
{{ / if }}
2021-05-17 14:40:08 +03:00
2021-05-17 18:14:38 +03:00
{{ # if this .showStripeConnect }}
<GhFullscreenModal
@modal="stripe-connect"
2021-05-20 16:31:51 +03:00
@close= {{ this .closeStripeConnect }}
2021-05-20 19:20:49 +03:00
@modifier="action wide stripe-connect" />
2021-05-17 18:14:38 +03:00
{{ / if }}
2022-05-11 20:11:54 +03:00
{{ # if this .showTierModal }}
2022-01-17 21:53:43 +03:00
<GhFullscreenModal
2022-05-11 20:11:54 +03:00
@modal="tier"
2022-01-17 21:53:43 +03:00
@model= {{ hash
2022-05-11 20:11:54 +03:00
tier=this.tierModel
tiers=this.tiers
2022-01-17 21:53:43 +03:00
}}
2022-05-11 20:11:54 +03:00
@confirm= {{ this .confirmTierSave }}
@close= {{ this .closeTierModal }}
@modifier="edit-tier action wide" />
2022-01-17 21:53:43 +03:00
{{ / if }}
2021-06-21 11:51:48 +03:00
</section>