Commit Graph

920 Commits

Author SHA1 Message Date
Peter Zimon
82ed022f95 Added currency styles 2021-02-25 13:06:19 +01:00
Fabien 'egg' O'Carroll
ccde2519a8 Used Intl.NumberFormat to determine currency symbol (#128)
refs https://github.com/TryGhost/Team/issues/473
refs https://github.com/TryGhost/Ghost/pull/12700/commits/006cf434

Ghost no longer sends back currency symbols from the API, so we calculate the currency
symbol using `Intl.NumberFormat`.

We've also renamed the `currency` property to `currency_symbol` - as it does not store a currency.

Depending on currency and locale, currency symbols can be the currency ISO code (e.g. AED).
In order to style these differently we add a different class to the element.
2021-02-25 09:58:19 +00:00
Renovate Bot
b751c1c41e Update dependency @testing-library/user-event to v12.7.3 2021-02-23 15:29:52 +00:00
Rish
5b5110ea64 v1.0.0-rc.7 2021-02-23 17:12:59 +05:30
Fabien 'egg' O'Carroll
7b75255e4e Pass subscription id when editing billing (#126)
refs TryGhost/Team#479

This updates Portal to pass the subscription_id of the subscription we want to edit billing for
2021-02-23 16:50:27 +05:30
Renovate Bot
f76c8c0f56 Update react monorepo to v16.14.0 2021-02-16 21:51:29 +00:00
Renovate Bot
2ff203bfc6 Update dependency react-scripts to v3.4.4 2021-02-16 20:00:41 +00:00
Renovate Bot
12d0ca7ae3 Update dependency @testing-library/user-event to v12.7.1 2021-02-16 18:44:28 +00:00
Hannah Wolfe
9f43272817 v1.0.0-rc.6 2021-02-15 16:57:03 +00:00
Hannah Wolfe
ef7d1a70f8 Added accent color override handling
- This is a temporary solution to being able to pass in the accent color
- Need to review if attributes / links should definitely support all of the current preview query params (probably should)
2021-02-15 16:47:40 +00:00
Renovate Bot
a326e3c76c Update dependency @testing-library/user-event to v12.7.0 2021-02-11 17:32:49 +00:00
Renovate Bot
2622591049 Update dependency @testing-library/react to v11.2.5 2021-02-11 13:19:03 +00:00
Renovate Bot
2e4151cdca Update dependency @testing-library/jest-dom to v5.11.9 2021-02-11 08:00:26 +00:00
Rish
50b81b1520 v1.0.0-rc.5 2021-02-11 00:15:23 +05:30
Rish
9fafbb44de Fixed incorrect plans override for preview
refs b739f14183

While adding plans params in preview mode, the site plans were incorrectly overridden with default empty value from preview mode so plan values didn't show up on the screen at all. This commit updates correct structure for site plans
2021-02-11 00:13:59 +05:30
Renovate Bot
799dc78e30 Update dependency eslint-plugin-ghost to v2 2021-02-10 13:59:56 +00:00
Rish
69a0db2d61 v1.0.0-rc.4 2021-02-09 14:13:27 +05:30
Rish
2f297582e1 Added default opacity to trigger button iframe
no refs

Adds default opacity to trigger button iframe allowing themes like Edition to modify visibility of portal button in preview mode, but doesn't change any existing behavior
2021-02-09 14:12:31 +05:30
Rish
0411fad8f6 v1.0.0-rc.3 2021-02-09 13:32:05 +05:30
Rish
b739f14183 Added currency and pricing preview params
no issue

As part of launch wizard in Ghost-Admin, we allow site owner/admins to try different pricing and currency in Admin preview. This change allows Portal popup to consume and update pricing/currency/background on the preview screen using `monthlyPrice`, `yearlyPrice`, `currency` and `disableBackground` params.

- `monthlyPrice`- Allows updating monthly price value via preview
- `yearlyPrice`- Allows updating yearly price value via preview
- `currency`- Allows updating currency value via preview
- `disableBackground`- Allows disabling preview background for Portal UI
2021-02-09 13:31:05 +05:30
Rish
ded3461a20 v1.0.0-rc.2 2021-02-03 08:46:19 +05:30
Rish
b5a7c92327 Removed portal-action param in favor of action
no issue

With Ghost 4.0, we want to keep a single universal action source so the Ghost core doesn't have to know about portal specific actions
2021-02-03 08:45:34 +05:30
Rish
9228651786 v1.0.0-rc.1 2021-02-03 08:37:37 +05:30
John O'Nolan
14314613c0 2021 2021-01-25 16:35:55 +00:00
Renovate Bot
f7195a5161 Update dependency @testing-library/react to v11.2.3 2021-01-24 19:51:16 +00:00
Rish
933fa87aa8 v0.15.1 2021-01-18 11:45:49 +05:30
Rish
a09ff2ca5c Fixed site domain for FirstPromoter
no issue

Removes http(s) and trailing slashes from FirstPromoter site URL
2021-01-18 11:44:47 +05:30
Rish
569c94272c v0.15.0 2021-01-15 20:03:41 +05:30
Rish
a085063a42 Added FirstPromoter integration
no issue
depends on https://github.com/TryGhost/Ghost/pull/12540

FirstPromoter allows sites to build their own referral programs.
Portal reads FirstPromoter settings from site data and uses them to setup FirstPromoter script to track member referrals
2021-01-15 15:36:13 +05:30
Rish
72c8cad3f5 Updated hash removal logic on close
no refs

Using `location.hash` to remove hash params on Portal still keeps the `#` on browser. Instead, we take advantage of history API to remove Portal hash params from screen
2021-01-11 10:56:14 +05:30
Renovate Bot
d6e4635a8b Update dependency @testing-library/user-event to v12.6.0 2021-01-09 09:53:41 +00:00
Rish
ce33a055aa v0.14.1 2020-12-18 22:37:41 +05:30
Rish
9606f003ec 🐛 Fixed incorrect subscription data picked
no issue

Previously, we only returned active subscription for a member in their list of subscriptions, and Portal picked the first subscription in list for a paid member assuming it as active. This doesn't hold true since we now return list of all subscriptions for a member.

This patch updates to use first "active" subscription for a member in the subscription list instead.
2020-12-18 22:31:55 +05:30
Peter Zimon
b749d76138 Update default accent color (#112)
Updated default accent color to neutral dark grey to make it compatible with more themes.
2020-12-14 09:09:32 +01:00
Rish
e2b594528a v0.14.0 2020-12-01 12:54:17 +05:30
Peter Zimon
3ffe293003 Refined cancellation reason textarea
no refs.
- refined style and copy
2020-11-25 09:42:42 +01:00
Rish
df2e451294 Updated cancellation reason input to use textarea
refs https://github.com/TryGhost/Ghost/issues/12403

- Updates UI component for cancelation reason to use textarea instead of input
- Keep the maxlength to 500 chars for the input
2020-11-25 12:27:08 +05:30
Rish
bf8d949a22 Renamed custom trigger classname to portal
no issue

Custom class is appended to trigger buttons based on popup state to allow UI changes based on different popup state. The class name is updated from using members terminology to new Portal terminology now.
2020-11-25 12:18:06 +05:30
Rish
e36b9360e7 🐛 Fixed support and powered by links not working
closes https://github.com/TryGhost/Ghost/issues/12367

- Support and powered by links were not opened through `href` inside iframe
- Adds support to open these links via `window.open` to bypass iframe restriction
2020-11-24 22:47:29 +05:30
Fabien 'egg' O'Carroll
dff46b99a2 Added cancellation feedback to confirmation screen (#111)
refs https://github.com/TryGhost/Ghost/issues/12403

This gives members the ability to share their cancellation reason with site owners.
The reason is included in the cancellation request and stored both in Ghost & Stripe.

Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-11-24 11:31:42 +00:00
Rish
cfa44b2c77 Updated stripe cancel redirect to existing page
refs https://github.com/TryGhost/Ghost/issues/12365

Stripe back button previously redirected user to site home instead of keeping existing link where the checkout was triggered from. This updates the link to go back to old site URL in case the previous URL was still on the Ghost site.
2020-11-23 13:56:22 +05:30
Rish
3f3c0b4b94 v0.13.1 2020-11-23 11:11:30 +05:30
Peter Zimon
2efeb8f1f7 Updated plan section hover style 2020-11-20 11:01:16 +01:00
Rish
28570bd3ea Fixed portal plan links for data attributes
no refs

- Portal plan checkout links were incorrectly passing empty plan and not opening Stripe checkout, fixed.
2020-11-20 15:13:38 +05:30
Rish
8483ba162d Added listener for portal link changes
refs https://github.com/TryGhost/Ghost/issues/12365

- Listens to portal link changes in URL and opens direct checkout plans
2020-11-20 10:42:03 +05:30
Rish
4dc22ca568 Updated portal stripe actions
no refs

- Updates stripe actions via portal to use custom parameter values to show notifications
- Updated parameter don't interfere with existing theme notifications
2020-11-20 10:27:06 +05:30
Rish
9dac6d9435 Added direct portal link for free signup
refs https://github.com/TryGhost/Ghost/issues/12365

- Added direct portal link handling for - `/signup/free` - to open Portal with Free plan only when available
- In case free plan is not available, Portal will show default signup screen
2020-11-19 18:06:56 +05:30
Rish
de3e5f52d0 Cleared portal checkout link on use
refs https://github.com/TryGhost/Ghost/issues/12365

- Browser back button from Stripe checkout takes users to infinite navigation loop as we were not clearing the direct checkout link
- Clears direct checkout link on load so user can continue navigation as normal
2020-11-19 16:31:34 +05:30
Rish
2a091ac56d Updated direct plan checkout without popup
refs https://github.com/TryGhost/Ghost/issues/12365

- Updated direct checkout to load Stripe without opening popup
2020-11-19 16:04:49 +05:30
Rish
f7fa4e50e6 v0.13.0 2020-11-18 19:56:52 +05:30