Commit Graph

51 Commits

Author SHA1 Message Date
Peter Zimon
41484e60a3 Minor Portal settings UX improvements
refs. https://github.com/TryGhost/Team/issues/1813

- All the groups of the Portal settings accordion was closed by default. Opening the first group when showing the modal makes the workflow faster.
- The top heading on the content area had a white background which made the screen visually a bit cluttered.
2022-08-17 11:06:53 +02:00
Simon Backx
9e7727752c Updated support email address confirmation flow (#2426)
refs https://github.com/TryGhost/Team/issues/584

- No longer uses a API URL + redirect inside verification emails. This is replaced by a new route (`/settings/members/?verifyEmail=token`) that does the API request and shows a modal.
- Removed update button when changing support email address in the Portal settings
- Added `_meta` attribute to settings (uses same pattern as newsletters model)
- When updating the `membersSupportAddress` setting (via the normal edit endpoint), the `sent_email_verification` meta property will get set by the API. When this new property is present, we'll show a warning that the support address requires verification.
2022-07-15 14:44:26 +02:00
Kevin Ansfield
09400a1ef8 🐛 Fixed broken file selectors in labs, general, and portal settings screens
refs 8fee5f155b

- the conversion from jQuery to native was incomplete in a few places and still used `.find()` in place of `.querySelector()`
2022-05-29 11:18:55 +01:00
Kevin Ansfield
8fee5f155b Standardized on non-jQuery file dialog triggers
no issue

- we had a mix of legacy jQuery triggers and native triggers for file input clicks and jQuery hasn't been required to do this in our target browsers for quite a long time now so it made sense to update all click triggers to avoid old patterns being replicated
- cleaned up some conditionals with optional-chaining
- removed use of `run.bind(this)` for methods that use `@action` because the binding is already handled for us
2022-05-26 11:05:14 +01:00
Kevin Ansfield
90be535eb8 Fixed linter error
refs a90f9d275c
2022-05-24 17:56:12 +01:00
Kevin Ansfield
a90f9d275c Fixed "Update support address" button showing error on success
no issue

- the API response is now empty so returning the parsed response is null/undefined resulting in `<GhTaskButton>` showing a failure state
- switched to returning an enforced `true` value, if there was an error that's handled by the try/catch
2022-05-24 17:52:31 +01:00
Simon Backx
bc1aa493fa 🐛 Fixed unreliable paid members enabled checks (#2405)
refs https://github.com/TryGhost/Team/issues/1650

- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
2022-05-24 16:53:03 +02:00
Simon Backx
eee3a9aa90 🔥 Removed multipleProducts, tierWelcomePages, and tierName flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-16 17:25:03 +02:00
Hannah Wolfe
affe6743e5 Renamed products to tiers (#2372)
refs: https://github.com/TryGhost/Team/issues/1145

- this should allow us to remove the /products endpoint in v5

It avoids:

- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-11 22:41:54 +05:30
Peter Zimon
fb5f263ace Email settings design update (#2359)
Updated Email settings and Portal settings design to make it more scalable and more consistent with the rest of the Admin.
2022-04-28 10:24:12 +02:00
Rishabh
82d6d38b3f Fixed tier archive not updating portal preview
The tier visibility is now handled by visibility property on object, this change ensures portal preview is updated on a tier archive to show the correct Portal UI.
2022-03-09 14:21:16 +05:30
Rishabh
12944a4c91 Removed usage of portal products setting
refs https://github.com/TryGhost/Team/issues/1387

Tier visibility is now managed by `visibility` property, and we'll be removing the `portal_products` setting in future.
2022-03-08 15:50:21 +05:30
Rishabh Garg
3e4e9d731b Added tier visibility handling from portal settings (#2295)
refs https://github.com/TryGhost/Team/issues/1387

This will allow us to move from the portal_products and portal_plans settings to using the visibility property on tiers to determine whether or not a tier should be visible in Portal. This updates admin to handle tier visibility property based on changes in settings. Old portal settings update is temporarily kept in though will not be used for determining visibility going forward. Also removes default product visibility being set on stripe connect.
2022-03-08 13:00:31 +05:30
Rishabh
61eeafbca7 Refined portal settings for multiple tiers
refs https://github.com/TryGhost/Team/issues/1252

- enables available tiers list for portal in case of a single tier as well, which was previously hidden
- allows site owners to enable a tier again for Portal if it was archived in past
2022-02-02 16:24:20 +05:30
Sanne de Vries
21b4b15a1c Improved Email newsletter settings page (#2207)
Updated email newsletter settings

- Added toggle to disable email newsletters
- Hides email related UI when email is completely turned off
- Rearranged email newsletter settings
- Added publish-menu preview in 
- Changed default-recipients setting
- Updated publish-menu to show Publish as default action
- Removed the confirmation modal during publishing when no emails are intended to be sent
2022-01-27 12:40:11 +01:00
Fabien "egg" O'Carroll
9c139a78e4 Removed Archived Tiers from Portal settings
refs https://github.com/TryGhost/Team/issues/1252

Archived Tiers are no longer able to be signed up to, and should not be
shown in Portal
2022-01-24 12:12:15 +02:00
Kevin Ansfield
57b1ab4800 Ran ember-cli-update --run-codemods (#2219)
no issue

- part of ember upgrades
- removed all unnecessary usage of `.get`
- cleaned up imports where we had imports from the same module across multiple lines
- standardized on importing specific computed helpers rather than using `computed.foo`
- switched tests from using `wait()` to `settled()`
2022-01-21 19:25:47 +00:00
Rishabh Garg
86b55b0f81 Added new free tier card with custom description/benefits (#2203)
refs https://github.com/TryGhost/Team/issues/1037

Adds new free tier card with option to add custom description and benefits for free tier, behind the tiers beta flag. Also:

- updates formatting of tier prices
- changes "Free" section to "Default"
- updates price formatting of membership tiers in admin
- updates currency code handling for product card
- updates default paid product handling

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-01-18 00:23:43 +05:30
Rishabh Garg
65495b528f 🐛 Fixed settings previews not working in private site mode (#2128)
closes https://github.com/TryGhost/Team/issues/1161

- when a site is in private mode, design previews, the portal previews on membership, customize portal and offer pages were unable to load. 
- For design and theme previews, the request to fetch preview data was failing due to cors and cookie not attached when admin and frontend have split urls. 
- For portal and offer previews, there was no authentication done on private site before load, so if user opened the pages directly on them it failed to load the site.
- this change adds a new service that authenticates private site from admin as soon as user session is loaded, so previews on settings will always find the authenticated session for private sites and load correctly.
- it also updates fetch method for previews to include credentials so they are always able to fetch the site data after login
- removes authentication from site route since that was done as its now centrally taken care of by the frontend service
2021-10-28 18:29:41 +05:30
Rishabh
e71feeae5f Moved "Free" to "Tiers" section in Portal settings when visible
closes https://github.com/TryGhost/Team/issues/878

"Free" should be part of "Tiers" section in Portal settings when there are more than one product
2021-08-23 16:24:33 +05:30
Rishabh
31d608f7dd Refined available tiers UI on Portal settings for single product
closes https://github.com/TryGhost/Team/issues/812

- removes `Products available at signup` in Portal settings in Admin if there is only single tier available
2021-08-23 12:26:26 +05:30
Rishabh
7394df6137 Disabled stripe connect for non-owner users in Portal settings
refs https://github.com/TryGhost/Team/issues/994

Non-owner admin users have visibility of the "Connect with Stripe" UI in Admin, but lack permissions to setup the Stripe session in order to actually connect Stripe. This change patches the Portal settings UI by disabling Stripe Connect option for non-owner admins.
2021-08-17 15:33:29 +05:30
Rishabh Garg
274044e253 Added UI for portal products (#2010)
refs https://github.com/TryGhost/Team/issues/768

- adds portal products selection UI behind flag on portal settings screen
2021-06-21 14:21:48 +05:30
Rishabh
64393ab197 Updated portal settings to use names in portal_plans setting
refs https://github.com/TryGhost/Team/issues/753

The portal_plans setting was previously storing price ids for active monthly/yearly prices for the default product, which was done to allow multiple prices in Portal. Since the portal_plans setting is now reverted to use `monthly`/`yearly` named values to denote the availability of active monthly/yearly pricing on a product, this change updates the handling in portal settings modal to work with new settings.
2021-06-04 13:30:11 +05:30
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
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
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
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
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
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
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
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
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
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
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
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
Kevin Ansfield
7687571b12 Updated launch wizard pricing step to show portal preview
refs

- dropped the portal service in favour of using the existing `membersUtils` service
    - renamed `getPreviewUrl()` to `getPortalPreviewUrl()`
- update the iframe src to point to the portal preview url when on the pricing step
- added free/monthly/yearly checkboxes to pricing step
- update iframe src with regenerated portal preview params when making changes
2021-02-02 16:08:07 +00:00
Kevin Ansfield
d520e2b079 Extracted portal preview url generation into service
no issue

- allows for preview url generation to be shared across the portal design settings screen and the payment setup step of the launch wizard
2021-02-02 16:08:07 +00:00
Peter Zimon
202468c025 Move accent color to Design settings 2021-02-02 16:08:05 +00:00
Rishabh Garg
487724e0fe Added support for external urls for redirect (#1778)
refs https://github.com/TryGhost/Ghost/issues/12366

Adds support for saving external URL's for custom redirects and improves error handling to validate on blur/before saving

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
2020-11-23 09:38:29 +00:00
Fabien 'egg' O'Carroll
b6dfa54b07 Improved UI for custom redirect settings (#1775)
refs https://github.com/TryGhost/Ghost/issues/12366

* Displays URL as absolute, but still stores the path relative to the site 
* Allows pasting absolute URL's or relative
* Does not support external URL's
* Removed redundant "Links" section in Portal settings sidebar

Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-11-20 09:53:08 +00:00
Peter Zimon
3cdb63006a Supported custom redirects for member signup (#1768)
refs https://github.com/TryGhost/Ghost/issues/12366

- added form fields for redirects
- updated CSS to handle scrolling

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
2020-11-19 09:59:51 +00:00
Peter Zimon
6ecba355eb Moved members settings to new page (#1736)
no refs

Moves members related settings in Labs to its own page to improve the overall UX and make it more consistent with the rest of the Admin.
2020-10-22 16:09:00 +05:30
Peter Zimon
94077449b3 Update portal settings (#1731)
* Added auto focusing preview on the signup page while being on links and clicking on any setting in the sidebar

* Refine upload custom portal icon button

* Updated copy for sidebar and links screen

* Added grouping to links list
2020-10-16 15:34:22 +02:00
Peter Zimon
bc779bb3e7 Fixed 'null' portal button text
no refs.
- fixing portal button displaying 'null' if the portal button text input field is empty
2020-10-14 14:47:08 +02:00
Peter Zimon
eede9e1141 Updated Portal links design
no refs.
- in Portal settings domain and the path are separated visually so that it conveys the concept of using the relative URL instead of absolute
- for similar reasons, copy link copies only the path part
2020-10-12 13:56:37 +02:00
Rish
245dbef994 Allowed empty accent color in portal preview
no issue

- Current logic was not setting empty accent color in portal preview which was misleading when no accent color is set
- Updated preview url to contain empty accent color which is picked by Portal preview
2020-10-01 12:28:24 +05:30