Commit Graph

7511 Commits

Author SHA1 Message Date
Sanne de Vries
eb8526fc60 Fixed copy 2021-09-20 21:54:14 +02:00
Sanne de Vries
c66c62e4b9 Fixed copy in card-menu for Codepen description 2021-09-20 20:15:47 +02:00
Kevin Ansfield
dd2a36a4c7 🐛 Fixed misleading message when scheduling an already emailed post
no issue

After publishing and sending a post, if it was unpublished then scheduled again the post status would show "published and sent to x members" where `x` is the current number of members but that's incorrect because a post can only be sent by email once

- removed the "and sent to x members" message if a scheduled post has already been sent via email
2021-09-20 17:42:05 +01:00
Sanne de Vries
0013ff0980 Fixed editor header display on mobile 2021-09-20 17:36:43 +02:00
Sanne de Vries
f876f16df0 Fixed social preview text alignment bug in editor 2021-09-20 17:08:19 +02:00
Kevin Ansfield
7146d9e09a Added non-functional themes table to advanced theme settings modal
refs https://github.com/TryGhost/Team/issues/1045

- prep for use in static design
- useful for inspecting API output when querying themes
2021-09-20 12:13:51 +01:00
Kevin Ansfield
ff636de268 Added blank change-theme and advanced theme options modals
refs https://github.com/TryGhost/Team/issues/1045

- preparation for static design
2021-09-20 11:05:16 +01:00
Kevin Ansfield
bc746cbe9a Fixed unexpected redirect when navigating away from customize modal
refs https://github.com/TryGhost/Team/issues/1045

If the customize modal is open and you manually changed the URL, on navigating the modal would close and a transition to the manually entered URL would start but then you'd be transitioned back to `settings.design`.

The problem occurs because `beforeModalClose` is always called when the modal closes causing the redirect.

- added a `hasConfirmed` boolean that is set to `true` when leaving the customize route if there are no unsaved changes or the changes have been confirmed
- skipped the unsaved changes check and redirect in `beforeModalClose` when `hasConfirmed` is true
2021-09-17 18:26:58 +01:00
Daniel Lockyer
eefe3d3e05 v4.15.0 2021-09-17 16:58:44 +01:00
Matt Hanley
3248e1b5b4 Revert "Reinstated billing link; Moved staff link to admin only"
This reverts commit 266d1ca682.
2021-09-17 16:38:27 +01:00
Matt Hanley
e44bd2376a Updated OAuth signin link to relative for subdirectory support 2021-09-17 16:34:12 +01:00
Matt Hanley
266d1ca682 Reinstated billing link; Moved staff link to admin only
Billing link was removed in the admin reshuffle for v4; this adds it
back to support the upcoming billing page changes for Pro.
2021-09-17 15:10:49 +01:00
Kevin Ansfield
9a23566d3b Fixed linting error 2021-09-17 10:33:44 +01:00
Kevin Ansfield
73139ea6dd Added general/theme tabs to customize design modal
refs https://github.com/TryGhost/Team/issues/1045

- added tabs to the the customise design modal's sidebar for general settings and theme settings
  - copied settings from the existing branding modal plus site description from general settings screen into the general settings tab
  - theme settings tab left blank ready for static design
- `saveTask` put on the controller so that we can access it from the route, allowing us to pause modal closing when navigating away (implementation left for later)
2021-09-17 10:27:53 +01:00
Daniel Lockyer
bdd3a4ac0f Updated lockfile
refs 4f2af95afe

- the bump to `TryGhost/ember-promise-modals#v2.0.0+ghost.2` didn't
  include the lockfile changes so this commit updates it
2021-09-17 08:29:55 +01:00
Rishabh
03b37b05fb Fixed product benefits not loaded on memberships settings
refs https://github.com/TryGhost/Team/issues/905

- benefits were overridden with a secondary products query for segment select which did not have proper includes
- fixes includes for products when fetched for member segments
2021-09-17 12:41:56 +05:30
Kevin Ansfield
2b0d1ee357 Fixed customize design route-based modal handling + added unsaved change confirmation
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Team/issues/1045

- removed need for `{{will-destroy}}` in the modal template by using `willTransition()` in the route that opened the modal instead
- used the property of new modals acting as promises to implement an unsaved changes confirmation modal
  - added `confirmUnsavedChanges()` method that opens a "are you sure you want to leave?" modal that is treated as a promise. If the modal is closed by the "Leave" button the promise returns true in which case we rollback the unsaved changes. The modal is returned so that other behaviour can use this method and wait for the confirmation result
  - added `willTransition()` route hook that calls `confirmUnsavedChanges()` when there are unsaved changes and will only continue to transition if the "Leave" button is pressed
  - added `beforeClose()` hook to the customize modal when opening so that we can prevent the customize modal from closing when "Stay" is clicked in the confirmation modal
- updated `activate()` hook to store the modal instance so it can be closed later
- updated `deactivate()` hook to call `.close()` on the modal instance rather than using private data/methods on the modals service
2021-09-16 20:26:57 +01:00
Kevin Ansfield
4f2af95afe Moved modals service to manual handling of click and escape-to-close
refs https://github.com/TryGhost/Team/issues/559

Click-to-close and escape-to-close functionality in `ember-promise-modals` was deferred to `focus-trap`. For some of our use-cases that wasn't ideal because there was nowhere to hook in if we wanted to abort modal closing for any reason (eg, to show an unsaved changes confirmation)

- bumped the custom fork version of `ember-promise-modals` to allow all focus-trap close-inducing behaviour to be disabled
  - also adds a `beforeClose()` option when opening modals for future use
- changed modals service options that are passed through to `focus-trap` so that all close-inducing behaviour is disabled
- when the first modal is opened add event handlers for clicks and <kbd>Escape</kbd> key presses that should close modals and manually call `.close()` on the top-most modal in the stack
- remove event handlers when the last modal is removed
2021-09-16 20:26:57 +01:00
Rishabh
3bd4336bc4 Added membersActivity labs feature
refs https://github.com/TryGhost/Team/issues/1060

- adds `feature` service flag and toggle to labs section for new `membersActivity` feature
2021-09-16 11:50:25 +05:30
Renovate Bot
6fddd36aff Update dependency chai-dom to v1.10.0 2021-09-14 19:20:57 +00:00
Kevin Ansfield
6f4e7c3872 Added blank "Customize" modal to new Design screen
refs https://github.com/TryGhost/Team/issues/1045

- added new `settings.design.customize` route
- used the route's `activate` and `deactivate` hooks to trigger and close the customize modal
- added `modals/design/customize` component that uses the existing branding modal design without it's contents as a base
  - has `{{will-destroy}}` hook that transitions back to the settings screen so the route will update when the modal gets closed
2021-09-14 19:32:07 +01:00
Kevin Ansfield
667506b166 Set up Design settings screen
refs https://github.com/TryGhost/Team/issues/1045

- added blank `/settings/design` route and associated screen
  - redirects to settings index if associated labs flag is not enabled
- when custom theme settings labs flag is enabled, replaced Branding and Theme links with single Design link
2021-09-14 18:48:26 +01:00
Kevin Ansfield
e795692e6b Added customThemeSettings labs feature
refs https://github.com/TryGhost/Team/issues/1045

- added `feature` service flag and toggle to labs page
2021-09-14 18:35:52 +01:00
Daniel Lockyer
d3bb001129 Merged v4.14.0 into main
v4.14.0
2021-09-14 11:42:00 +01:00
Daniel Lockyer
507c2a8b69 v4.14.0 2021-09-14 11:38:17 +01:00
Kevin Ansfield
b540d9f066 Removed labs dashboard and feature flag
no issue

The updated dashboard is shelved for now whilst the underlying analytics architecture is improved.
2021-09-14 10:12:16 +01:00
Peter Zimon
a61fac3e76 Updated Tiers help links 2021-09-14 09:31:08 +01:00
Rishabh
3cec49e689 Fixed email recipient list in publish menu not showing selected tiers
refs https://github.com/TryGhost/Team/issues/1032#issuecomment-918554923

- the email recipient menu in publish menu was not correctly translating the tiers in specific tier selection when matching post level access
- in case of specific tier, visibility type on post is `filter` and the visibility filter data is in a separate field on post - `visibilityFilter`, so it got missed
2021-09-14 13:54:22 +05:30
Sanne de Vries
06a8ca2b83 Added bold line of text on membership settings page
Refs https://github.com/TryGhost/Team/issues/1036
2021-09-14 09:11:46 +01:00
Rishabh
8e84b8e5ef Fixed email recipient list in publish menu not showing selected tiers
refs https://github.com/TryGhost/Team/issues/1032#issuecomment-918554923

- the email recipient menu in publish menu was not correctly translating the tiers in specific tier selection when matching post level access
- in case of specific tier, visibility type on post is `filter` and the visibility filter data is in a separate field on post - `visibilityFilter`, so it got missed
2021-09-14 13:09:22 +05:30
renovate[bot]
8301e12ac1 Update dependency @tryghost/color-utils to v0.1.2 (#2077)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 13:58:42 +01:00
Kevin Ansfield
4e56d98bf7 Added "Enter" key handling to refactored delete-post modal
refs https://github.com/TryGhost/Team/issues/559

- there's no base modal any more so each modal is in control of it's own keyboard handling
2021-09-13 13:58:13 +01:00
Peter Zimon
df56a25d6d Updated Tiers help links 2021-09-13 14:26:00 +02:00
Kevin Ansfield
b2bbaf153d Converted post-preview modal to EPM based modal
refs https://github.com/TryGhost/Team/issues/559

- moved the modal component class, template, and sub-components into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to full glimmer syntax
2021-09-13 13:01:12 +01:00
Kevin Ansfield
a122711043 Converted delete-post modal to EPM based modal
refs https://github.com/TryGhost/Team/issues/559

- moved the modal component class and template into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to glimmer syntax
- moved route transition behaviour directly into the class to avoid weird route-action indirection
2021-09-13 13:01:12 +01:00
Kevin Ansfield
5ce67c7892 Initial ember-promise-modals implementation
refs https://github.com/TryGhost/Team/issues/559

We want to get rid of our existing modals implementation because it doesn't play well with Glimmer compoments and the animation library it uses is now unmaintained and blocking our Ember.js upgrades.

- installed addon using customised fork
  - fork allows passthrough of `allowOutsideClick` to `focus-trap` so we can allow clicks on dropdowns and other wormholed content inside of a modal
- extended the `modals` service locally so we can customise click-outside-to-close behaviour and tie in with our `dropdowns` service
- set up styles in `modals-new.css`, mostly copied from `modals.css` with a few specific overrides
  - once all modals are converted we can drop the old `modals.css` and rename `modals-new.css`
2021-09-13 13:01:12 +01:00
Rishabh
ca6de51cc5 Cleaned duplicate member settings form component
closes https://github.com/TryGhost/Team/issues/1039

- we had duplicate components for members setting form, `gh-members-settings-form` and `gh-members-settings-form-cp`, with the `-cp` version added as part of original tiers changes
- since are only using the "-cp" version now, the old form is now removed and cp version renamed to the original naming
2021-09-13 16:40:45 +05:30
Rishabh
be0942d8e2 Fixed default access setting showing incorrect tiers selection
closes https://github.com/TryGhost/Team/issues/1032

- fixes the selected default access value for specific tier not shown correctly on admin
- the value was correctly saved and fetched, but the value shown got overridden by default product selection and only the first product was shown as selected value
2021-09-13 15:53:06 +05:30
Rishabh
1461280167 Fixed default access setting showing incorrect tiers selection
closes https://github.com/TryGhost/Team/issues/1032

- fixes the selected default access value for specific tier not shown correctly on admin
- the value was correctly saved and fetched, but the value shown got overridden by default product selection and only the first product was shown as selected value
2021-09-13 15:48:22 +05:30
renovate[bot]
0d89d42ad2 Update dependency @tryghost/kg-parser-plugins to v2.0.5 (#2091)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 10:34:51 +01:00
renovate[bot]
092ff89fe0 Update dependency @tryghost/kg-clean-basic-html to v2.0.5 (#2090)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 10:26:04 +01:00
renovate[bot]
e5f6e63309 Update dependency ember-simple-auth to v4 (#2085)
- Update dependency ember-simple-auth to v4
- Removed `setup-session-service` initializer as it's no longer needed/present in v4

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2021-09-13 10:25:53 +01:00
renovate[bot]
0613f5eacb Update dependency markdown-it to v12.2.0 (#2052)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 09:27:43 +01:00
renovate[bot]
bc720b947d Update dependency ember-moment to v8.0.2 (#2083)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 09:27:10 +01:00
renovate[bot]
9a394c04b0 Update dependency ember-resolver to v8.0.3 (#2087)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 09:26:39 +01:00
Sanne de Vries
c67b8f6d76 Added bold line of text on membership settings page
Refs https://github.com/TryGhost/Team/issues/1036
2021-09-11 09:43:32 +02:00
Peter Zimon
9b4cd259b2 Updated currency UI in tier preview 2021-09-10 18:19:54 +01:00
Fabien 'egg' O'Carroll
6c207f5e72 Showed created at dates for complimentary subscriptions (#2089)
refs https://github.com/TryGhost/Team/issues/873

When we updated the UI to handle the default subscriptions for
Complimentary subscriptions, we didn't update it to use any of the data.

This updates the UI to share as much as possible for the display of
subscriptions information, and only diverges for the menus which have
different actions based on complimentary or not.

This should ensure that we keep the UI in sync for both types of Member.

* Hid Complimentary subscription CTA for members with one.
2021-09-10 19:03:42 +02:00
Aileen Nowak
101b0061b5 Avoided reloading billing iframe
no issue

- Clicking on the Ghost(Pro) item in the navigation would always reload the billing management app and enforcing to fetch all data again, even tho it has been fetched and cached before
- This commit removed loc that replaces the iframe content every time we click on the button
- Renamed `setBillingWindowOpen` to `toggleProWindow` as it's more accurate in its description
- Removed `closeBillingWindow` as it's unused throughout the app
2021-09-10 15:26:42 +01:00
Peter Zimon
6b878c6724 Added percentage to email rate in members filter 2021-09-10 15:32:03 +02:00