Commit Graph

3125 Commits

Author SHA1 Message Date
Kevin Ansfield
eebdd4a835 Added radix to parseInt calls in changed-prices check
no issue

- `parseInt` doesn't default to base 10 so the radix argument is required
2021-05-20 09:13:39 +01:00
Aileen Nowak
e20e5775a6 Fixed requesting subscription before sending token
no issue

- The Ghost(Pro) billing app would request a token once mounted to which Ghost sends the response to
- Before, we wouldn't wait for the token to be sent and request subscription information from the Ghost(Pro) app straight away, which resulted in another token request (because it's not there yet)
- This change will wait for the token to be sent before requesting subscription information from the Ghost(Pro) app to avoid duplicated requests to our servers
2021-05-20 17:10:10 +12:00
Kevin Ansfield
3bed117b57 Fixed unsaved changes warning for prices when they've already been saved
no issue

- amount properties on the controller are set to strings rather than numbers so the comparison would still be false even if the "numbers" matched
2021-05-19 20:44:41 +01:00
Kevin Ansfield
6339770a67 Fixed "connect to stripe" button in portal settings modal
no issue

- passed correct action for opening stripe connect modal through to portal settings modal
- updated `<GhTaskButton>` to accept a `@unlinkedTask=true/false` property
  - ember-concurrency will throw warnings about unsafe task cancellation if the initiator of a task is destroyed due to the actions of a task. Eg. the stripe connect button being replaced with the plan checkboxes because stripe connect details are added to settings
  - to avoid warnings ember-concurrency expects the task initiation to be marked as "unlinked" so that the task is allowed to continue even though the initiator is destroyed
- updated `<GhSiteIframe>` to force a refresh when the `@guid` property changes
  - we want the portal preview to fully reload so that it can fetch server data and see that stripe is connected
- updated portal settings modal to initiate a refresh when switching from "connect to stripe" to the plans checkboxes that happens automatically after a successful stripe connection
2021-05-19 20:24:18 +01:00
Peter Zimon
70e57ae7c8 Added spinner for loading manually created subscription 2021-05-19 20:56:29 +02:00
Rishabh
f3e7cf6128 Fixed loading indicator on comped subscription
no refs
2021-05-20 00:15:22 +05:30
Rishabh
d3023e8b52 Added loading for assigning comped subscription to member
no refs

Adds loading indicator when member is being saved with new complimentary price
2021-05-19 23:18:20 +05:30
Kevin Ansfield
f9f925d923 Fixed "confirm leave" modal not showing if prices are unsaved in membership screen
no issue

- added `hasChangedPrices` method to check the controller's price properties against the active product prices
- check `hasChangedPrices` alongside changed settings when deciding if the confirm leave modal needs to be shown
- call a `resetPrices` method if a leave is forced which changes controller properties back to the amounts in the active product prices
2021-05-19 18:32:37 +01:00
Kevin Ansfield
5a3c9a54b1 Re-ordered memberships controller code
no issue

- put setup and leave methods at the beginning so it's clearer what is happening when the screen is navigated to / away from
- move "private" method to the end to keep it out of the way
2021-05-19 18:32:37 +01:00
Kevin Ansfield
32c9ee003f Removed unused portal-settings modal code from settings screen
no issue

- portal settings modal is now initiated from the membership screen so the code for showing/closing it in the settings controller is not needed
2021-05-19 18:32:37 +01:00
Rishabh
942ad319e8 Updated complimentary subscription assignment to member
no refs

With custom products, we added a new modal to add a complimentary price to a member. Since we want to handle the comp prices implicitly with new changes, this change updates the comp subscription assignment to a member directly without opening a modal, by using the old `comped` flag in API. The `comped` flag takes care of creating the right complimentary subscription for member.

In case a member already has a comped subscription, we hide the option to add another subscription.
2021-05-19 22:36:02 +05:30
Peter Zimon
a2e3e0c570 Updated disabled Portal view in Membership settings 2021-05-19 18:58:06 +02:00
Peter Zimon
84efeef8d1 Refined copy 2021-05-19 18:07:25 +02:00
Kevin Ansfield
d72a3ecaf0 Removed unused code from stripe-connect modal
no issue

- hangover from a copy/paste when re-arranging screens
2021-05-19 16:10:14 +01:00
Rishabh
4e6051a5bd Fixed portal plans change not triggering recompute
no refs

Portal plan settings are updated on the membership page when the plans are changed, but its not reflected in Portal settings because we were not updating the array the ember way.
2021-05-19 20:19:54 +05:30
Peter Zimon
d706d9f19b Minor membership related style refinements 2021-05-19 16:40:18 +02:00
Kevin Ansfield
471a3b8c0d Fixed portal settings modal sometimes having stale data
no issue

On the membership screen we save settings before opening the portal settings modal but we weren't waiting for the save to finish which meant that the portal settings modal could load using stale data.

- passed the save settings task in via the portal settings modal's model
- added a `finishPreloading` action that contains all of the dynamic setup tasks that were previously in the component's `init` method
    - if a preload task was passed in and it's currently running (as it would be if the modal is opened via the membership screen button) then it will wait for the task to finish before running the setup tasks
- trigger the `finishPreloading` action when the modal is rendered
- show a loading spinner in place of the modal contents whilst pre-loading
2021-05-19 15:37:06 +01:00
Rishabh Garg
69367de59e Added SSL precondition for Stripe Connect UI (#1967)
refs https://github.com/TryGhost/Team/issues/598

Stripe Webhooks require SSL in production, and so we should not be
allowing connecting to Stripe in production mode unless the site is
running with SSL. This change -

- Updates Setup wizard to skip Stripe Connect steps if site is not on SSL in production
- Adds warning on set subscriptions page

Co-authored-by: Peter Zimon <zimo@ghost.org>
2021-05-19 19:56:45 +05:30
Sanne de Vries
1222260e36 Styled access dropdowns pseudo-classes 2021-05-18 22:17:46 +02:00
Rishabh
e22d54ba3b Updated portal preview to update on price change
no refs

Portal preview on membership settings reflects the currently set monthly/yearly price directly by passing in the updated amount to portal preview URL
2021-05-18 23:00:10 +05:30
Kevin Ansfield
db09b317eb Added auto height adjustment to membership portal preview
no issue

- added `@onDestroyed` argument to `<GhSiteIframe>` so consumers can clean up any references
- used `@onLoaded` and `@onDestroyed` to handle a reference to the preview iframe
- updated portal preview load handler and update method to trigger a resize task
  - add a 100ms delay to allow for portal to re-render itself
  - reach through the two iframes to get the portal container element and use it's height to set the style attribute on the portal preview container element
2021-05-18 18:26:07 +01:00
Rishabh
2a0c2c3f48 Updated portal links UI to fixed values
no refs

We are reverting Portal links to use monthly/yearly for now instead of price ids, this change updates to use old nickname and if mapping.
2021-05-18 22:05:29 +05:30
Rishabh
f9672e7095 Updated portal plans on monthly/yearly price change
no refs

Portal plans setting contains list of prices that are allowed by site owner to use in Portal UI. Since we now switch monthly/yearly prices dynamically, we need to update portal plans on price change to still reflect updated monthly/yearly prices in Portal UI.
2021-05-18 21:50:38 +05:30
Kevin Ansfield
eecd6d03b6 Fixed linting error 2021-05-18 16:38:29 +01:00
Kevin Ansfield
602549097a Fixed flash of site when portal preview is loading
no issue

- added `@invisibleUntilLoaded` boolean argument to `<GhSiteIframe>`
  - when set to true add `.invisible` class until iframe's `load` event is triggered
- removed manual iframe hiding with 1.2sec delay from portal settings modal
- added `@onLoad` argument to `<GhSiteIframe>` for consumers to hook in if needed
2021-05-18 16:36:18 +01:00
Kevin Ansfield
b4a6eb594d Converted <GhSiteIframe> to a glimmer component
no issue

- updated to class syntax and glimmer component behaviour
- tidied up and standardised usage of the component
2021-05-18 16:08:13 +01:00
Rishabh
11be983d99 Filtered active monthly/yearly prices in portal settings
no refs

We only want to show currently active monthly/yearly prices in Portal and Portal settings based on new settings for price ids, and hide all other prices
2021-05-18 20:25:05 +05:30
Sanne de Vries
fcef76cebf Fixed responsive issues for membership settings 2021-05-18 15:59:32 +02:00
Rishabh
d2162f02a0 Added missing action modifier on memberships setup
no refs

Last commit missed the `action` modifier for setup method used in memberships screen insert.
2021-05-18 19:26:50 +05:30
Rishabh
d746265a52 Fixed active prices not read from settings
no refs

Previously, we were fetching product and prices in the constructor of the controller which did not guarantee settings were updated when picking active prices from the price list. This updates the setup to use `did-insert` modifier to correctly fetch and populate product/price data.
2021-05-18 19:17:25 +05:30
Kevin Ansfield
6b287a41c0 Hid button in memberships portal preview
no issue

- added button override to `getPortalPreviewUrl()` and set it to `false` when generating preview URL for memberships preview
2021-05-18 14:34:55 +01:00
Sanne de Vries
dce8d77cf0 Updated access settings dropdowns and icons 2021-05-18 15:10:42 +02:00
Kevin Ansfield
8a1ae88192 Added portal preview to memberships screen
no issue

- fixed styling issues
    - fixed portal preview taking over the screen by adding `position: relative` to the container
    - fixed portal preview being interactive by disabling pointer events
- added portal preview URL generation to memberships controller
    - moved much of the preview params knowledge/calculations from the `<ModalPortalSettings>` component into the `members-utils` service so that a portal preview URL can be generated from anywhere using current settings values rather than the method consumer needing to have knowledge of all params and how to generate them
    - updated actions in controller that modify settings to also update the preview url
    - added `onChange` event to the `<Settings/MembersSubscriptionAccess>` component so the controller can react and update preview
- used `<GhSiteIframe>` with generated portal preview URL for live display of portal changes on memberships screen
2021-05-18 13:59:57 +01:00
Peter Zimon
37de5f957d Updated launch wizard Stripe connect info styles 2021-05-18 14:15:44 +02:00
Peter Zimon
b9ba7045a4 Copy update on Member details 2021-05-18 11:42:16 +02:00
Peter Zimon
97866adb37 Minor spacing refinements on Membership settings 2021-05-18 11:09:42 +02:00
Rishabh
995b102617 Wired premium prices in membership settings
refs 4627d1c26a

- Adds new settings for monthly/yearly price ids in the settings modal
- Updates logic to save product on membership settings - Creates new prices for monthly/yearly when it doesn't exist, updates the monthly/yearly price ids in the settings
- Fixes selected currency value in dropdown
2021-05-18 13:41:36 +05:30
Sanne de Vries
a237dc73d9 Refined membership access settings 2021-05-17 19:36:36 +02:00
Peter Zimon
87e2a3db37 Refined currency dropdown 2021-05-17 18:12:49 +02:00
Peter Zimon
ee7ac5588a Fix tests 2021-05-17 17:39:41 +02:00
Peter Zimon
fa95868c36 Moved Stripe connect settings to modal 2021-05-17 17:28:39 +02:00
Rishabh
35612db851 Wired membership tiers UI in new members setting
no refs

- Wired Premium membership UI to existing monthly/yearly prices in the default product
- Wired free membership UI to redirect URI setting
- Updated save to validate settings/errors
2021-05-17 20:06:03 +05:30
Kevin Ansfield
686dadbeda Fixed errors when closing portal settings modal
no issue

- added actions for handling close/confirm/cancel of portal settings rather than re-using the route-level leave modal because the portal settings modal does not need any knowledge of the route
- added controller reset that is called when the route is exited to ensure no modals are shown when navigating back to the membership screen
- fixed "cannot set on destroyed" error when portal settings are opened and closed quickly
- removed usage of old `{{action}}` helper - this has been replaced with `{{on}}` and `{{fn}}`
2021-05-17 12:41:21 +01:00
Peter Zimon
c3748e4d18 Membership settings UI refinements
- added Portal mock container and background
- updated header behavior
2021-05-17 13:35:31 +02:00
Peter Zimon
bf3349ca0f Applied basic layout for membership settings
- created main blocks
- added tier forms
- added button for Stripe connect modal
2021-05-17 13:01:54 +02:00
Kevin Ansfield
27a2bc7722 Removed products options from members segment select
no issue

- we're currently limited to a single product so it doesn't make sense to show it as an option as it creates two different routes to "paid members" that we'd like to avoid for now
2021-05-17 10:15:37 +01:00
Kevin Ansfield
51536fb2ef Added icons to membership dropdown options
no issue

- add icon + icon color to the subscription access and default post access option lists
- updated templates to use icon in trigger and option display
- fixed ember-power-select styles overriding svgs in trigger
2021-05-17 09:42:44 +01:00
Rishabh
4c736d1c80 Added basic portal settings in new membership area
no refs

Members related settings are being consolidated into a single screen.

- Adds basic portal settings UI
2021-05-17 13:28:15 +05:30
Kevin Ansfield
de560733c5 🎨 Reverted ability to set post access level to labels
refs https://github.com/TryGhost/Team/issues/581

Setting post visibility to a label results in undesirable and confusing behaviour with no good way to manage access long-term. Coupled with products being limited to a single product for now we're reverting the UI back to the "Public", "Members", and "Paid" options.
2021-05-14 16:01:14 +01:00
Kevin Ansfield
42ef8df7ca Switched signup and default post access settings to dropdowns
no issue

- provides clearer indication of current setting without having to expand anything
- has more minimal UI which helps when settings screen has multiple areas
2021-05-14 15:44:10 +01:00
Kevin Ansfield
06ff9dfb10 Fixed unsaved confirmation when leaving membership settings screen
refs bdcbfcb92c

- previous commit missed rename of access route to membership
2021-05-14 15:35:07 +01:00
Kevin Ansfield
cb3b01c020 Extracted individual members setting blocks into components
no issue

- the membership setting screen will be covering a lot of areas, having individual settings as discrete components allows for easier re-organisation and cleaner parent templates and controllers
2021-05-14 15:01:50 +01:00
Kevin Ansfield
bdcbfcb92c Renamed access settings route to membership
no issue

Members related settings are being consolidated into a single screen.

- renamed access to membership as the starting point for redesign and consolidation of other settings screens
2021-05-14 14:33:18 +01:00
Peter Zimon
52d55a311a Fixed account menu positioning bug 2021-05-13 12:06:46 +02:00
Peter Zimon
8fab84418e Fixed button hover state bugs in dark mode 2021-05-13 11:47:14 +02:00
Peter Zimon
ba14318de0 Fix "Add subscription" button dark mode UI bug 2021-05-13 11:38:19 +02:00
Kevin Ansfield
4c9eeddd79 Lock file maintenance with fixes
no issue

- catch `undefined` error when saving posts in editor which is thrown by our validation system and handled elsewhere
- bumped `ember-power-select` and switched `ember-power-datepicker` to a github ref so dependency-update fixes are included (version not released yet, see https://github.com/cibernox/ember-power-datepicker/issues/61)
- added a resolution for `ember-basic-dropdown@3.0.16`, with the latest `3.0.17` nothing is shown for the publish/post-settings menus for the date picker dropdown
2021-05-12 15:47:37 +01:00
Rishabh
052c5f62a9 Fixed checkbox state not persisted in wizard
closes https://github.com/TryGhost/Team/issues/676

The checkbox state for portal plans was not stored between wizard pages and kept switching back to original state.
2021-05-12 17:20:32 +05:30
Kevin Ansfield
e584569914 Switch deprecated htmlSafe imports from @ember/string to @ember/template
no issue

See https://deprecations.emberjs.com/v3.x#toc_ember-string-htmlsafe-ishtmlsafe
2021-05-12 12:33:40 +01:00
Kevin Ansfield
74b08e19b8 Switch deprecated {{hasBlock}} to (has-block)
no issue

See https://github.com/emberjs/rfcs/blob/master/text/0689-deprecate-has-block.md
2021-05-12 12:33:40 +01:00
Rishabh
d776aedda4 Fixed interval for default price
no refs
2021-05-11 17:52:59 +05:30
Kevin Ansfield
b08716a981 Fixed publish menu email recipients not matching post visibility
no issue

- updated to use the NQL query that now exists in `posts.visibility` rather than the older `members` and `paid` values
2021-05-11 13:20:53 +01:00
Kevin Ansfield
92f041713b Removed additional options from visibility select when all members selected
refs https://github.com/TryGhost/Team/issues/581

- when free and paid members are selected it doesn't make sense to offer any other options because they will have no effect
- reduces confusion from showing options that get removed by the API as soon as they are selected
  - `status:free,status:-free,...` is always shortened to `members` (`status:free,status:-free` equivalent)
2021-05-11 12:23:34 +01:00
Kevin Ansfield
0357b984fb Fixed click on "Members-only" radio button in PSM not changing selection
no issue

- moved click handler so it applies to the whole button/field/select element
2021-05-11 12:14:26 +01:00
Sanne de Vries
df835fd4e2 Refined segment selector in post settings menu and email newsletter settings
Refs https://github.com/TryGhost/Team/issues/581
2021-05-11 13:09:52 +02:00
Peter Zimon
8af115aeee Custom product copy refinements 2021-05-11 11:55:24 +02:00
Rishabh
d08264e4f9 Fixed set pricing page default view
no refs

It may take couple of seconds before we fetch product information on set-pricing launch wizard, we don't want to show the subscription is set message till the loading is complete.
2021-05-11 14:12:40 +05:30
Rishabh
ba993686a3 Removed default currency option in payment settings
no refs

The default currency option is not currently mapped to the relevant setting, so its hidden till the new setting is added for default currency.
2021-05-11 14:10:44 +05:30
Kevin Ansfield
95b450d412 Fixed linting 2021-05-10 20:38:07 +01:00
Kevin Ansfield
3e4b9a6865 🎨 Updated post settings menu visibility option to support member segments
https://github.com/TryGhost/Team/issues/581

The API now supports `posts.visibility` being an NQL string as well as the special-case `'members'` and  `'paid'` values so the post settings menu visibility select needs to be updated to reflect that.

- swapped visibility dropdown for two radio buttons, "Public" and "Members-only" which uses the `<GhMembersSegmentSelect>` component
- updated post model to use a `visibility-string` transform
  - converts `members` and `paid` to/from the NQL equivalent for correct display in the segment select
- updated post model with two additional properties `isPublic` and `visibilitySegment`
  - `isPublic` helps with the radio button display
  - `visibilitySegment` allows fallback to the default content visibility setting when set to public
- added validation for `post.visibility` so we can show an error and skip saving when members-only is selected and the segment select is cleared
- deleted the now-unused `<GhPsmVisibilityInput>` component
2021-05-10 20:34:23 +01:00
Peter Zimon
c47be38785 Updated site wizrd copy 2021-05-10 21:16:33 +02:00
Rishabh
2862d68f99 Fixed add price not erroring on empty amount
refs https://github.com/TryGhost/Team/issues/641

Updated error handling for empty amount on price modal
2021-05-11 00:18:45 +05:30
Rishabh
d3ac517056 Updated set pricing wizard if custom price exists
no refs

If a custom price is already set before completing the wizard, the set pricing wizard hides the UI to create default custom prices as it doesn't make sense and instead shows a custom message.
2021-05-11 00:17:28 +05:30
Rishabh
67d0c94c40 Removed dev experiment flag for custom products
closes https://github.com/TryGhost/Team/issues/672

Custom products and prices were behind dev experiment flag as it was under active development over last couple of releases. Now that its coming out of development, this removes the dev flag for custom products changes.
2021-05-10 23:38:47 +05:30
Rishabh
c449e32121 Cleaned add subscription prices for member details
closes https://github.com/TryGhost/Team/issues/678
closes https://github.com/TryGhost/Team/issues/681

The prices in "Add subscription" modal should follow the same ordering as on the product detail screen, ie. currency, amount. Also, we only want to allow adding subscriptions for active prices, so the list is filtered on that. Since a Stripe customer is not allowed to have subscriptions in multiple currencies, this also filters the available currency prices based on any active subscription for a member.
2021-05-10 22:25:01 +05:30
Rishabh
d3efc29f08 Added error handling for price modal
refs https://github.com/TryGhost/Team/issues/678

Covers error handling for missing name/amount/billing period for a price modal when adding a new price or editing existing price.
2021-05-10 20:59:05 +05:30
Rishabh
42463e4fdd Added error handling for product details page
refs https://github.com/TryGhost/Team/issues/678

Product name is a mandatory field for a custom product, this change adds error handling on save and custom error message if product is attempted to save without name.
2021-05-10 19:18:30 +05:30
Rishabh
76319c2717 Updated price description to sentence case
closes https://github.com/TryGhost/Team/issues/680

We use sentence case for labels everywhere, updating price descriptions to use the same.
2021-05-10 18:48:39 +05:30
Naz
a1aa9be287 Fixed hardcoded limit error message
refs https://github.com/TryGhost/Team/issues/588

- When the email limit was reached the hardcoded "members" error message was shown. Have changed implementation of the upgrade modal to take the "message" coming from the server into account
2021-05-10 15:04:10 +04:00
Rishabh
f3766091bd Disabled price actions on product save
no refs

Disables Edit/Archive actions on a price while an active save is ongoing for Product to avoid unwanted states due to multiple saves being called.
2021-05-09 23:28:44 +05:30
Rishabh
b762d3a873 Fixed price amount changing on save
no refs

On (un)archiving a price, the visible amount for a price fluctuated till the save was completed due to incorrect amount calculation, fixed here.
2021-05-09 23:27:16 +05:30
Rishabh
fab98939fd Updated sorted price list in product details
refs https://github.com/TryGhost/Team/issues/641

By default, the prices list for a Product will be now shown sorted based on this order -> Active -> Currency -> Amount.
2021-05-09 18:22:42 +05:30
Rishabh
575f85a8ca Added default description to prices
refs https://github.com/TryGhost/Team/issues/641

When default prices are created via the setup wizard, this adds a default description for Monthly and Yearly prices that mimics the values set for them currently in Portal.
2021-05-09 17:36:45 +05:30
Kevin Ansfield
d00d1c2052 Removed unnecessary options from default email recipients setting
refs https://github.com/TryGhost/Team/issues/496

- all/free/paid are selectable via the segment select
- radio buttons should be kept to 3-4 max
- fixed pluralisation of member count below member segment when only 1 member is selected
2021-05-08 12:21:22 +01:00
Rishabh
d2c82c8d27 Fixed signup link for Portal prices
refs https://github.com/TryGhost/Team/issues/643
refs dd75d831c0

Last commit had incorrectly formatted the signup links for custom prices, fixed.
2021-05-07 22:59:59 +05:30
Rishabh Garg
5d598d5e50 Wired free membership settings to API (#1949)
refs https://github.com/TryGhost/Team/issues/637

With custom products it's possible to change the name and description of any price. This assumes that people would want to change the same properties of a Free membership, and wires up the values for free membership price settings to API


Co-authored-by: Peter Zimon <zimo@ghost.org>
2021-05-07 22:46:35 +05:30
Peter Zimon
6f6951700b Refined Portal links UI details 2021-05-07 19:15:04 +02:00
Rishabh
dd75d831c0 Updated Portal links to show dynamic prices
refs https://github.com/TryGhost/Team/issues/643

Currently, the whole setup for choosing plans is built around hardcoded `monthly` / `yearly` which is also exposed in the Portal links/data attributes. Since we now have custom prices, this updates the UI to show links/attributes for all available custom prices and allowing them to function via their price ids.
2021-05-07 22:08:54 +05:30
Peter Zimon
af5b053aab Removed welcome page settings from Portal settings UI 2021-05-07 18:36:39 +02:00
Peter Zimon
8eee71f2d6 Refined archive/unarchive prices 2021-05-07 17:45:59 +02:00
Peter Zimon
ad41a44620 Removed prices from payment settings 2021-05-07 17:10:28 +02:00
Peter Zimon
a94f27bbc0 Removed 'Add price' button when not connected to Stripe 2021-05-07 17:10:28 +02:00
Sanne de Vries
b6cfe7ed7c Updated publishmenu styles
Refs https://github.com/TryGhost/Team/issues/581
2021-05-07 15:59:32 +02:00
Rishabh
c53e0fce77 Added handling for active prices
refs https://github.com/TryGhost/Team/issues/665

- Allows (un)archiving of prices
- Filters Portal settings on active prices only
2021-05-07 19:14:22 +05:30
Peter Zimon
4a7f313282 Updated portal copy 2021-05-07 14:13:53 +02:00
Kevin Ansfield
0642a8b3cc Fixed email segment selector counts not taking subscription status into account
refs https://github.com/TryGhost/Team/issues/496
refs https://github.com/TryGhost/Team/issues/581

- added ability to pass an enforced filter to the segment count component
- used the enforced filter to add `subscribed:true` to segment counts where we're counting the number of members that would receive an email
2021-05-07 12:04:01 +01:00
Kevin Ansfield
0caa539330 Added label and product options for email recipients (#1947)
refs https://github.com/TryGhost/Team/issues/581
requires https://github.com/TryGhost/Ghost/pull/12932

- added segment option and select to default newsletter recipients setting
- updated segment selector to fetch labels/products and show as options
- updated segment selector and count component to call an action when count changes so we can use it in the email confirmation modal
- removed usage and mapping of older `'none'`, `'all'`, `'free'`, and `'paid'` email recipient filter values
2021-05-07 11:58:05 +01:00
Rishabh
e066fb5345 Reverted "Added home redirect for pricing wizard"
This reverts commit 0cf2fc9c24.

Hiding the launch wizard when there are existing prices causes an annoying flicker on the dashboard everytime we reload the page or navigate away. Instead of handling this client side, we'll push up the logic to hide the wizard on server.
2021-05-07 16:15:29 +05:30
Kevin Ansfield
fa454a8e47 Hid segment count for non-admins
refs https://github.com/TryGhost/Team/issues/496
refs https://github.com/TryGhost/Team/issues/581

Only owners and admins have browse access to members so they are the only ones able to fetch member counts. Don't render segment counts if there's no permission because we'll get errors back from the API and the count will be useless.
2021-05-07 10:25:44 +01:00
Rishabh
0cf2fc9c24 Added home redirect for pricing wizard
refs https://github.com/TryGhost/Team/issues/644

In case the prices are already set for the default product, its confusing to have the launch wizard show the price setup again. We remove the wizard completely if the prices are already created for the default product.
2021-05-07 14:34:59 +05:30
Kevin Ansfield
da49dc4922 Added default newsletter recipients setting (#1946)
refs https://github.com/TryGhost/Team/issues/496
reqs https://github.com/TryGhost/Ghost/pull/12925

The publish menu was meant to default to matching post visibility but that wasn't working consistently and didn't make sense for sites which don't email every post to their members.

A "Default newsletter recipients" option has been added to the "Email newsletter" settings screen and the publish menu updated to reflect the option. The free/paid toggles in the publish menu have also been swapped out for a multi-select style component that will cater to more complex member segmentation.
2021-05-07 10:02:19 +01:00
Peter Zimon
09b50995ec Removed subscription count from pricelist 2021-05-07 10:56:10 +02:00
Peter Zimon
764aa9a132 Updated product description on Product list screen 2021-05-07 10:26:58 +02:00
Rishabh
6bdc1c85e0 Wired welcome page UI to settings API
refs https://github.com/TryGhost/Team/issues/611

The UI for welcome page for paid signups is moved from Portal settings to Product page, this change wires up the new UI to the settings API as in Portal settings to function correctly
2021-05-06 22:28:34 +05:30
Peter Zimon
f4a4ef52fd Fixed select dropdown UI bug 2021-05-06 18:33:08 +02:00
Peter Zimon
897acb1909 Updated select style 2021-05-06 18:28:23 +02:00
Peter Zimon
4f16d2cf16 Updated subscription action menu button 2021-05-06 18:24:08 +02:00
Peter Zimon
e6dd0ee56b Removed product from add subscription modal 2021-05-06 18:16:56 +02:00
Peter Zimon
ccf2dff413 Added welcome page UI to product details 2021-05-06 17:40:29 +02:00
Peter Zimon
be30046419 Updated member detail screen for custom products
- added "Add subscription" button to product list
- copy updates
2021-05-06 17:13:08 +02:00
Rishabh
ea49c4d89c Fixed paid signup input in portal setting
refs https://github.com/TryGhost/Team/issues/637

The paid signup setting was incorrectly still checking only for Monthly and yearly prices instead of custom prices list to show the paid signup input.
2021-05-06 17:55:27 +05:30
Kevin Ansfield
7b340929ef Refactored members email settings screen
no issue

- simplified query params as they are only used to display a notification
  - removed all controller knowledge and associated reset behaviour for query params
  - moved notification display from `setupController` to `beforeModel` so the raw query params can be pulled off of the transition object
- removed unused service injections from `<GhMembersEmailSetting>`
- removed unused service injections and properties from members-email controller that were left over from a copy/paste
- converted members-email controller to a native class
- fixed "leave settings" confirmation modal behaviour that wasn't moved across in the the settings screen re-org
2021-05-05 16:59:26 +01:00
Peter Zimon
284b012083 Member activity list refinements 2021-05-05 17:46:50 +02:00
Sanne de Vries
d47352fd29 Updated metadata description preview cutoff point across admin 2021-05-05 17:33:59 +02:00
Peter Zimon
cf215328a4 Member product list cleanup 2021-05-05 15:58:47 +02:00
Peter Zimon
18696a6ee4 Added subscription count to member's product list
no refs.

- added subscription count to the product list in member details screen if there are multiple subscriptions for the given product. This is to make it clear and avoid confusion around the edge case when members have multiple subscriptions for the same product.
2021-05-05 15:42:29 +02:00
Peter Zimon
abe7857e18 Moved Stripe customer link to subscriptions
- since there can be different Stripe customers for each subscription, it makes more sense to place the customer link together with it
2021-05-05 15:23:44 +02:00
Peter Zimon
6cf86f431b Product price cleanup
- removed bottom block (welcome page and stripe checkout link) from price modal
2021-05-05 15:09:01 +02:00
Peter Zimon
1d660218ae Custom product cleanups
- removed "New product" button
- removed "Delete product" button
2021-05-05 15:03:17 +02:00
Peter Zimon
76f3bfb093 Refined product list on member details screen
- updated subscription list for multiple subscriptions
2021-05-05 14:06:19 +02:00
Peter Zimon
893289eac9 Member detail screen refinements
- removed Stripe section and added View on Stripe link to member main info block
- fixed dropdown UI bugs in Product list
2021-05-05 13:40:09 +02:00
Sanne de Vries
30b03b68b0 Updated email limit notification styling in publish-menu
Refs https://github.com/TryGhost/Team/issues/588
2021-05-05 11:53:36 +02:00
Rishabh
da58ef638b Wired product and price description to API
refs https://github.com/TryGhost/Team/issues/586

The `products` and `prices` UI were not hooked to description
data which will be used by Portal to display information about the
products and prices, this change wires it to the API for edit/read.
2021-05-05 14:21:14 +05:30
Kevin Ansfield
67db3f51c2 Fixed <GhTokenInput> not removing selected options when grouped
no issue

Our token input component removes already-selected options from the list of available options but it was expecting a non-grouped set of options.

- updated to recursively walk the options list and build a filtered list being careful not to modify the original groups by reference
- swapped task decorator syntax out for the more easily readable `ember-concurrency-decorators` style
2021-05-04 22:20:11 +01:00
Naz
36feb46c65 Added email limit check in post's publish menu
refs https://github.com/TryGhost/Team/issues/588

- The change allows to give information about not being able to send a newsletter along with publishing the post instead of waiting for a server response to fail
- Implements client-side limit check for email along with information coming from limit's error message
2021-05-04 21:46:29 +04:00
Rishabh
839d18425c Updated type attribute for dropdown button
no refs

The dropdown button component was missing `type="button"` when used as a button, which caused it to act like a `submit` button when used as part of a form, like in Member details page. This change adds type attribute to the button to fix the issue.
2021-05-04 21:52:14 +05:30
Rishabh
22de604ede Added free membership settings modal
refs https://github.com/TryGhost/Team/issues/648

All sites will include a default Free "Product" which is used for free memberships. This change adds UI for handling free membership settings. Also -

- Updates product icons in list and responsive sizes
- Copy updates
2021-05-04 21:42:48 +05:30
Rishabh
2a6d7226d2 Updated launch wizard to create custom price
refs https://github.com/TryGhost/Team/issues/644

Updates site setup to create custom Monthly/Yearly prices in default product as part of launch wizard. Also updates available portal plans based on user selection.
2021-05-04 21:42:48 +05:30
Rishabh
5d2e456f61 Handled custom prices in portal settings
refs https://github.com/TryGhost/Team/issues/637

Updates Portal settings to use list of custom prices for default product instead of hardcoded Monthly/Yearly
2021-05-04 21:42:48 +05:30
Peter Zimon
d44c127978 Updated "What's new?" badge position
- aligned "What's new?" dot position on account icon in nav bar
2021-05-03 18:53:56 +02:00
Sanne de Vries
b8cdb26e70 Styled Google OAuth login button
Refs https://github.com/TryGhost/Team/issues/612
2021-04-29 15:01:42 +02:00
Sanne de Vries
2a4d7e09aa Updated upgrade button styles 2021-04-29 11:47:44 +02:00
Aileen Nowak
c6635370dd Disabled Twitter link in footer
no issue

This is to remove some load from the Support team. Only commented it out, so it can be re-activated when we see fit.
2021-04-29 16:23:14 +12:00
Naz
24570d627f Updated copy for user role upgrade and invite limits
refs https://github.com/TryGhost/Team/issues/587

- Because we lack context when the component is called in "create new users" (invite) or in "modify existing user" (role upgrade) made copy more generic to fit both cases.
2021-04-28 18:08:58 +04:00
Naz
abfbaa8d9b Added upgrade moal when unsuspending staff user
refs https://github.com/TryGhost/Team/issues/587

- Previous behavior wa showing a generic API error in the top banner which wasn't ideal UX
- With these changes user is informed about the limitation before performing any action with clear call to upgrade through the billing page
2021-04-28 18:07:18 +04:00
Naz
8594126dc9 Fixed upgrade modal cta when activating a theme
refs https://github.com/TryGhost/Team/issues/590

- Previous upgrade button behavior was opening up a new browser window leading to now retired billing site. Tha behavior change looks like an oversight we missed to cleanup when introducing an in-admin billing pabe "/pro"
- The change follows similar pattern used in other limit check mesages where tha "upgrade" button takes the user to the billing page
2021-04-28 14:15:56 +04:00
Thibaut Patel
06c7db78b2 Added the oauth login button
issue https://github.com/TryGhost/Team/issues/614

Shown conditionally only when oauth is setup on the server side.
2021-04-28 12:05:32 +02:00
Naz
3435ffcf21 Fixed upgrade modal cta when publishing a post
refs https://github.com/TryGhost/Team/issues/589

- Previous upgrade button behavior was opening up a new browser window leading to now retired billing site. Tha behavior change looks like an oversight we missed to cleanup when introducing an in-admin billing pabe "/pro"
- The change follows similar pattern used in other limit check mesages where tha "upgrade" button takes the user to the billing page
2021-04-28 12:13:24 +04:00
naz
3b7cbaef05 Added limit check before adding new integration (#1934)
refs https://github.com/TryGhost/Team/issues/599

- Previously user received genetic limit error after putting in integration name and clicking "create" button. This created a little frustrating experience.
- The updated flow does the check before loading the integration modal, so the user receives communication about needed upgrade before doing any work
2021-04-28 19:29:25 +12:00
Kevin Ansfield
9c4f1b893b Fixed linting error 2021-04-27 18:39:51 +01:00
Kevin Ansfield
b7d7cbb269 Updated portal preview to pass allowSelfSignup as query param
refs https://github.com/TryGhost/Team/issues/579

- portal reads `allowSelfSignup` from config at startup and so won't show the free plan if it was not selected when preview is first opened
- updated `membersUtils.getPortalPreviewUrl()` to duplicate the `allowSelfSignup` logic from the server so it can be passed through to portal dynamically
2021-04-27 18:35:05 +01:00
Kevin Ansfield
6a6f50cf15 Fixed rollback of selected plans when leaving portal settings
no issue

- the original `portalPlans` array was being modified by reference which was throwing off Ember Data's change tracking
- switched to always creating a new plans array before any modifications take place
2021-04-27 18:03:13 +01:00
Kevin Ansfield
49b83add43 Fixed rollback when leaving portal settings without saving
no issue

- base modal component was throwing an error because the passed in `confirm` action for the leave settings modal wasn't async and didn't have a `.finally()` method
2021-04-27 17:34:04 +01:00
Kevin Ansfield
6a039be595 Disabled portal subscription options when signup is disabled
refs https://github.com/TryGhost/Team/issues/579

- subscription access set to 'invite' or 'none' disables signup so it doesn't make sense to allow those options to be changed when the portal preview won't reflect the settings
- fixed "expand"/"close" button not changing on the access screen signup access block
2021-04-27 15:36:45 +01:00
Sanne de Vries
68c07bde4c Fixed modal shadows being cut off bug 2021-04-27 12:24:45 +02:00
Rishabh
6bde09bd11 Added default sorting to product list
refs https://github.com/TryGhost/Team/issues/633

Adds default alphabetical sorted order for Product list
2021-04-27 13:55:35 +05:30
Rishabh
0a41167f52 Added adapter for products
refs TryGhost/Team#627

Adds adapter for `product` to query records correctly
2021-04-27 13:47:32 +05:30
Peter Zimon
9f74d83657 Updated billing period prompt 2021-04-27 10:00:50 +02:00
Sanne de Vries
ac74fe6224 Updated Google SSO settings copy and styling 2021-04-26 22:15:22 +02:00
Sanne de Vries
63db462fbc Updated SSO configuration settings styles in Labs 2021-04-26 21:27:35 +02:00
Peter Zimon
c105dff604 Updated new product header 2021-04-26 21:09:37 +02:00
Peter Zimon
5762147e52 Updated add product to member modal
- added footnote to price dropdown
2021-04-26 21:01:46 +02:00
Peter Zimon
ece37d3475 Updated custom products styles
- updated mocked data for product and price list
- updated disabled button style on "Add product to member" modal
2021-04-26 20:55:25 +02:00
Peter Zimon
7240f9234f Updated price form design
- rearranged order of input fields and dropdowns on new/edit Price modal
2021-04-26 20:42:16 +02:00
Rishabh Garg
2555b70456 Wired new Products settings UI to API data (#1930)
refs TryGhost/Team#627

This updates the new Products settings screens to use real data from API for existing Custom Products and Prices to populate them on UI and allow site owners to edit them.

- List all Products of site and allow editing Product name
- List all Prices for a product and allow editing individual Price names
- Add new Prices on a Product
2021-04-26 23:52:04 +05:30
Fabien 'egg' O'Carroll
540c50f331 Wired up Member details screen to Custom Products
refs https://github.com/TryGhost/Team/issues/627

This is the reworked Member detail screen for Custom Products and adds
new functionality, or includes existing including:

- List Products for a Member, and the associated Subscriptions
- Allow cancelling/continuing said Subscriptions
- Adding a Product to a Member with a zero-amount Price
2021-04-26 17:28:39 +01:00
Kevin Ansfield
9c1eef178c Revert "Tweaked wording of members access options"
This reverts commit 7c6bace12e.

- the previous wording was correct and the behaviour needs to be changed to match rather than following the "allow free member signup" toggle behaviour
2021-04-26 08:20:51 +01:00
Kevin Ansfield
a08c2dfe12 Added grouped and custom option support to <GhTokenInput>
no issue

- `<GhTokenInput>` is based around `<PowerSelect>` but using Power Select's grouped options feature didn't work because we weren't falling back to it's built-in group component
- updated the `<GhTokenInput>` template to use a supplied block as the option display rather than only displaying the option's label (allows for counts etc to be shown alongside dropdown options)
2021-04-26 08:17:50 +01:00
Sanne de Vries
691c1a8241 Fixed spacing issue in Firstpromoter settings 2021-04-23 15:29:26 +02:00
Sanne de Vries
ef05626bf7 Fixed theme install modal height bug 2021-04-23 15:06:56 +02:00
Kevin Ansfield
7c6bace12e Tweaked wording of members access options
refs https://github.com/TryGhost/Team/issues/579

"Only people I invite" did not marry with behaviour. When selected it matches the old "Allow free member signup = false" toggle setting which only disables free member signup rather than disabling all front-end signup
2021-04-23 10:00:10 +01:00
Thibaut Patel
8c874904d6 Added UI for setting OAuth settings
issue https://github.com/TryGhost/Team/issues/614
2021-04-22 19:41:41 +02:00
Rishabh Garg
a544005c1f Wired products data to Product settings screen (#1927)
refs https://github.com/TryGhost/Team/issues/627

Wires the real Products data from API to the mock Product settings screen including Product Prices list as well as opening of edit/new price modals. The new Product setting is still behind the developer experiment flag as is under active development, the changes in this commit only allows readonly data but not save/edit upstream.

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
2021-04-22 22:17:19 +05:30
Sanne de Vries
f0da772bbd Fixed icons alignment in post preview 2021-04-22 14:43:57 +02:00
Sanne de Vries
494e8c5c20 Fixed spacing bug in AMP settings 2021-04-22 09:59:53 +02:00
Kevin Ansfield
58759b3069 Added option to disable member subscriptions (#1925)
refs https://github.com/TryGhost/Team/issues/579

- new Access settings screen that moves subscription access and default post visibility from the Payments settings screen
- expanded "Free signup" toggle into three signup access options
  - "anyone" - same as previous "allow free member signup" option set to `true`
  - "invite only" -  same as previous "allow free member signup" option set to `false`
  - "nobody" - completely disables member signup and login. Removes injected portal and stripe scripts on the front-end and hides member related sections on the admin dashboard

(this commit moves the above changes out from behind the developer experiments flag and cleans up now-unused code)
2021-04-21 12:09:40 +01:00
Sanne de Vries
dda67edd82 Fixed marketplace link in theme settings 2021-04-21 12:22:02 +02:00
Thibaut Patel
53d77d82df Added an upgrade modal to the custom theme activation failure scenario
no issue

- The modal only appears when the user hits a limitation trying to activate a custom theme not part of the allowlist (if the custom theme allowlist is configured)
- Changed the upgrade button to green to match the design
2021-04-20 19:15:33 +02:00
Kevin Ansfield
89b9f6cfc6 Added unsaved changes modal to members-payments screen
no issue

Unsaved changes handling hadn't been moved across fully to the payments screen when settings were re-jigged meaning changes on the payments screen would make settings dirty and show unsaved changes modal unexpectedly on other screens.

- refactored `members-payments` route to use native classes
- used same unsaved changes pattern as `members-access` route/controller
2021-04-20 17:41:21 +01:00
Kevin Ansfield
4febcdf7ae Refactored members-payments controller to native class style
no issue

- refactored to use more modern Ember style native classes, no functionality change
2021-04-20 17:25:30 +01:00
Kevin Ansfield
1dcc83aad5 Removed unused code from members-payments route
no issue

- unused code was left over from settings re-jig copy and paste
2021-04-20 17:23:20 +01:00
Kevin Ansfield
04760132e9 Moved payment settings access control to route
no issue

- having owner-only access control in the template meant the route was accessible but would show a blank page
- updated access control in the `members-payments` route to redirect admins to the settings index screen and non-admins to the default home screen
2021-04-20 17:08:54 +01:00
Kevin Ansfield
4e2a7b9af5 Removed unused code from members-payments controller
no issue

- unused code was left over from settings re-jig copy and paste
2021-04-20 17:02:43 +01:00
Kevin Ansfield
5337a96074 Removed unused code from <GhMembersPaymentSettings>
no issue

- code relating to "portal settings" and "leave settings" modals was unused, presumably left over from settings re-jig copy and paste
2021-04-20 16:55:31 +01:00
Sanne de Vries
62159390fd Fixed modal overflow responsive issue 2021-04-20 15:57:14 +02:00
Kevin Ansfield
ecf82fbfe8 Fixed invite staff modal button not reflecting validation state (#1924)
no issue

- when the role selection was extracted to an external component the limit validation was also extracted but had no way of feeding back to the consumer
- added `onValidationSuccess` and `onValidationFailure` arguments to the role selection component to allow validation feedback to the consumer
- updated staff invite modal with actions to update state based on validation so the modal's buttons can update accordingly
2021-04-20 13:39:03 +01:00
Sanne de Vries
a4b9c1f253 Styled access settings
Refs https://github.com/TryGhost/Team/issues/579
2021-04-20 11:31:22 +02:00
Kevin Ansfield
139ba9413a Hid members data in dashboard when signup access is "Nobody"
refs https://github.com/TryGhost/Team/issues/579

Members is essentially disabled when signup access is set to "Nobody" so it doesn't make sense to show members related charts and actions in the dashboard.

- adds `showMembersData` property to the dashboard controller that returns `false` when members is disabled
- wraps members related sections of the dashboard in conditionals
2021-04-20 09:08:15 +01:00
Kevin Ansfield
a271aa53fd Compacted dashboard controller tracked property code style 2021-04-20 09:01:04 +01:00
Kevin Ansfield
889f90f494 Added "Nobody" option to members signup access
refs https://github.com/TryGhost/Team/issues/579

- adds "Nobody" option that will set `members_signup_access` setting to `'none'`
- when selected also sets `default_content_visibility` setting to `'public'`, expands it if collapsed and disables other options (that setting doesn't make sense when members is disabled, individual post access can still be set manually if needed)
2021-04-19 16:37:00 +01:00
Kevin Ansfield
4e82ea38ea Updated setting model for new members_signup_access setting
requires https://github.com/TryGhost/Ghost/pull/12886

- renamed `membersAllowFreeSignup` to `membersSignupAccess` and changed type to match new setting
- added `membersAllowFreeSignup` computed property to map to the new setting to avoid having to migrate code elsewhere that will be removed once the new options are out of developer experiments
2021-04-19 16:37:00 +01:00
Peter Zimon
6986c4f424 Added mock product assignment modal
Created modal for adding products to members with mock data
2021-04-19 14:45:14 +02:00
Peter Zimon
5af33b3f21 Updated member product list mock design 2021-04-19 10:42:53 +02:00
Peter Zimon
96faf27ba8 Added mock member details component
Prepring for custom products we'll change the overall layout of member forms. This commit has a component that's loaded when dev flag is on for the new layout with mocked product data.
2021-04-15 17:58:35 +02:00
Peter Zimon
01c2facccc Removed member count from product list mock page 2021-04-15 11:09:44 +02:00
Peter Zimon
5a5d6398fd Updated product details mock screen
Updated product details mock screen for the first version:
- removed icon and chart
- added status to price list
- changed icons to text links on price list
2021-04-15 11:08:43 +02:00
Kevin Ansfield
82d8261a56 Added subscription access settings to Access screen
refs https://github.com/TryGhost/Team/issues/579

- moved "Allow free member signup" toggle from Payments screen to Settings screen and switched to a radio selection that allows for better description and further selection of options
2021-04-14 23:43:10 +01:00
Sanne de Vries
4f10e611b0 Moved default post access from Payments to Access screen (#1879)
refs https://github.com/TryGhost/Team/issues/579

- updated access section on Payments screen to only show when not running developer experiments
- added default post access settings to Access screen

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2021-04-14 19:02:36 +01:00
Kevin Ansfield
cf7a763199 Removed usage of deprecated EmberSimpleAuth mixins (#1910)
refs https://github.com/TryGhost/Admin/pull/1901

Ember has deprecated mixins in preparation for 4.0 and `ember-simple-auth` has now done the same in 3.1.0.

- removed all imports of Ember Simple Auth mixins
- moved authenticated and invalidated handling from application route to session service
- moved server-notification loading from application route to session service
- updated `AuthenticatedRoute` to use the session service directly rather than authenticated route mixin
- added `UnauthenticatedRoute` that incorporates the behaviour from our overridden `UnauthenticatedRouteMixin` and switches to using the session service directly
2021-04-12 13:21:57 +01:00
Sanne de Vries
eb28e42ad4 Updated styles for change-user-role modal 2021-04-12 14:09:24 +02:00
Kevin Ansfield
ffe5416b77 Swapped staff role selector from <select> to new role selection modal
closes https://github.com/TryGhost/Team/issues/572

Role selection when inviting users was updated to show information about each staff role. This change updates the staff edit screen to use the same UI for changing the role of an existing user.

- added `select-user-role` modal which uses `<GhRoleSelection>` to allow role selection
- replaced the `<select>` input for changing a user's role with a button that triggers the role selection modal
  - role is not set unless the "Set role" button is clicked after making a selection, cancel or close will leave the original role selected
2021-04-12 11:35:50 +01:00
Kevin Ansfield
824953d162 Fixed initial role selection and layout shift in <GhRoleSelection>
no issue

- initial role was always being set to Contributor due to incorrect argument being used when checking if the default role should be applied
- there was considerable layout shift of the `<GhRoleSelection>` container after role loading was finished, quick-fix applied by specifying a width and height to the loading spinner container that matches the final width/height
2021-04-12 11:27:37 +01:00
Kevin Ansfield
c3c383ae69 Fixed role validation when inviting new users
no issue

- the `role` argument was not being passed to the `validateRole` method when changing roles
2021-04-12 11:15:09 +01:00
Kevin Ansfield
e7ac8731b0 Extracted role selector to <GhRoleSelection> component
refs https://github.com/TryGhost/Team/issues/572

- preparation for re-using the new role selector in a model when changing an existing user's role
2021-04-10 08:16:16 +01:00
Peter Zimon
80357855aa Added mock product price modal
no refs.
- added static price modal to product detail page
2021-04-09 13:01:28 +02:00
Thibaut Patel
7b99c555c5 Fix the limit service when querying an empty config
commit d350a58769
2021-04-09 11:16:37 +02:00
Thibaut Patel
47f0969ac2 Fix customThemes flag
commit f65c5a7f8b

 - disabled = true means that the feature is disabled
2021-04-08 20:23:21 +02:00
Thibaut Patel
f65c5a7f8b Fix UploadThemeController to support disable:true customThemes flag
no issue
2021-04-08 19:32:46 +02:00
Peter Zimon
f172fedb58 Updated settings icon colors 2021-04-08 17:25:32 +02:00
Peter Zimon
c6bb423a26 Updated product detail page mockup
- updated layout for static product detail page
2021-04-08 17:20:32 +02:00
Kevin Ansfield
733f76d571 Added automatic CSV export when bulk deleting members
refs https://github.com/TryGhost/Team/issues/585

- updated bulk destroy task to first use the current query params to fetch from the appropriate CSV export endpoint and trigger a download
  - fetches via JS and triggers download from a blob URL link instead of an iframe so that we can be sure the download is successful before we hit the bulk delete endpoint
  - works differently to user deletion download because the server is not generating an export file and saving it meaning the client has to be sure we don't delete data before it's exported
- updated copy in the confirmation modal to reflect the download behaviour
2021-04-08 16:06:00 +01:00
Kevin Ansfield
51b0cfb199 Fixed members list query not always matching route params
refs e25e36352d

- referenced refactor accidentally removed direct usage of `params` in `fetchMembersTask()`
- because it's called from the `model()` hook the query param properties on `this` have not yet been updated to the new params meaning we were querying the API with stale params
2021-04-08 16:00:43 +01:00
Sanne de Vries
ee5da7a5d2 Updated members deleted info-box style 2021-04-08 16:14:06 +02:00
Kevin Ansfield
e25e36352d Refactored duplicated members query generation
no issue

- code for generating a members API query was duplicated across listing, export, and bulk delete
- extracted the duplicated code into a reusable method
- removed `?all=true` param generation for bulk members delete because we don't provide that option in the UI
2021-04-08 15:12:14 +01:00
Peter Zimon
6ee31e206b Added static components for custom products
- added link to Products in Settings main screen
- added product list page with static content
- added product detail page with static content
2021-04-08 14:40:13 +02:00
Thibaut Patel
d350a58769 Revert "Replaced the config service by the limiter service"
This reverts commit fc30aebd21.
2021-04-08 13:53:52 +02:00
Kevin Ansfield
72590083f3 Added ability to bulk delete members by label or status (#1883)
refs https://github.com/TryGhost/Team/issues/585
requires https://github.com/TryGhost/Ghost/pull/12082

When a label or status filter is selected on the members screen show a "Delete selected" option in the actions dropdown. Bulk deleted members will _not_ have any subscription data modified in Stripe, if a member should be deleted and have their subscription cancelled it's necessary to do that on a per-member basis.

- updated bulk delete handling to match API
- added link to bulk delete confirmation modal in members actions dropdown (only shown when label, status, or search is used)
- updated testing framework for members
  - added label factory for easier test setup
  - updated `GET /members` and `DEL /members` endpoints to work with label filters
  - updated test selectors for easier reference in tests
2021-04-08 12:06:27 +01:00
Sanne de Vries
556141d613 Styled staff limit notification in invite-modal 2021-04-08 11:53:15 +02:00
Naz
8756ddac53 Fixed staff limit check to filter out "Contributors"
refs https://github.com/TryGhost/Team/issues/587

- Invites and users with "Contributor" roles should not be counted towards the limit
2021-04-08 21:11:16 +12:00
Thibaut Patel
fc30aebd21 Replaced the config service by the limiter service
comment 634d2daa13 (r49241858)
2021-04-08 10:56:00 +02:00
Naz
de97328c42 Fixed staff limit check query to take into account inactive users
refs https://github.com/TryGhost/Team/issues/587

- Users with 'inactive' status should not be counted towards the "staff" limit
2021-04-08 20:07:24 +12:00
Naz
25debab71d Added staff limit check to invite people modal
refs https://github.com/TryGhost/Team/issues/587

- When user's instance reaches a "staff" limit we need a way to proactively notify them about reached limit and give enough information about why it was reached and what the next action would be to unblock them
- The implementeation uses a frontend implementation of the limit-service which allows to do preventative checks for the reached limits
2021-04-08 17:28:37 +12:00
Naz
40cedb84ff Added integration with limit service
refs https://github.com/TryGhost/Team/issues/587

- This is first pass on the frontend limit-service integration. Max count queries are substituted with HTTP requests to mimick backend checks. Note, they are not meant to substitute backend checks only to suplment them.
2021-04-08 16:59:56 +12:00
Sanne de Vries
2e8109d05f Clarified staff user roles in Admin (#1874)
refs https://github.com/TryGhost/Team/issues/572

- Replaced dropdown in invite-user modal with radio buttons
- Added description for each user role
- Added icon to provide more info on hover for each role
- Got rid of unused box styling
2021-04-07 15:20:30 +01:00
Thibaut Patel
634d2daa13 Added configurable limit on custom themes
issue https://github.com/TryGhost/Team/issues/590
2021-04-07 15:51:22 +02:00
Rish
6932d826f8 Updated member stats refresh to new counts endpoint
refs 72e8894eac

Switches the stats refresh method to use new `/members/stats/counts` endpoint instead of the old one at `/members/stats`
2021-04-06 14:13:01 +05:30
naz
238632402c 🐛 Fixed host limit error when resending a pending invite (#1881)
refs https://github.com/TryGhost/Team/issues/587
refs e30b9735fa

- It was not possible to invite a new Contributor to a site that has reached its limit
- This fix divides the resend invite action into two separate steps: 1. Deleting existing invite 2. Creating a new one for the same data
- It was hitting the limit because the permissions were correctly checking for "add" action being executed when the limit of invites/staff users was already used up. By removing existing invite we mimic the behavior the server would do for us anyway (2111992dd4/core/server/services/invites/invites.js (L18-L22))

Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-04-06 15:10:03 +12:00
Kevin Ansfield
15561efd48 Fixed url formatting in search engine result previews
no issue

- `config.blogDomain` includes subdirectory and `config.ghostPaths.subdir` includes a leading `/` which resulted in the search engine result preview url incorrectly showing as `mysite.com/subdir > /subdir > slug`
- replaced the in-template construction of the url previews with a getter on the backing class that constructs the preview url based on parsing the configured url
2021-03-30 10:10:34 +01:00
Sanne de Vries
d3ace95ff6 Fixed PSM seo preview title overflowing bug 2021-03-30 10:41:36 +02:00
Sanne de Vries
c41a1f77f8 Reverted color updates 2021-03-29 16:21:54 +02:00
Sanne de Vries
7e92306a77 Updated icon/color access screen in settings 2021-03-29 16:09:58 +02:00
Kevin Ansfield
c1904d7d84 Added blank members access settings screen behind dev flag
refs https://github.com/TryGhost/Team/issues/579

- empty screen ready for signup access and default post access level settings to be moved to
- has unsaved settings changes modal ready
2021-03-29 12:49:09 +01:00
Kevin Ansfield
ae4d15d237 Removed empty init() calls
no issue

- `init()` methods that do nothing but call `super()` aren't adding anything but add noise to class/object definitions
2021-03-29 10:32:03 +01:00
Kevin Ansfield
65e07109a9 Updated test selectors on settings screen
no issue

- navigation test selectors were duplicated and did not match the respective link destinations
2021-03-29 10:19:33 +01:00
Thibaut Patel
0944fb39ba Updated the staff access token to use the existing patterns
issue https://github.com/TryGhost/Team/issues/497
2021-03-25 15:08:29 +01:00
Rish
e91e8f73fd Removed www subdomain from default newsletter/support address
closes https://github.com/TryGhost/Team/issues/397

The default newsletter/support email address for a site is currently setup as noreply@DOMAIN , which means for a custom domain setup with www the email address becomes noreply@www.somesite.com which is not the expected behavior.

Note: This fix only removes `www` subdomain from addresses and no other subdomains
2021-03-24 23:51:13 +05:30
Rish
803523c31d 🐛 Fixed incorrect member count on dashboard
closes https://github.com/TryGhost/Team/issues/561

In case the last event for a new member on site was before 30 day period, the count for members was showing 0 instead of the actual value. The change fixes the count to show the correct value even if there is no new recent member activity.
2021-03-24 21:56:35 +05:30
Rish
43c83c77f2 Updated MRR display value on dashboard
closes https://github.com/TryGhost/Team/issues/568

Displaying amount in cents in context of overall MRR forecast/estimate doesn't add much value, the change rounds MRR value to nearest whole number on dashboard
2021-03-24 21:56:35 +05:30
Rish
fde76becc4 Updated default MRR currency from settings
closes https://github.com/TryGhost/Team/issues/550

The MRR chart relied on first currency from the list in case of data for multiple currencies, falling back to USD in case of no MRR data for the site. This can be misleading, specially when the active currency set in payment settings is different from one picked to show on MRR chart.

The change updates dashboard to always pick the currency from Payment settings as default for showing chart data.
2021-03-24 21:56:35 +05:30
Sanne de Vries
6213587ad9 Fixed editor text selection bug in Safari dark mode 2021-03-24 15:12:40 +01:00
Rishabh Garg
4148db6fd6 Removed hardcoded accent color fallbacks (#1875)
refs TryGhost/Team#536

From 4.0, we ensure and require that accent colour is always set. This change removes hardcoded accent color fallbacks to avoid confusion as well as cause accidental fallback that is undesired.
2021-03-24 18:26:09 +05:30
Aileen Nowak
d2dd33411a Changed /billing route to /pro (#1871)
no issue

The current `/billing` route needs to be renamed into `/pro`, so we can use sub-routes like `/pro/billing` and `/pro/domain` in the billing app.
2021-03-23 11:59:52 +00:00
Sanne de Vries
abbb5cb314 Updated info box styles 2021-03-23 12:17:47 +01:00
Sanne de Vries
e0b9d64875 Fixed dashboard graphs responsive issue 2021-03-22 15:59:18 +01:00
Peter Zimon
50c41c18f8 Fixed box alignment on Dashboard 2021-03-22 15:42:16 +01:00
Peter Zimon
6cdd79e0b5 Updated settings button copy on Dashboard 2021-03-22 15:37:46 +01:00
Peter Zimon
48f44b9093 Fixed placeholder of tag color 2021-03-22 15:16:09 +01:00
Sanne de Vries
6f3ae6e4ed Fixed arrow widths for avatar and canvas title 2021-03-22 10:53:39 +01:00
Sanne de Vries
2937df8212 Fixed logo icons in Integrations/Zapier for dark mode 2021-03-22 10:33:28 +01:00
Sanne de Vries
12abd4c2c9 Changed dashboard button style in dark mode 2021-03-19 12:14:24 +01:00
Sanne de Vries
a231c8970d Fixed email preview height Safari bug 2021-03-19 11:57:22 +01:00
Peter Zimon
105140ef3f New logo (#1868)
refs TryGhost/Team#547

- Updated Admin to use new Ghost logo
2021-03-18 17:26:35 +00:00
Kevin Ansfield
7286ae9fcf 🐛 Fixed link contrast in editor with very light/dark accent colors (#1870)
refs https://github.com/TryGhost/Team/issues/551
refs https://github.com/TryGhost/Ghost/issues/12767#issuecomment-800177254

- calculate contrast color of accent color against light/dark mode background color
- lighten (dark mode) or darken (light mode) the accent color used in the editor to ensure it has enough contrast to be legible
2021-03-18 16:46:38 +00:00
Fabien 'egg' O'Carroll
6d324e31f1 🐛 Fixed deleting members to prompt cancellation (#1869)
closes https://github.com/TryGhost/Team/issues/546

Since https://github.com/TryGhost/Ghost/commit/26ee6483 and
https://github.com/TryGhost/Admin/commit/fbd42ef3 member
subscriptions have not been on the `stripe` property.

This meant that all members were considered to not have subscriptions,
and so the modal would not display to option to cancel subscriptions.
2021-03-18 14:45:29 +00:00
Sanne de Vries
eec670a859 Fixed Safari bug social previews icon height 2021-03-18 15:14:23 +01:00
Sanne de Vries
5ade9fe201 Updated links style 2021-03-18 14:56:33 +01:00
Kevin Ansfield
df2301e1c0 Revert "Refactored ApplicationController to use native class"
This reverts commit 9b6d4822e7.

- there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor
- reverting to working version with computed properties for now
2021-03-17 12:00:14 +00:00
Kevin Ansfield
9b6d4822e7 Refactored ApplicationController to use native class
no issue

- updated to use Ember Octane idioms
2021-03-17 11:48:36 +00:00
Kevin Ansfield
efdde1f4a6 Fixed billing/update links showing for admins
no issue

- only owners can generate tokens to identify as the publication so the billing app won't work for non-owners
2021-03-15 12:33:48 +00:00
Rishabh Garg
74e2d3ef8c 🐛 Fixed MRR start date value in chart (#1865)
no refs

MRR start date value for charts was being calculated with start value as 0, assuming we have the data for first date in our range to use as start value. Since the events data returned only has data on dates where any MRR event happened, in case the first date in our range didn't have any. data we started from 0 instead of value on previous date. This fix

- updates calculation to pick the start value for chart based on value on last date in our range(30 days)
- adds unit tests for stats
2021-03-15 15:23:55 +05:30