Skip to content

Commit

Permalink
Added new portal link for free plan
Browse files Browse the repository at this point in the history
refs TryGhost/Ghost#12365

Portal allows direct free signup link or data attributes, allowing members to directly share or link to only free plan in Portal popup if available

- A new portal signup link for free plan - `/signup/free`
  • Loading branch information
rishabhgrg committed Nov 20, 2020
1 parent 8c33502 commit d5e8752
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions app/components/gh-portal-links.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,27 @@
</div>
</td>
</tr>
<tr>
<td class='pagename'>Sign up/Free</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/free</span>
{{else}}
data-portal="signup/free"
{{/if}}
</div>
<button type="button" {{action (perform this.copySignupFree (if isLink '#/portal/signup/free' 'data-portal="signup/free"'))}} class="gh-portal-setting-copy">
{{#if this.copySignupFree.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'>
Expand Down
4 changes: 4 additions & 0 deletions app/components/gh-portal-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export default Component.extend({
copyTextToClipboard(data);
yield timeout(this.isTesting ? 50 : 3000);
}),
copySignupFree: task(function* (data) {
copyTextToClipboard(data);
yield timeout(this.isTesting ? 50 : 3000);
}),
copySignin: task(function* (data) {
copyTextToClipboard(data);
yield timeout(this.isTesting ? 50 : 3000);
Expand Down

0 comments on commit d5e8752

Please sign in to comment.