mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
✨ Added new portal links for plan checkout (#1770)
refs TryGhost/Ghost#12365 Portal now allows direct checkout links for monthly/yearly plans via Portal links or data attributes, allowing members to directly signup to a paid plan. This PR adds - - A new portal signup link for monthly plan - `/signup/monthly` - A new portal signup link for yearly plan - `/signup/yearly` Co-authored-by: Peter Zimon <zimo@ghost.org>
This commit is contained in:
parent
036cd516ed
commit
7a0defab17
@ -26,7 +26,7 @@
|
|||||||
data-portal
|
data-portal
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" {{action (perform this.copyDefault (if isLink '/#/portal' 'data-portal'))}} class="gh-portal-setting-copy">
|
<button type="button" {{action (perform this.copyDefault (if isLink '#/portal' 'data-portal'))}} class="gh-portal-setting-copy">
|
||||||
{{#if this.copyDefault.isRunning}}
|
{{#if this.copyDefault.isRunning}}
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -39,27 +39,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><hr class="gh-portal-links-group-divider" /></td>
|
<td colspan="2"><hr class="gh-portal-links-group-divider" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class='pagename'>Sign up</td>
|
|
||||||
<td class='page-url'>
|
|
||||||
<div class="gh-portal-page-url-container">
|
|
||||||
<div class="page-url-label">
|
|
||||||
{{#if isLink}}
|
|
||||||
<span class="page-url-disabled">{{this.siteUrl}}/</span><span>#/portal/signup</span>
|
|
||||||
{{else}}
|
|
||||||
data-portal="signup"
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<button type="button" {{action (perform this.copySignup (if isLink '/#/portal/signup' 'data-portal="signup"'))}} class="gh-portal-setting-copy">
|
|
||||||
{{#if this.copySignup.isRunning}}
|
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
|
||||||
{{else}}
|
|
||||||
<span data-tooltip="Copy">{{svg-jar "copy" class="w4 v-mid fill-darkgrey"}}</span>
|
|
||||||
{{/if}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class='pagename'>Sign in</td>
|
<td class='pagename'>Sign in</td>
|
||||||
<td class='page-url'>
|
<td class='page-url'>
|
||||||
@ -71,7 +50,7 @@
|
|||||||
data-portal="signin"
|
data-portal="signin"
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" {{action (perform this.copySignin (if isLink '/#/portal/signin' 'data-portal="signin"'))}} class="gh-portal-setting-copy">
|
<button type="button" {{action (perform this.copySignin (if isLink '#/portal/signin' 'data-portal="signin"'))}} class="gh-portal-setting-copy">
|
||||||
{{#if this.copySignin.isRunning}}
|
{{#if this.copySignin.isRunning}}
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -81,6 +60,69 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='pagename'>Sign up</td>
|
||||||
|
<td class='page-url'>
|
||||||
|
<div class="gh-portal-page-url-container">
|
||||||
|
<div class="page-url-label">
|
||||||
|
{{#if isLink}}
|
||||||
|
<span class="page-url-disabled">{{this.siteUrl}}/</span><span>#/portal/signup</span>
|
||||||
|
{{else}}
|
||||||
|
data-portal="signup"
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<button type="button" {{action (perform this.copySignup (if isLink '#/portal/signup' 'data-portal="signup"'))}} class="gh-portal-setting-copy">
|
||||||
|
{{#if this.copySignup.isRunning}}
|
||||||
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
|
{{else}}
|
||||||
|
<span data-tooltip="Copy">{{svg-jar "copy" class="w4 v-mid fill-darkgrey"}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='pagename'>Sign up/Monthly</td>
|
||||||
|
<td class='page-url'>
|
||||||
|
<div class="gh-portal-page-url-container">
|
||||||
|
<div class="page-url-label">
|
||||||
|
{{#if isLink}}
|
||||||
|
<span class="page-url-disabled">{{this.siteUrl}}/</span><span>#/portal/signup/monthly</span>
|
||||||
|
{{else}}
|
||||||
|
data-portal="signup/monthly"
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<button type="button" {{action (perform this.copySignupMonthly (if isLink '#/portal/signup/monthly' 'data-portal="signup/monthly"'))}} class="gh-portal-setting-copy">
|
||||||
|
{{#if this.copySignupMonthly.isRunning}}
|
||||||
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
|
{{else}}
|
||||||
|
<span data-tooltip="Copy">{{svg-jar "copy" class="w4 v-mid fill-darkgrey"}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='pagename'>Sign up/Yearly</td>
|
||||||
|
<td class='page-url'>
|
||||||
|
<div class="gh-portal-page-url-container">
|
||||||
|
<div class="page-url-label">
|
||||||
|
{{#if isLink}}
|
||||||
|
<span class="page-url-disabled">{{this.siteUrl}}/</span><span>#/portal/signup/yearly</span>
|
||||||
|
{{else}}
|
||||||
|
data-portal="signup/yearly"
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<button type="button" {{action (perform this.copySignupYearly (if isLink '#/portal/signup/yearly' 'data-portal="signup/yearly"'))}} class="gh-portal-setting-copy">
|
||||||
|
{{#if this.copySignupYearly.isRunning}}
|
||||||
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
|
{{else}}
|
||||||
|
<span data-tooltip="Copy">{{svg-jar "copy" class="w4 v-mid fill-darkgrey"}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><hr class="gh-portal-links-group-divider" /></td>
|
<td colspan="2"><hr class="gh-portal-links-group-divider" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -95,7 +137,7 @@
|
|||||||
data-portal="account"
|
data-portal="account"
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" {{action (perform this.copyAccountHome (if isLink '/#/portal/account' 'data-portal="account"'))}} class="gh-portal-setting-copy">
|
<button type="button" {{action (perform this.copyAccountHome (if isLink '#/portal/account' 'data-portal="account"'))}} class="gh-portal-setting-copy">
|
||||||
{{#if this.copyAccountHome.isRunning}}
|
{{#if this.copyAccountHome.isRunning}}
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -116,7 +158,7 @@
|
|||||||
data-portal="account/plans"
|
data-portal="account/plans"
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" {{action (perform this.copyAccountPlans (if isLink '/#/portal/account/plans' 'data-portal="account/plans"'))}} class="gh-portal-setting-copy">
|
<button type="button" {{action (perform this.copyAccountPlans (if isLink '#/portal/account/plans' 'data-portal="account/plans"'))}} class="gh-portal-setting-copy">
|
||||||
{{#if this.copyAccountPlans.isRunning}}
|
{{#if this.copyAccountPlans.isRunning}}
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -137,7 +179,7 @@
|
|||||||
data-portal="account/profile"
|
data-portal="account/profile"
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" {{action (perform this.copyAccountProfile (if isLink '/#/portal/account/profile' 'data-portal="account/profile"'))}} class="gh-portal-setting-copy">
|
<button type="button" {{action (perform this.copyAccountProfile (if isLink '#/portal/account/profile' 'data-portal="account/profile"'))}} class="gh-portal-setting-copy">
|
||||||
{{#if this.copyAccountProfile.isRunning}}
|
{{#if this.copyAccountProfile.isRunning}}
|
||||||
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
{{svg-jar "check-circle" class="w3 v-mid mr2 stroke-darkgrey"}} Copied
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -35,6 +35,14 @@ export default Component.extend({
|
|||||||
copyTextToClipboard(data);
|
copyTextToClipboard(data);
|
||||||
yield timeout(this.isTesting ? 50 : 3000);
|
yield timeout(this.isTesting ? 50 : 3000);
|
||||||
}),
|
}),
|
||||||
|
copySignupMonthly: task(function* (data) {
|
||||||
|
copyTextToClipboard(data);
|
||||||
|
yield timeout(this.isTesting ? 50 : 3000);
|
||||||
|
}),
|
||||||
|
copySignupYearly: task(function* (data) {
|
||||||
|
copyTextToClipboard(data);
|
||||||
|
yield timeout(this.isTesting ? 50 : 3000);
|
||||||
|
}),
|
||||||
copySignin: task(function* (data) {
|
copySignin: task(function* (data) {
|
||||||
copyTextToClipboard(data);
|
copyTextToClipboard(data);
|
||||||
yield timeout(this.isTesting ? 50 : 3000);
|
yield timeout(this.isTesting ? 50 : 3000);
|
||||||
|
Loading…
Reference in New Issue
Block a user