Commit Graph

221 Commits

Author SHA1 Message Date
Rishabh
f80b401555 Added status data to member model
refs https://github.com/TryGhost/Team/issues/943

- allows using member status values in the member list table when selected via filter
2021-08-10 17:43:36 +05:30
Naz
3cd1c56d4e Added email only checkbox to PSM
closes https://github.com/TryGhost/Team/issues/896

- Having this checkbox allows user to control posts email_only flag
- Also sets the post automatically to "public" when the email-only toggle is switched on as the access would be controlled form within email and not through the internal gatekeeping mechanism
2021-08-04 17:13:52 +04:00
Thibaut Patel
dc9c812d9c Renamed isAdmin/isOwner/isAdminOrOwner to reduce confusion
issue https://github.com/TryGhost/Team/issues/857

- The goal is to avoid testing for the owner role only is cases where we should be testing for the owner or admin role
- `isOwner` => `isOwnerOnly`
- `isAdmin` => `isAdminOnly`
- `isOwnerOrAdmin` => `isAdmin` (concerns now both Owner and Admins)
2021-07-12 14:55:56 +02:00
Rishabh
6feb14b839 Handled visibility filter for posts
refs https://github.com/TryGhost/Team/issues/849

Multiple products alpha feature brings back segmented post access using products. The new visibility filter based on segments is returned in a separate `visibility_filter` property on post/page API
2021-07-05 17:14:26 +05:30
Rishabh
3c5e334041 Added ability to set post access to segments
refs https://github.com/TryGhost/Team/issues/801

- This reverts commit de560733c5
- brings back members segment select component to post access, which allows setting access to specific labels/products
- only works behind the alpha feature flag - `multipleProducts`
2021-06-28 17:46:24 +05:30
Rishabh Garg
46b311b561 Wired benefits section to API (#2023)
refs https://github.com/TryGhost/Team/issues/792

- updates product benefit to use `name` instead of `label` attribute for benefit text
- updates model/serializer/validator to correctly handle benefit attributes
- added `+` button for adding new labels as the enter behavior is closing the popup(needs fix)
2021-06-28 15:19:54 +05:30
Kevin Ansfield
bc950e655f Fixed error when editing settings
no issue

- the `newsletter_show_header` setting has been removed on the server side but was still being included by the client when saving the settings model resulting in a `Resource not found error, cannot edit setting. Problem finding setting: newsletter_show_header` error
2021-06-22 09:06:39 +01:00
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
dc6b2884f1 Added model and validator for product's benefit item
refs https://github.com/TryGhost/Team/issues/792

- updates product model to read product's list of benefits
- adds transformer to return emberArray with list of product benefits
- adds new model for each product benefit
- adds validator for new product benefit
2021-06-21 14:05:01 +05:30
Kevin Ansfield
ba47b710cb 🎨 Moved default focus in editor from body to title for new posts
refs https://github.com/TryGhost/Team/issues/707

Placing focus in the title aligns better with typical editorial process.

- switched `autofocus` attribute from body to title for new posts
- added a default value to the `mobiledoc` attr on the Post model, without it the autosave when moving from title to editor creates a forced re-render and clears the focus whilst you're typing
2021-06-14 15:35:59 +01:00
Kevin Ansfield
ceb16b5e9f Added first version of feature image with caption inside editor (#1999)
refs https://github.com/TryGhost/Team/issues/771

- updated `<GhImageUploaderWithPreview>` to take an `@includeMetadata` argument that shows a basic html supporting caption field underneath (ready for toggle between caption/alt but not fully implemented)
- added feature image alt/caption properties to post model
- updated UI behind "featureImageMeta" labs flag
  - added the feature image uploader to the top of `<GhKoenigEditor>` for display above the editor title
  - removed feature image uploader from post settings menu
- added labs flag checkbox
2021-06-10 20:42:32 +01:00
Kevin Ansfield
b2b66490b7 Added settings for newsletter header, title style, and feature image (#1993)
refs https://github.com/TryGhost/Team/issues/755
reqs https://github.com/TryGhost/Ghost/pull/13006

- updated settings model to match new server-side settings
- updated email customisation modal behind the dev experiments flag
  - adjusted layout to move to a fixed top bar and scrollable sidebar
  - added image upload, toggles and selections for new settings
  - updated preview to match selected settings

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2021-06-07 16:36:21 +01:00
Rishabh
46e281241e Wired new membership tiers UI to API
refs https://github.com/TryGhost/Team/issues/712
closes https://github.com/TryGhost/Team/issues/717

The product API is updated to support `monthly/yearly_price` on each product instead of using list of stripe prices. This change updates the handling of membership settings to use the updated API instead of `stripe_prices` property.
2021-06-04 13:30:11 +05:30
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
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
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
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
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
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
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
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
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
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
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
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
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
naz
07abb5443a Fixed EmberObject.create error on Admin start (#1841)
refs https://github.com/TryGhost/Ghost/pull/12632

- The `unsplash` setting has been migrated to a new format - plain boolean value. This is why it's no longer needed to do any serialization dances
2021-02-18 13:25:21 +13:00
Rish
5fe20898d6 Revert "Revert "Updated usage of subscriptions data for members (#1834)""
This reverts commit d539d4ca53.
2021-02-09 07:52:40 +05:30
Rish
d539d4ca53 Revert "Updated usage of subscriptions data for members (#1834)"
This reverts commit fbd42ef33e.
2021-02-04 11:56:26 +05:30
Naz
ce20117307 Removed unused locale fields
refs https://github.com/TryGhost/Ghost/pull/12599

- These fields have been deprecated since API v2 and no longer are returned or exposed
2021-02-04 19:04:34 +13:00
Rishabh Garg
fbd42ef33e Updated usage of subscriptions data for members (#1834)
no issue
depends on cc08be0e34

The subscriptions data on member - stripe.subscriptions - is flattened to top level subscriptions in v4 API. This PR -
- Updates model to use the new data structure
- Updates serializer to handle new data structure
- Updates references to subscriptions data
2021-02-02 16:08:07 +00:00
Kevin Ansfield
56f18c8886 Added post.{isPost,isPage} computed properties
no issue

- removes the need to check `post.displayName === 'post/page'` any time we need a conditional on post type
2021-02-02 16:08:05 +00:00
Rishabh Garg
464e601c4d Added new FirstPromoter integration (#1825)
no issue

Adds new FirstPromoter integration on the integrations page. FirstPromoter enables sites to launch their own members referral program, and integration allows Site admins to directly add their FirstPromoter tracking ID in the settings to enable FirstPromoter script on their site.
2021-01-15 20:01:40 +05:30
Sanne de Vries
2453f6afbd Added activity feed to member details screen (#1796)
closes https://github.com/TryGhost/Ghost/issues/12461

Design changes:
- added activity feed to member details page
- rearranged Stripe info to display on the right
- added toggle buttons for Stripe subscription and customer info
- added box to display activity feed for received and opened emails

Functionality changes:
- added `queryRecord()` to member adapter so `queryRecord('member', {id: x})` will hit `/members/:id/?query` instead of `/members/?id=x&query`
- updated member route to query member with `?include=email_recipients`
- added `EmailRecipient` model for access to event timestamps and email relationship setup
- added `<GhMemberActivityFeed>` component that accepts an `EmailRecipient` array and converts that into an activity list
- added support for `@model=emailInstance` to the email preview modal
- fixed a timing issue with email preview that could result in it showing blank content until the mobile/desktop toggle is used
- fixed sometimes blank member location

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-10 11:38:38 +00:00
Kevin Ansfield
65129a0d9f Fixed missing email received/opened count when creating new member
no issue

- adds default value of 0 for `member.{email_count,opened_email_count}` to match server-side behaviour and allow consistency in the UI
2020-12-10 10:15:42 +00:00
Sanne de Vries
ecfb77b980 Added email stats overview to member details page (#1795)
refs https://github.com/TryGhost/Ghost/issues/12461

- Added "Emails received", "Emails opened", and "Avg. open rate" to member details
- Adjusted visual display of avatar, name and email. Made email a mailto link
- Rearranged Name and Email fields to reduce height
- Changed height of the notes textarea

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-09 13:26:00 +00:00
Sanne de Vries
ffe0f84700 Added open-rate column and ordering to the members list (#1790)
closes https://github.com/TryGhost/Ghost/issues/12421

- added `emailOpenRate` property to member model
- added open-rate column to the members list
  - hidden when email analytics is disabled
- added `{{feature "flag"}}` helper so feature flags can be checked in templates without injecting the feature service into the backing class
- added `order` query param to the members controller/route and wired it into the data fetching routine
- added order dropdown to the filter bar with "Newest" (default) and "Open rate" as the two options
  - whole dropdown is hidden if email analytics is disabled

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-08 19:23:57 +00:00
Sanne de Vries
a2a98b575f Added email open rate to posts list in admin (#1772)
no issue

- added "Sends" and "Opens" columns to the posts list to see newsletter performance at a glance
- "Sends" will show the type of members sent to (free, paid, all) as a tooltip
- "Opens" shows open rate by default and total opens on hover
2020-11-26 17:19:05 +00:00
Sanne de Vries
50a423ed2b Added toggle in settings to enable open-tracking configuration (#1777)
closes https://github.com/TryGhost/Ghost/issues/12390
requires https://github.com/TryGhost/Ghost/pull/12404

- Added toggle for open-tracking in settings (Labs > Members > Email section)

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-11-23 18:36:57 +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
Fabien O'Carroll
65b310d500 Renamed footer setting to newsletterFooterContent
no-issue

This is more generic and matches the setting in the backend.
2020-11-13 13:32:31 +00:00
Fabien 'egg' O'Carroll
fafe7d7b74 Added newsletter footer customisation (#1764)
no-issue

This adds support for customising the newsletter footer with plaintext.
Updates the new modal to use Octane, rather than legacy components.
2020-11-13 13:21:42 +00:00
Peter Zimon
94581a87f8 Added newsletter customisation options (#1756)
no-issue

This adds three initial customisation options for newsletters:
  1. Show/Hide site title and logo
  2. Set font to serif/sans serif
  3. Display a publish with Ghost badge

This is the first step in allowing customisation of the look and feel of newsletters.

Co-authored-by: Rish <zrishabhgarg@gmail.com>
Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-11-12 14:45:22 +00:00
Rishabh Garg
49b86b466a Allowed sending newsletter to free members only (#1751)
refs 6140a98351

This officially decouples the newsletter recipients from the post visibility allowing us to send emails to free members only.
2020-11-07 00:24:27 +05:30
Kevin Ansfield
7e169a2a86 Renamed snippet.title to snippet.name for consistency
no issue

- all of our models which allow users to name something use `name` as the field descriptor rather than `title` so `snippet.title` was renamed for consistency
- also fixes typo in the plus-menu component that stopped clicking on snippets from working
2020-10-16 10:15:07 +01:00
Kevin Ansfield
b590ce1b95 Implemented first iteration of content snippets
closes https://github.com/TryGhost/Team/issues/411

- adds "Create snippet" icon to the editor toolbar
- uses the same link input component design for specifying snippet titles
- snippets are loaded in the background when the editor is accessed
- snippets are listed at the bottom of the card menus of the + and / menus
- clicking a snippet inserts the snippet's contents in place of the current blank section
2020-10-15 18:03:35 +01:00
Rish
eefbb55d84 Added new support and reply-to address for members
no issue

- Adds 2 new email address fields for members in email settings section - support address and reply-to address
- Support address - Is used for member auth emails as well as in themes and Portal for allowing members to contact support.
- Reply-to address - Is used to set `reply-to` address for newsletter emails that allows configuring where member's reply to emails will go
- Disabled from address update for empty value
- Updated success toast message and copy for from/support address update
- Changed section title + description for email addresses
- Added "public" to support email description
2020-08-31 18:10:26 +05:30
Fabien 'egg' O'Carroll
1f9854a6f8 Added UI for AMP GA Tracking ID (#1638)
refs https://github.com/TryGhost/Ghost/pull/12039

Adds the initial UI for setting the `amp_gtag_id` setting
2020-07-15 13:45:31 +02:00
Fabien 'egg' O'Carroll
ffdde799b8 Added UI for setting tag metadata (#1632)
no-issue

* Updated tag model with new metadata fields
* Updated Tag setting UI to handle metadata

Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-07-13 14:58:13 +02:00