Ghost/ghost/admin/app/services
Kevin Ansfield bd60c8089b 🐛 Fixed confusing member count shown in save notification and editor header
closes https://github.com/TryGhost/Team/issues/776

Since switching to using a real NQL filter in the `posts.email_recipient_filter` field where we used to show `free members`, `paid members`, or `all members` we were showing `status:free`, `status:-free`, and `status:free,status:-free` respectively. If labels are used in a filter the text became even longer.

- added a `membersCountCache` service
  - `.count(filter)` fetches a numeric count from the members API, if the filter has been counted in the last minute it returns the count directly from a cache instead to avoid hammering the members API when we show counts in multiple places across the UI
  - `.countString(filter)` fetches a count but returns a humanized string with the logic extracted from what we displayed in the confirm email sending modal
- added a `<GhRecipientFilterCount @filter="" />` component that acts as a wrapper around the async count from `membersCountCache`
- updated confirm email send modal, plus save notification and editor status displays for scheduled posts to use the new service and component
2021-06-11 11:44:50 +01:00
..
ajax.js Added new members CSV importer (#1797) 2020-12-10 01:02:31 +05:30
billing.js Changed /billing route to /pro (#1871) 2021-03-23 11:59:52 +00:00
clock.js Remove more import Ember via module imports 2018-05-03 17:52:39 +01:00
config.js Removed usage of /configuration/timezones/ endpoint 2019-02-26 12:37:50 +07:00
custom-views.js Renamed defaultLocale setting to lang 2020-06-24 15:27:17 +01:00
dropdown.js Switched from ember-cli-shims to new module imports (#779) 2017-08-22 14:53:26 +07:00
event-bus.js Switched from ember-cli-shims to new module imports (#779) 2017-08-22 14:53:26 +07:00
feature.js Added first version of feature image with caption inside editor (#1999) 2021-06-10 20:42:32 +01:00
ghost-paths.js 🐛 Fixed low-resolution gravatar images on Team/User screens 2018-05-14 12:15:08 +01:00
lazy-loader.js 🐛 Fixed night shift toggle in Firefox Nightly. (#1174) 2019-04-25 09:40:26 +02:00
limit.js Added upgrade moal when unsuspending staff user 2021-04-28 18:07:18 +04:00
media-queries.js Unsplash integration 2017-08-15 16:01:12 +01:00
media.js Bumped dependencies (#1108) 2019-03-05 17:34:00 +00:00
member-import-validator.js Added new members CSV importer (#1797) 2020-12-10 01:02:31 +05:30
members-count-cache.js 🐛 Fixed confusing member count shown in save notification and editor header 2021-06-11 11:44:50 +01:00
members-stats.js 🐛 Fixed incorrect member count on dashboard 2021-03-24 21:56:35 +05:30
members-utils.js Brought checkboxes back to publish menu recipient selection (#1972) 2021-05-21 18:22:01 +01:00
navigation.js Fixed saving of custom views expansion state 2020-05-18 13:45:59 +01:00
notifications.js Switched from Sentry.captureMessage to captureException for better logging 2021-05-26 17:18:02 +01:00
resize-detector.js Switch from embor-browserify to ember-auto-import 2019-01-22 13:09:38 +00:00
session.js Removed usage of deprecated EmberSimpleAuth mixins (#1910) 2021-04-12 13:21:57 +01:00
settings.js Added default newsletter recipients setting (#1946) 2021-05-07 10:02:19 +01:00
slug-generator.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
ui.js Removed tour feature 2021-03-02 14:29:26 +00:00
unsplash.js Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
upgrade-status.js Switch deprecated htmlSafe imports from @ember/string to @ember/template 2021-05-12 12:33:40 +01:00
whats-new.js Added "What's new" indicator and modal to highlight recent updates (#1292) 2019-08-23 10:01:27 +01:00