Commit Graph

3657 Commits

Author SHA1 Message Date
Naz
93893fe7f1 Fixed 'Publish & Send' CTA in page publish menu
https://linear.app/tryghost/issue/CORE-100/publishandsend-text-visible-on-page-publish-menu

- Page publish menu should not have any knowledge about "email-only" posts, the text in the publish menu should never show any variation of the "send" option.
2021-10-12 12:32:39 +02:00
Kevin Ansfield
924da56c94 Moved theme table to change-theme screen and dropped advanced screen
refs https://github.com/TryGhost/Team/issues/1130

- match latest design where the theme table is under an "advanced" toggle on the change-theme screen rather than a completely separate screen
2021-10-12 10:18:55 +01:00
Kevin Ansfield
4fa13bfa9f Fixed capitalization of API and CTA in theme setting labels
no issue

- added `{{humanize-setting-key}}` helper that uses the base `humanize` output but then forces capitalization for known acronyms
- updated `<CustomThemeSettings::Select>` to use the new helper
2021-10-12 10:11:24 +01:00
Kevin Ansfield
d3539655a0 Fixed empty setting groups showing in nav bar
refs bc5be1a808

- after removing duplication for groups in the template we were showing empty groups because the group construction wasn't considering there may be no settings for a group
2021-10-12 09:13:14 +01:00
Kevin Ansfield
fee190eb08 Removed unneeded customThemes limit check
no issue

- the first check when uploading a theme is the same as the second but without returning a specific error message so it shouldn't be necessary
2021-10-12 08:27:25 +01:00
Kevin Ansfield
bc5be1a808 Removed template duplication for custom theme setting groups
no issue

- added `settingGroups` array to the nav menu so that it can be looped over rather than having the same template duplicated for hard coded settings arrays
2021-10-12 07:54:34 +01:00
Kevin Ansfield
ddac463514 Fixed custom theme settings not showing in groups
no issue

- custom theme model was missing the `group` attr so the nav menu couldn't see it to assign to groups
- changed homepage group from `home` to `homepage` to match gscan
- added fallback to showing in the "Site-wide" group if an unknown group value is seen
2021-10-12 07:36:03 +01:00
Kevin Ansfield
b2177e636e Fixed enter key not triggering confirm action in delete theme modal
no issue

- added missing key handler
2021-10-12 07:26:18 +01:00
Kevin Ansfield
1d0cd80158 Added basic reset to design preview on nav bar interaction
refs https://github.com/TryGhost/Team/issues/1130

- when opening/closing sections or interacting with the general design or custom theme settings we want to switch back to showing the preview so the sidebar acts more like typical navigation and so form changes show their effect
2021-10-11 21:09:42 +01:00
Kevin Ansfield
870cf94b7a Fixed linting error
refs 13f9cb85fa

- `[i]` was left over after switching from `for` to `forEach()`
2021-10-11 19:36:58 +01:00
Kevin Ansfield
13f9cb85fa Refactored theme upload process and linked from design screens
refs https://github.com/TryGhost/Team/issues/1130

- copied theme upload modal to new modals system and refactored for Octane syntax
  -  updated to use `themeManagement` service rather than passed in actions so the modal-based process can be opened from any screen
  - added default `beforeClose()` for the modal to the modals service so it won't close if an upload is in-progress (defaults were moved directly into the class so it had access to services)
- added `themeManagement.upload` action for triggering the upload modal and providing a central place for limit checks
- added upload-triggering buttons to change-theme and advanced design screens
2021-10-11 19:30:58 +01:00
Kevin Ansfield
3345920f29 Removed unused beforeModalClose method on design route
refs 595018098d

- method removal was missed when switching from modal to standard route
2021-10-11 17:43:59 +01:00
Kevin Ansfield
42e493bb81 Initial pass at new change theme screen
refs https://github.com/TryGhost/Team/issues/1130

- added link to design sidebar
- dropped change-theme modal and associated route behaviour
- copied basic themes marketplace list into the change-theme controller/template
2021-10-11 17:14:18 +01:00
Kevin Ansfield
595018098d Switched design screen from modals to standard routes
refs https://github.com/TryGhost/Team/issues/1130

- added `ui.contextualNavMenu` property that when set will switch the main nav menu between components, if it's not set then it will show the default "main" menu component
- added `design` menu sub-component of `gh-nav-menu` ready for use via `contextualNavMenu`
  - moved sidebar contents from the design modal into this component
- updated design route to set/reset `ui.contextualNavMenu` to `design` on entering/leaving the route
  - all other design routes are sub-routes so this works across all other design screens
- moved base design modal preview into the `settings/design/index` controller/template
  - using index means that it's the default screen for `/settings/design` but will be automatically replaced by any other `design.x` routes
- moved `design/advanced` modal content into the `settings.design.advanced` controller/template and removed the modal handling from the route
2021-10-11 15:24:46 +01:00
Kevin Ansfield
7eda410dc3 Fixed html attributes not showing in design settings preview
no issue

- by using `innerHTML` we were missing the lang and class attributes on the `<html>` element that are added by themes, breaking things like dark mode
- switching to `outerHTML` includes the `<html>` element and is handled automatically by iframes when writing to the `contentWindow`
2021-10-11 15:03:49 +01:00
Sanne de Vries
de5674ebd4 Updated design page
Refs https://github.com/TryGhost/Team/issues/1130
2021-10-11 15:13:16 +02:00
Kevin Ansfield
717eb762f6 🐛 Fixed inability to re-schedule a scheduled post
closes https://github.com/TryGhost/Team/issues/1112

- when the scheduled post publish menu component was converted to a glimmer component one of the properties in a conditional was missed when changing from `this.x` to `this.args.x` meaning that every time the menu was clicked the published at time was reset as if the save type was being changed
2021-10-11 10:30:12 +01:00
Rishabh
0459a1ca23 Removed rogue unsaved change model for new offers
refs https://github.com/TryGhost/Team/issues/1126

- adds default properties of offer to a separate object to avoid unnecessary unsaved change modal on new offer and back
2021-10-11 13:33:30 +05:30
Rishabh
bfcd0b9ebd Removed unused interval field on offer modal
no refs
2021-10-11 13:03:38 +05:30
Rishabh
dd0ecf75b9 Added basic acceptance tests for offers
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085
2021-10-08 19:45:48 +05:30
Rishabh
756bd2bdb5 Fixed cadence selection for offers
no refs

- fixes double selection needed for cadence on offers detail screen
2021-10-08 19:24:28 +05:30
Rishabh
7ef2b08883 Fixed offer percentage amount not getting set
no refs
2021-10-08 19:15:56 +05:30
Rishabh
4bbbea29ed Refined fixed discount type amount UI
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085

- uses price helper to show Stripe amount instead of manual calculation
2021-10-08 18:50:18 +05:30
Peter Zimon
fa89f42e70 Fixed Offers menu title in main nav 2021-10-08 13:15:49 +02:00
Peter Zimon
cbfe554738 Fixed disabled input field contrast 2021-10-08 13:02:24 +02:00
Peter Zimon
7ac85a3c02 Formatting fixes on offers list 2021-10-08 12:55:25 +02:00
Peter Zimon
600edc0d60 Updated percentage/amount selector for offers 2021-10-08 12:48:41 +02:00
Rishabh
e82bd1579a Removed nested offers code under memberships
no refs

- offers has moved out to its own page in Admin, the old route and controller for wiring of offers under membership screen is no longer needed
2021-10-08 09:30:41 +05:30
Rishabh
267889993f Updated shareable offer link UI on list screen
refs https://github.com/TryGhost/Team/issues/1084

- updates shareable offer link UI to to open directly instead of route
- calculates offer url from code and updates in link modal
- wires copy button on link modal
- removes route based link code for modal
2021-10-08 09:28:17 +05:30
Rishabh
bbaad743a3 Refined offer detail screen
refs https://github.com/TryGhost/Team/issues/1085

- adds unsaved changes modal for navigating away
- adds link url for offer redemption
- updated amount calculation for fixed amount offers (1000 for 10 USD)
- disabled discount info section for existing offers
2021-10-08 01:43:59 +05:30
Rishabh
91292469b3 Added default values for new offers
refs https://github.com/TryGhost/Team/issues/1085

- adds default value for type and duration of offer for use in new offers
2021-10-08 01:41:30 +05:30
Rishabh
43f5d7c621 Refined offers list screen
refs https://github.com/TryGhost/Team/issues/1084

- updates offer list to show fixed amount discounts
- cleans up offer list usage
2021-10-08 01:39:42 +05:30
Naz
2089c97142 🐛 Fixed showing "reschedule" in PSM after the post is sent
https://github.com/TryGhost/Team/issues/947

- After the post is sent out there it's similar to being "published" in terms of pubslish/scheduled date
2021-10-07 15:18:51 +02:00
Peter Zimon
fd5e009d29 Fixed Tags empty screen button bug 2021-10-07 12:25:37 +02:00
Peter Zimon
1861c8b4eb Copy update for offer details 2021-10-07 12:17:50 +02:00
Peter Zimon
b5d30ba92e Temporarily removed Archive option for offers 2021-10-07 12:16:30 +02:00
Naz
4f3e340c03 Promoted email-only feature to general availability
refs https://github.com/TryGhost/Team/issues/1125

-- Email-only is not considered a general availability feature and can be used without special flags.
- It allows to publish a new post type "email only" that only goes out as an email newletter and is available through an undescoverable URL (does not appear anywhere publicly similarly to preview posts) on the site.
- The new "send" option in the post publishing menu allows to send this new type of post.
2021-10-07 12:07:48 +02:00
Peter Zimon
bbf1e79fbb Fixed yearly tiers URL in Portal settings
- added '/' to yearly tiers in Portal settings / Links
2021-10-07 11:49:25 +02:00
Peter Zimon
e244304538 Offer list and detail improvements
- added icon to offer value
- added link popup to list
- renamed "Delete offer" to "Archive offer"
2021-10-07 11:21:53 +02:00
Peter Zimon
b942029cc9 Added dynamic currency to offers form 2021-10-06 17:49:45 +02:00
Peter Zimon
7d61e7fda1 Added price to offers products 2021-10-06 17:11:35 +02:00
Rishabh
31e4b77525 Added initial wiring for offer screens
refs https://github.com/TryGhost/Team/issues/1084
refs https://github.com/TryGhost/Team/issues/1085

- adds model/validator/config and router for offers
- updates template for offer list and detail with dynamic values
- updated route handling for offer list and creation
- wires offer data from API to list and detail pages
2021-10-06 20:01:25 +05:30
Kevin Ansfield
12d85966c2 Fixed positioning of user menu
no issue

- CSS that was used to fix positioning of the dropdown menus on the labs theme list was too liberal. Fixed by adding a specific class for the theme list dropdowns
2021-10-06 15:29:42 +01:00
Kevin Ansfield
145211d875 Updated route-modal pattern for offer route
no issue

- match the updated pattern used in the `design` route
2021-10-06 09:31:42 +01:00
Kevin Ansfield
ef97be3ffb Fixed custom theme settings disappearing after save
refs https://github.com/TryGhost/Team/issues/1111

- on saving, `customThemeSettings.settings` was set to the `hasMany` reference on the `customThemeSettingsList` model instance but the model is then immediately unloaded and the reference goes with it
- switched to using `.toArray()` on the hasMany so that we get a stable reference to the `customThemeSetting` model instances
2021-10-05 21:45:11 +01:00
Kevin Ansfield
221db9f11e Fixed design preview and settings not updating when changing theme
refs https://github.com/TryGhost/Team/issues/1111

We now have a situation where we have modals on modals and we've lost the straightforward built-in "Data down, actions up" communication methods that we'd have workaround across nested routes/controllers. The upshot of that is we didn't have a way to trigger a refresh of the preview when a new theme was activated.

- moved the task responsible for fetching preview html from the design modal onto the `theme-management` service and adjusted it to set a tracked `previewHtml` property rather than updating an iframe directly
- added a `<GhHtmlIframe>` component that renders a basic iframe element and updates it's contents each time the `@html` argument changes
- updated design modal preview to use the new iframe component
2021-10-05 21:32:42 +01:00
Kevin Ansfield
640f028ae9 Fixed theme errors modal positioning
refs https://github.com/TryGhost/Team/issues/1111

- missed the modal classes on the newly added modal
2021-10-05 20:49:15 +01:00
Kevin Ansfield
715ee08100 Added advanced theme settings modal
refs https://github.com/TryGhost/Team/issues/1111

Extracted functionality for listing, downloading, activating, and deleting from the theme controller/template into separate components and services so that they are more composable/reusable in different situations.

- moved theme activation to a new `theme-management` service that uses the `modals` service to open the theme warnings modal or limits upgrade modal as required
  - the activate process is a task so that consumers can store a reference to the task instance and cancel it to close any related warning/limit modals (eg, when navigating away from the route or closing the modal that kicked off the process)
- created new-pattern modals for custom theme limit upgrade, theme errors, and delete confirmation so that we can treat them as promises and close where needed from parent
- duplicated theme table component as `<GhThemeTableLabs>` with an actions redesign and a refactor to handle download, activation, and deletion itself making use of the new theme-management service and modals
- fixed some oddities with design modal's transition/modal close handling by simplifying the async behaviour and being more explicit
- added advanced design modal that contains the new theme table component and linked to it from footer of design modal's sidebar
2021-10-05 20:44:27 +01:00
Kevin Ansfield
6155645a45 🐛 Fixed copy-to-clipboard buttons in Chrome + Firefox
no issue

- the method we used for copying text to the clipboard for older browsers has broken on some newer browsers
- the more modern `navigator.clipboard.writeText` API is now universally supported by our target browsers so we're able to switch to that instead which is working across the board
2021-10-05 15:32:23 +01:00
Kevin Ansfield
a15cc41f03 Removed unused blogUrl CP from theme controller
no issue

- general cleanup for easier functionality extraction to re-usable components
2021-10-05 14:37:51 +01:00
Kevin Ansfield
fe48f7ed80 Added utils service with downloadFile() method
no issue

- pattern of downloading a file by creating an iframe and setting the `src` attribute was repeated throughout the codebase and was using a mix of native and jQuery patterns
- added a `utils` service for housing one-off utility methods like this to avoid repetition and mixed patterns becoming more widespread (we want to get rid of jQuery usage)
2021-10-05 14:21:19 +01:00
Peter Zimon
611fbf5926 Added static URL to offers detail screen 2021-10-05 15:03:39 +02:00
Peter Zimon
24d28f3d79 Added static duration to Offers edit 2021-10-05 14:34:19 +02:00
Naz
349230f2f5 Removed commented post.save call in puglishmenu
refs https://linear.app/tryghost/issue/CORE-71/email-only-posts-hand-off

- The piece of code was commented out with an intention of keeping an existing pattern of only calling post's save's when edits are done in the editor or PSM. The changes in the publishmenu should not effect the model and have a need to save it
- The side-effect that still needs to be sorted is the change to the 'saveType' is effecting a model and causes a confirmation modal when leaving the post screen
2021-10-05 13:47:15 +02:00
Kevin Ansfield
2ca57e7624 Removed unused confirm-leave handling from theme settings screen
no issue

- appears to be left-over from copy/paste of an earlier screen re-structure
- cleaning up for easier extraction of functionality to new screens / modals
2021-10-05 11:37:17 +01:00
Kevin Ansfield
bf3a5198e4 Fixed missing return when opening modals
refs 37f721d76a

- change was missed from the previous commit 🤦🏻‍♂️ without it we don't get a modal reference back for managing confirmation and closing behaviour
2021-10-05 11:30:42 +01:00
Kevin Ansfield
37f721d76a Added centralized object for defining modal classNames
refs https://github.com/TryGhost/Team/issues/559

When modals are re-used across the app it's annoying to have to remember the class names that it uses in every location it's used.

- added a `DEFAULT_MODAL_OPTIONS` object to the modals service that's keyed on the modal to be opened and contains any options that are repeated across every instance
- overrode the `modals.open()` method to merge in the default options before calling `super()`
- updated invocation points of shared modals to remove duplicated class name options
2021-10-05 11:19:52 +01:00
Kevin Ansfield
f0f0498360 Fixed incorrect variable name for membership offer modal
no issue

- opened modal was assigned to `this.customizeModal` but the rest of the code expected `this.offerModal` so correct closing behaviour wasn't gauranteed
2021-10-05 11:09:40 +01:00
Naz
0af2c464b0 Fixed incorrect status showing up when sent post is updated
refs https://linear.app/tryghost/issue/CORE-79/editing-saving-a-post-that-has-already-been-sent-flashes-sent-as-the

- The mapping was wong in a previous version - when the status changes from 'sent' to 'sent' the notification box should show 'Updated' instead of 'sent', doh!
2021-10-05 23:01:52 +13:00
Kevin Ansfield
745784e216 Removed secondary accent color picker
refs https://github.com/TryGhost/Team/issues/1102

- we're not sure this should be a built-in default setting at the moment so dropping the (non-working) color picker from the template for now
- same feature can be implemented by themes via custom settings if they want to use a secondary color
2021-10-04 18:20:42 +01:00
Kevin Ansfield
cb24eb3827 Fixed background flicker when opening design modal
refs https://github.com/TryGhost/Team/issues/1111

- added override of the `ember-promise-modals` container component so that it doesn't render the background element when `omitBackground` is passed as an option when opening the modal
- fixes the flicker by not having a dark background transition in whilst the white overlay modal is also transitioning in from transparent->opaque
2021-10-04 18:15:11 +01:00
Kevin Ansfield
63b1e1d385 Dropped intermediate design screen and moved to full-overlay modal
refs https://github.com/TryGhost/Team/issues/1111
refs https://github.com/TryGhost/Team/issues/1103

- moved customize modal from a link on the design screen to the main design screen
- changed modal design to be a full-screen overlay with side bar that emulates standard Admin design
- added toggled groups of settings in sidebar
  - added `{{set-has}}` helper for use in conditionals matching when a Set contains an object
  - added grouping of theme settings
- dropped unfinished advanced/change theme modals
2021-10-04 16:34:28 +01:00
Peter Zimon
54447eae4b Added price to offers list 2021-10-04 17:07:13 +02:00
Peter Zimon
84c9123bfd Added mock content for offers list help 2021-10-04 16:17:32 +02:00
Peter Zimon
713fa7725a Added static offer help links 2021-10-04 15:42:05 +02:00
Peter Zimon
5343b9f6b5 Added unit to offer value 2021-10-04 15:21:28 +02:00
Peter Zimon
96ec92a47b Update offer details structure
- Added static UI to offer details page
- Deleted offer modal
2021-10-04 15:00:41 +02:00
Peter Zimon
6e6c89ba00 Updated offers list heading 2021-10-04 13:58:58 +02:00
Kevin Ansfield
5966342223 Converted <GhNavMenu> to glimmer component
no issue

- moves tag name and class into the component template for better visibility
- removed unused `isSettingsRoute` computed property
2021-10-04 12:57:30 +01:00
Peter Zimon
3013263498 Added static UI for offers list
- Added list and basic empty screen for offers list
- Removed offers list from Membership settings
2021-10-04 13:55:17 +02:00
Peter Zimon
390b2b136f Added base files for Offers structure
- Moving Offers outside settings to main menu
- Moving Integrations and Staff to settings
2021-10-04 13:01:12 +02:00
Peter Zimon
2eb0e465c2 Adjusted settings grid 2021-10-04 12:03:41 +02:00
Rishabh
bb79ff7a9a Fixed unintended save for published post on tier change
no refs

- selecting a tier in post access for a published post was also triggering a save which is not intended
- save should happen only for a draft post when changing tier for post access
2021-10-04 13:02:45 +05:30
Rishabh
bee3dd8bcd Fixed bulk delete members list test
no refs

- removes temporary comment on bulk delete member test as its updated to work with filtering in GA
2021-10-01 19:27:31 +05:30
Fabien O'Carroll
592e3df794 Added Members Filtering feature
no-issue

This adds the ability to apply complex filters to members, as well as to
perform bulk actions on the filtered set, including unsubscribing,
adding & removing labels.
2021-10-01 14:16:28 +02:00
Fabien O'Carroll
a5f158c061 Updated usage of the members bulk action endpoint
refs https://github.com/TryGhost/Team/issues/1077

The bulk action endpoint has updated the request body format and so this
must be updated to continue to work with it.
2021-10-01 14:14:38 +02:00
Kevin Ansfield
9dcd7e499a Fixed unsaved general settings being lost when switching to theme tab
no issue

- copy pasta for the general settings form meant that unsaved settings changes were rolled back when the form was destroyed meaning settings were lost when switching across to the theme settings tab
- rollback is handled higher up at the custom design modal so we don't need to handle it in the form
2021-09-30 16:47:08 +01:00
Kevin Ansfield
aa5b0705e0 Fixed "(default)" not showing next to default custom theme select options
no issue

- default option conditional was missing the `@` on the passed in argument so was always evaluating to `false`
2021-09-30 16:31:44 +01:00
Kevin Ansfield
179855ae38 Fixed unexpected unsaved changes modal when saving custom theme settings
no issue

- `customThemeSettings.settings` was not being updated with the latest models after saving so `customThemeSettings.isDirty` was still reporting `true` even though the save had completed
2021-09-30 16:29:41 +01:00
Kevin Ansfield
e8933ff7a8 Wired description field changes in design settings to preview
closes https://github.com/TryGhost/Team/issues/1101

- added `d` param with the description value to the preview header
- updated description input to trigger preview update on blur
2021-09-30 16:27:57 +01:00
Kevin Ansfield
6993e11286 Fixed close button in confirm modal causing navigation
no issue

- using an `<a>` instead of a `<button>` meant that the anchor link's default behaviour was being triggered when clicked leading to the browser navigating back to the dashboard
2021-09-30 16:26:20 +01:00
Kevin Ansfield
223e5c71cf Fixed error when saving custom design modal
no issue

- `Promise.all()` requires a promise so it was erroring about uniterable symbols
2021-09-30 14:53:39 +01:00
Aileen Nowak
a83bd7a749 Fixed typo w/ removing subscription overdue notification
no issue
2021-09-30 14:16:05 +01:00
Aileen Nowak
dcabd345bc Closed subscription notification when not applicable
no issue
2021-09-30 14:11:44 +01:00
Aileen Nowak
3ec373e33f Show notifications for overdue subscriptions and exceeded limits
no issue

- Overdue subscriptions: when a subscription is in overdue state, we'd like to inform the customers so that the owner is aware and can take action
- Exceeded limits:
    - Show a warning when the members limit is exceeded so users are aware before trying to publish a post and hitting the limit
    - Allow to redirect directly to a child route in the Ghost(Pro) app, so plan updates get easier
2021-09-30 14:00:32 +01:00
Kevin Ansfield
dab672c7b8 Wired up custom theme settings form to preview updates
refs https://github.com/TryGhost/Team/issues/1097

- added `customThemeSettings.keyValueObject` which returns a plain object with setting values assign to the setting keys on the object
- updated customize modal's preview data generation to use `customThemeSettings.keyValueObject` to assign a JSON-stringified version to the `custom` param on the `x-ghost-preview` header
- updated theme settings `<Select>` component to call the passed through `updatePreview()` action when the value changes
2021-09-30 13:30:06 +01:00
Rishabh
4b8b635306 Refined offers modal to include tier-cadence dropdown
refs https://github.com/TryGhost/Team/issues/1085

- maps the tier-cadence dropdown to correct tier list for site
- adds dynamic toggle between type of discounts in UI
2021-09-30 14:23:32 +05:30
Rishabh
9a07c59538 🐛 Fixed incorrect unsaved changes popup on memberships screen
closes https://github.com/TryGhost/Team/issues/1100

- fixes unsaved changes popup which was triggered due to incorrect price comparison on membership screen
- issue only happened if the stripe price entered translated to a decimal value as the price change check was parsing it as integer
2021-09-30 14:21:55 +05:30
Kevin Ansfield
d10e102de4 Wired up saving of custom theme settings
refs https://github.com/TryGhost/Team/issues/1070

- split select form component into it's own component so it's cleaner when we get to additional setting types
  - added change handler that updates the setting record's value when a new option is selected
- added `.isDirty` to the custom-theme-settings service so we can warn of unsaved changes and revert any changed values when needed
- added save of custom theme settings to the customize design modal's save routine
- added missing `notifications` service import to customize design controller
2021-09-28 16:50:28 +01:00
Kevin Ansfield
1e8e0485e3 Added customThemeSettings service with all-records-in-one save request
refs https://github.com/TryGhost/Team/issues/1070

- adds a `customThemeSettings` service that handles overall setting loading and saving to avoid components having to know any of the intricacies of the model setup
- adds `custom-theme-setting-list` model so that we can save multiple setting records as embedded relations
  - custom adapter ensures requests go to the `/custom_theme_settings` base route as a `PUT` request
  - custom serializer drops the default `models: []` wrapper in the save request data so the format matches the `PUT /settings` endpoint, then converts the response to look like a `custom-theme-setting-list` response
2021-09-28 16:50:28 +01:00
Sanne de Vries
57b1a344f0 Updated publish-menu Sent status in editor 2021-09-28 15:49:50 +02:00
Sanne de Vries
62bae57eac Fixed email-only button CTA in email send confirmation modal 2021-09-28 15:29:29 +02:00
Peter Zimon
d0457c0c32 Fixed tags list link color 2021-09-27 17:15:59 +02:00
Kevin Ansfield
c4d6950ba9 Wired up custom theme settings display (#2096)
refs https://github.com/TryGhost/Team/issues/1070
reqs https://github.com/TryGhost/Ghost/pull/13362

- added custom theme setting model
- added fetch of custom theme settings when customize modal is opened
- used loaded theme settings to populate settings list in theme settings tab
- hid the general/theme toggle when no theme settings are present
2021-09-27 11:32:48 +01:00
Peter Zimon
f790e7df52 Added placeholders to Offers static modal 2021-09-27 12:02:29 +02:00
Kevin Ansfield
23d7aeb764 Fixed API path generation for multi-segmented model names
no issue

- if a model name has multiple segments, eg `custom-setting` then the URL generated was `/customSettings/` rather than `/custom_settings/`
2021-09-23 23:52:50 +01:00
Kevin Ansfield
7430c28001 Fixed error when opening design settings screen
no issue

- `{{did-insert}}` was left over from copy/paste but the referenced function wasn't copied so was erroring
2021-09-23 22:53:09 +01:00
Peter Zimon
7783452aeb Added static Offer form inputs 2021-09-23 13:12:01 +02:00
Peter Zimon
dce39c8a91 Minor style change in Offers 2021-09-23 12:33:19 +02:00
Sanne de Vries
182f5c91b6 Updated design settings page
Refs https://github.com/TryGhost/Team/issues/1045
2021-09-23 10:16:28 +02:00
Peter Zimon
6ee2e48c92 Added static list of offers 2021-09-22 17:23:26 +02:00
Peter Zimon
d8c42876a3 Added base files for Offer modal 2021-09-22 16:10:38 +02:00
Peter Zimon
01524cb735 Added offers Alpha flag 2021-09-22 13:20:15 +02:00
Peter Zimon
4dcc594193 Added static offers CTA to membership settings 2021-09-22 13:10:59 +02:00
Kevin Ansfield
ba030ec2ae Fixed preview flicker when moving between general and theme settings
refs https://github.com/TryGhost/Team/issues/1045

- update of the preview was being triggered by the general settings tab rendering (copy/paste from branding setup) meaning the iframe reloaded when switching between general/theme tabs
- moved the preview update task into the `customize` modal so that it can be called by the general/theme settings components as needed
- moved initial preview rendering to the iframe registration method
2021-09-21 16:15:23 +01:00
Sanne de Vries
3e9a44d31f Added select component to custom theme settings
Refs https://github.com/TryGhost/Team/issues/1070
2021-09-21 16:58:08 +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
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
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
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
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
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
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
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]
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
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
Peter Zimon
4bf2702570 Copy refinement for tiers with no benefits 2021-09-10 15:06:42 +02:00
Peter Zimon
4123e9ea71 Removed title from member list row 2021-09-10 15:04:57 +02:00
Peter Zimon
c0a5d25c46 Members filter UI refinements
- changed copy for label filter relation
- fixed darkmode bug
- unified label dropdown tag colors
2021-09-10 15:01:59 +02:00
Peter Zimon
50b102ef33 Removed label add option from member filters 2021-09-10 14:37:00 +02:00
Peter Zimon
90f72d7397 Fixed edit label position in members details screen 2021-09-10 13:58:09 +02:00
Peter Zimon
bc18590d78 Updated responsive sizes UI of members filter UI 2021-09-10 13:58:09 +02:00
Peter Zimon
588e77f196 Members filter basic dropdown (#2088)
* Applying basic dropdown on members filters

* Fixed remove-filter button closing filter dropdown
2021-09-10 13:33:39 +02:00
Peter Zimon
6c35bd3d59 Unified admin and owner rights 2021-09-10 12:23:23 +02:00
Kevin Ansfield
8b5c18d6e5 Hid email specific cards from card menus when editing pages
no issue

Pages can not be sent by email so by hiding email-specific cards when editing pages we can reduce confusion and clutter.

- added a `@postType` argument to editor components that can be passed through to sub components
- set `@postType` to `post.displayName` which is either `post` or `page`
- updated `{{card-is-available}}` helper to compare a `postType` property on card menu items to the passed in `postType`
2021-09-10 09:24:38 +01:00
Rishabh
e5e68ff55b Fixed label bulk action error on filtering UI
no refs

- when a site has no labels, the bulk action on labels - add/remove - was throwing an error
- fixes the bug and adds disabled state for add/remove label bulk action UI
2021-09-10 10:19:25 +05:30
Rishabh
852afa302f Refined filter UI reset for email filters
no refs

- resets email filters value on changing filter type correctly
2021-09-10 09:28:07 +05:30
Rishabh
d3ab0a27eb Refined members list loading with filtering feature
no refs

- resets filter columns on list when query params are removed from the url via sidebar click transition
- reloads the updated list on new bulk actions on the filtered list
2021-09-10 00:13:31 +05:30
Rishabh
b678d345e3 Fixed members list reload on changing type of filter
refs https://github.com/TryGhost/Team/issues/963

- when changing the filter block to a filter type which has default value, previously the members list was not reloaded
- updates members list on switching filter types with default value
2021-09-09 22:43:11 +05:30
Rishabh
f5bdc6c407 Removed tiers from alpha features section
closes https://github.com/TryGhost/Team/issues/1026

Tiers are now moved up to beta features in the labs section on Admin via early-access opt-in flow, so there is no need for it anymore in alpha section.
2021-09-09 22:18:22 +05:30
Kevin Ansfield
b6f973e5a6 Commented out unexpected save each time publish menu is closed
refs 107ed0e1f3

- save shouldn't be happening here as it means unexpected changes could be saved to published posts without the user's consent
- save is related to a labs feature so it should have been behind a labs flag
2021-09-09 15:35:09 +01:00
Kevin Ansfield
8d0bbe142c Removed errant console.log 2021-09-09 14:15:47 +01:00
Kevin Ansfield
d878466215 Added grammarly tag to all Sentry exceptions
no issue

- Grammarly is a suspect in some reported editor errors but it's usage hasn't been available inside of Sentry to know for sure
- when the grammarly extension is present it adds a `data-gr-ext-installed` data attribute to the `body` element, we now use that to add a `grammarly: true/false` tag to error reports so we can more easily track down the cause of editor bugs
2021-09-09 14:00:56 +01:00
Rishabh
c9f1a6bc48 Added new Tiers feature to Beta features section
refs https://github.com/TryGhost/Team/issues/1026

Tiers is being released as a beta feature with an early-access opt-in flow. Site owners can now opt-in for early access to Tiers feature in Ghost by enabling it from the Beta features section, but note it's a one way door and its not possible to switch it off once enabled. This is to ensure that sites don't break in any unexpected ways once the tiers feature is enabled by switching it off.
2021-09-09 17:08:33 +05:30
Peter Zimon
24022e3932 Re-enabled Stripe disconnect for Administrators
Refs.
7394df6137
e52bdf88f9

We have temporarily disabled Stripe disconnect for Administrators to avoid hitting an API endpoint.
Now that the API is updated, disconnect is re-enabled for Owner and Admins.
2021-09-09 13:01:07 +02:00
Rishabh
13d2aefb5c Fixed lint
no refs
2021-09-09 15:46:47 +05:30
Rishabh
6e3d2bef3a Updated filter UI to show existing filters on page refresh
refs https://github.com/TryGhost/Team/issues/972

If a filter is applied in the new members list then the URL gets updated and the filter dropdown contains the filters that have been created. When refreshing the page while a filter is applied, the URL remains the same, the filter is still applied but the UI in the filter dropdown resets and doesn't show the appropriate filter fields and values.

This change parses the nql filter from URL using `nql-lang` library and rebuilds the filter UI blocks based on current filter in URL. It also ignores any invalid or unexpected filters in the UI.
2021-09-09 15:13:58 +05:30
Sanne de Vries
c5e5ada1ee Fixed Zapier details responsive issues 2021-09-09 10:56:56 +02:00
Sanne de Vries
b92a3ff0f6 Fixed classes issue from removing email CTA card labs flags 2021-09-09 09:25:33 +02:00
Rishabh
03379544bd Added new label input dropdown on member detail behind filtering flag
closes https://github.com/TryGhost/Team/issues/977

A new label input dropdown was added behind filtering labs flag along with new filtering UI on members list screen, which includes member editing directly via the dropdown. This adds the same editing function to the members detail screen too behind the flag
2021-09-08 22:59:58 +05:30
Peter Zimon
bfef90933c Updated member open rate analytics copy 2021-09-08 17:05:15 +02:00
Sanne de Vries
7a56ded8d0 Updated About/What's new? page (#1872)
Merged About and What's new? page.
2021-09-08 14:00:24 +02:00
Sanne de Vries
7faf1183be Updated snippet replacement dropdown 2021-09-08 12:07:05 +02:00
Peter Zimon
d585ba62ef Updated empty members screen (#2084)
Updated empty state of members detail screen.

- Added appropriate messaging to Analytics, Events and Subscriptions blocks about what's supposed to be in them once there's sufficient data.
- Updated tooltip for average open rate when there isn't significant data yet.
2021-09-08 12:03:49 +02:00
Kevin Ansfield
f9d97bdc35 Added group heading to existing snippets in dropdown
no issue

- wrapped dropdown options in an options group so the heading can provide more context
- fixed styling so there isn't double padding around grouped options
2021-09-08 09:54:06 +01:00
Peter Zimon
cdedf7b0a8 Updated copy for Tiers early-access flow 2021-09-08 10:40:52 +02:00
Rishabh
5bdef5e44e Wired success/error handling for bulk operations on filtered members
closes https://github.com/TryGhost/Team/issues/1028

Bulk operations - add/remove label, unsubscribe - were added to filtered members list behind filtering labs flag as part of introducing filtering on members list. This handles the success/error response on bulk operations and shows them in the popup similar to delete bulk operation.
2021-09-08 12:06:16 +05:30
Sanne de Vries
ad79a97071 Updated publish-menu dropdown selector 2021-09-07 15:09:34 +02:00
Sanne de Vries
947307a860 Fixed member count in side nav not being clickable 2021-09-07 14:44:56 +02:00
Peter Zimon
eb1d3c370f Added early-access modal for Tiers 2021-09-07 13:36:23 +02:00
Rishabh
0231c08fde Fixed members filter list reloading on label edit
closes https://github.com/TryGhost/Team/issues/975

Clicking on label edit in filtering menu was also causing label to be selected in the dropdown, which also caused members list to live reload. This change fixes the edit behavior by not selecting the label to be edited in the dropdown
2021-09-07 16:50:43 +05:30
Rishabh
e70e0e273d Fixed member list not loading on scroll with filtering
closes https://github.com/TryGhost/Team/issues/971
reverts abe5c6d681

We use vertical-collection to allow infinite loading + scrolling for members list instead of loading and rendering all members at once. The behavior was not working correctly with updated list for filtering feature, as we dynamically update columns. This change fixes the scroll behavior and members loading together by updating the containerSelector for vertical collection.
2021-09-07 16:50:43 +05:30
Kevin Ansfield
95a2054bea Fixed "Post/Page access" label in post settings menu not matching content type
closes https://github.com/TryGhost/Ghost/issues/13283

- input label was not using the model's `displayName` property
2021-09-06 11:39:41 +01:00
Sanne de Vries
12036f48b3 Updated publish-menu copy for email-only posts 2021-09-06 12:35:25 +02:00
Rishabh
62fa738da3 Refined empty state for filtered members
no refs

- empty filtering state was not being detected when soft filters are applied for live-reload when filter is open
2021-09-06 12:43:17 +05:30
Rishabh
9b5cd1ac8b Refined close filter dropdown behavior
closes https://github.com/TryGhost/Team/issues/976

Dropdown's `onClose` action was previously fired from the `close` function instead of when the actual close happened when animation ended for dropdown close. Also, the `close` action of dropdown is fired irrespective of dropdown is open, as we close all dropdowns and menus whenever a new transition happens, so it caused flicker on the screen.
2021-09-06 12:42:43 +05:30
Rishabh
d691874c5f Refined live reload behavior for members filtering
refs https://github.com/TryGhost/Team/issues/963

- updates the list when either the relation or value changes for a filter row.
- only filter rows with value are used
- consistent behavior for "apply all" and "reset all"
- `Enter` and `onFocusOut` behavior for rows with text values
2021-09-06 12:14:08 +05:30
Peter Zimon
5516968936 Added empty result states to new members filtering 2021-09-03 12:18:15 +02:00
Peter Zimon
0b7d1b1946 Fixed gallery delete icon color bug 2021-09-03 11:45:29 +02:00
Peter Zimon
0f0c44295e Added show-all button to empty members filter list 2021-09-03 11:37:26 +02:00
Peter Zimon
bc48cdffd0 Fixed button alignment in edit tier modal 2021-09-02 22:37:14 +02:00
Peter Zimon
a1cd55b848 Added preview to tier edit modal 2021-09-02 16:01:50 +02:00
Kevin Ansfield
922c304e3b Added "Email call to action" card for an email-only CTA targeting free or paid members (#2080)
refs https://github.com/TryGhost/Team/issues/993

The new editor card allows you to add styled content along with an optional button that will only be visible to free or paid members when the post is emailed. Useful for encouraging free members to sign up to a paid account for example.

- removed labs flag and conditionals to make the feature is available by default
- cleaned up CSS that re-used the `.email-card` class or was referencing `labs`
2021-09-02 13:11:15 +01:00
Rishabh
9a74c59630 Refined enter behavior in Admin benefits modal
refs https://github.com/TryGhost/Team/issues/874

- when hit with focus on last non-empty benefit field, previously the new benefit automatically showed error for empty field. This change refines behavior to only show error when user tries to click "Enter" again when already on last empty benefit
- also cleans up the duplicate add benefit call
2021-09-02 15:10:58 +05:30
Kevin Ansfield
ba5b5f7935 Fixed email-only card help text overlapping card border
no issue

- negative margin was pulling the card border up too far and causing it to run behind the grey help block
2021-09-01 17:56:29 +01:00
Peter Zimon
805873d64e Made Portal preview scrollable
- Updated Portal preview in Membership settings and Portal settings so that the preview is scrollable in all browsers.

Note: Only when Tiers is turned on.
2021-09-01 17:58:35 +02:00
Peter Zimon
c5e00d71f1 Tier modal benefit box height fix 2021-09-01 15:48:17 +02:00
Peter Zimon
e175b97c5e Updated field description for email footer 2021-09-01 14:13:42 +02:00
Peter Zimon
c462bbba3b Copy refinements
- Fixed incorrect casing on staff page
- Removed unnecessary placeholders on staff page
- Removed '...' from search site
- Added webhook URL placeholder
2021-09-01 13:02:00 +02:00
Peter Zimon
d8be0a794e Cleaned up placeholder for webhook forms 2021-09-01 12:55:40 +02:00
Peter Zimon
16aec55acf Use examples as placeholders in tier form 2021-09-01 12:53:37 +02:00
Peter Zimon
8cce7989f2 Updated tier modal copy 2021-09-01 10:14:56 +02:00
Kevin Ansfield
4e30da6c70 Added ability to update snippet contents (#2073)
refs https://github.com/TryGhost/Team/issues/1008

To update a snippet, select the content in the editor that you want as your snippet text and click the snippet icon as per creating a snippet. Once the snippet name input shows, start typing the name of an existing snippet to be able to select it for update.

- replaced main snippet input component with the labs component
- removed the feature flag and associated labs screen toggle
- removed original/labs snippet input conditional in the editor
2021-09-01 09:09:40 +01:00
Naz
f2883c3636 Fixed a routing error when a "sent" post was edited
refs https://github.com/TryGhost/Team/issues/954

- When an email-only post with a "sent" status was edited, it's status changed to "draft", which is an incorrect behavior. This change is causing the "sent" status to persist and removes the transition error.
2021-08-31 20:16:53 +04:00
Naz
c27194efc5 Added a post preview link in PSM for "sent" posts
refs https://github.com/TryGhost/Team/issues/954

- When the post has a "sent" status there needs to be a way similar to the one for "published" posts to preview the post
2021-08-31 20:16:53 +04:00
Kevin Ansfield
06e63d371c 🎨 Added ability to upload a feature image by drag and dropping an image file
refs https://github.com/TryGhost/Team/issues/884

Drop-to-upload functionality was lost in the first version of the new feature image uploader inside the main editor area, this adds it back in.

- fixed dropzone flickering issue by switching the event listeners to the capture rather than bubble phase so we can indicate a drag is occurring on the body without each individual drag/drop handler needing to know about it
- moved the event handler init/cleanup to the `ui` service
- moved the event handler init call to the application service as it no longer requires auth to have occurred for access to the labs flag setting
- removed the `featureImgDragDrop` labs flag
2021-08-31 14:21:25 +01:00
Peter Zimon
2240daec45 Updated active dropdown UI 2021-08-31 13:52:04 +02:00