Put Tier welcome page urls behind feature flag

refs https://github.com/TryGhost/Team/issues/1168
This commit is contained in:
Fabien "egg" O'Carroll 2022-01-31 13:36:40 +02:00
parent dc8b5542d4
commit 898af1b449
4 changed files with 29 additions and 9 deletions

View File

@ -134,15 +134,17 @@
</form>
</div>
</div>
<h4 class="gh-main-section-header small bn">Advanced</h4>
<div class="gh-main-section-content grey gh-product-priceform-block">
<GhFormGroup>
<label for="" class="fw6">Welcome page</label>
<GhTextInput
@class="gh-input" />
<p>Redirect to this URL after signup for premium membership</p>
</GhFormGroup>
</div>
{{#if (feature "tierWelcomePages")}}
<h4 class="gh-main-section-header small bn">Advanced</h4>
<div class="gh-main-section-content grey gh-product-priceform-block">
<GhFormGroup>
<label for="" class="fw6">Welcome page</label>
<GhTextInput
@class="gh-input" />
<p>Redirect to this URL after signup for premium membership</p>
</GhFormGroup>
</div>
{{/if}}
</div>
<div class="gh-main-section-block gh-product-form-tierpreview">
<div class="gh-product-form-tierpreview-content">

View File

@ -54,6 +54,7 @@ export default Service.extend({
beforeAfterCard: feature('beforeAfterCard'),
tweetGridCard: feature('tweetGridCard'),
membersActivityFeed: feature('membersActivityFeed'),
tierWelcomePages: feature('tierWelcomePages'),
_user: null,

View File

@ -339,6 +339,19 @@
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Tier welcome pages</h4>
<p class="gh-expandable-description">
Add welcome pages per Tier (requires Tiers enabled)
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="tierWelcomePages" />
</div>
</div>
</div>
</div>
</div>
{{/if}}

View File

@ -96,6 +96,7 @@
@openEditProduct={{this.openEditProduct}}
/>
{{/if}}
{{#if (or (not (feature "tierWelcomePages")) (not (feature "multipleProducts")))}}
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="free-welcome-page">
<label for="freeWelcomePage">Welcome page</label>
<GhUrlInput
@ -112,6 +113,7 @@
/>
<p>Redirect to this URL after signup for a free membership</p>
</GhFormGroup>
{{/if}}
</div>
{{/liquid-if}}
</div>
@ -207,6 +209,7 @@
</GhFormGroup>
{{/if}}
{{#if (or (not (feature "tierWelcomePages")) (not (feature "multipleProducts")))}}
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="paid-welcome-page">
<label for="paidWelcomePage">Welcome page</label>
<GhUrlInput
@ -222,6 +225,7 @@
/>
<p>Redirect to this URL after signup for premium membership</p>
</GhFormGroup>
{{/if}}
{{/if}}
</div>
{{/liquid-if}}