1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

542 commits

Author SHA1 Message Date
Rish
301fdde0f7 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
Kevin Ansfield
197f554c11 Fixed {{gh-pluralize}} errors
refs 754f8483e9

- fixed incorrect call `pluralize(undefined, {withoutCount: true})` when number is undefined - `pluralize()` expects only one argument when no number is provided
- fixed destructuring in ghPluralize
- fixed linting error for undefined method after removal of `formatNumber` import
- fixed typo of import path in members controller
2020-08-10 11:37:21 +01:00
Kevin Ansfield
754f8483e9 Added number formatting to all pluralized counts
closes https://github.com/TryGhost/Ghost/issues/12110

- adds `{{gh-pluralize}}` helper that wraps the `{{pluralize}}` helper from `ember-inflector` but formats the number using our `{{format-number}}` helper
- updates all uses of `{{pluralize}}` to `{{gh-pluralize}}`
2020-08-10 11:16:03 +01:00
Roshan Dash
3eb8830cbd
🐛 Fixed incorrect scheduled date in toast (#1663)
closes https://github.com/TryGhost/Ghost/issues/12102

- The scheduled date was incorrectly shown as month number in the toast box after scheduling
- Updates to correctly show the selected date
2020-08-04 13:04:24 +05:30
Fabien 'egg' O'Carroll
3155e6091d
Updated delete member UI to add toggle to cancel subscriptions (#1647)
no-issue

* Supported cancellation of subscriptions on delete

This makes the cancellation of subscriptions much more obvious to the
user, and we err on the side of caution by *not* cancelling by default.

* Updated base adapter to handle urls with query params

After creating the member adapter and overriding the urlForDeleteRecord
method the flow would take the url from that and it would get passed
into the buildUrl method of the base adapter. At this point it would
append a "/" _after_ the query param.

It would ouput http://admin.com/ghost/api?query=blah/
rather than http://admin.com/ghost/api/?query=blah
2020-07-24 16:02:42 +02:00
Rish
ee494a4882 Removed accent color from general settings
no issue

- Accent color setting was behind dev flag on General settings screen
- Its now moved inside Portal settings where its primarily being used
- This change removes it from general settings screen so its only on Portal settings
2020-07-24 16:46:32 +05:30
Kevin Ansfield
dea7a3da03 Removed bulk member edit dev experiment
no issue

- we're moving forward with a simplified bulk delete and the UI would conflict if both approaches are behind the dev experiments flag
2020-07-23 15:03:18 +01:00
Kevin Ansfield
c223729fee Added automatic filter of members list after CSV import
requires 8ceabbcfba

- if the API responds with `meta.import_label` after an import, use it to reset and apply the filter across the members list so that it's quick to see the results of the import and perform further bulk actions (coming later)
- added ability to pass arguments through `<GhFullscreenModal>`'s `@confirm` action
- added a `console.error()` call to the members csv import so that any underlying error is not completely lost by the custom error handling
2020-07-23 14:15:07 +01:00
Fabien 'egg' O'Carroll
dbd5da0c36
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
bd477449f6
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
Peter Zimon
213b44bf9c Changed date formatting for members
no refs.
- applied date format to members chart tooltip
- made all members date format consistent
2020-07-06 17:54:30 +02:00
Fabien 'egg' O'Carroll
3e21c21d12
Updated labs to use new mailgun_* settings (#1628)
refs https://github.com/TryGhost/Ghost/issues/10318

This removes references to the old bulk_email_settings
2020-07-03 11:48:54 +02:00
Kevin Ansfield
b965e7f57f Fixed "View post" rather than "View page" in save notifications
no issue

- the post/page conditional was looking at the old `post.page` property rather than the `post.displayName` that was added when posts and pages became separate models
2020-06-30 15:07:58 +01:00
Kevin Ansfield
ec8e4530df Updated "successfully scheduled" notification message
refs https://github.com/TryGhost/Ghost/issues/11965

- be more explicit about when the post will be published
- indicate if and to which type of members the post will be emailed
- improved description formatting by making sure pertinent pieces of information do not wrap
2020-06-30 11:15:39 +01:00
Fabien 'egg' O'Carroll
eea43963a1
Refactored to use updated members and stripe settings (#1621)
refs #10318

* Updated settings model with new settings

* Removed parseSubscriptionSettings from settings service

* Updated members-utils to use new settings

* Updated labs controller to use new settings

* Fixed dependency for member-settings-form

* Updated members-lab-setting component to use new settings

* Updated disconnect modal to use new settings

* Updated members portal modal to use new settings

* Removed Direct from settings

* Renamed members_allow_signup -> members_allow_free_signup

* Allowed for null fromAddress
2020-06-29 19:37:11 +02:00
Kevin Ansfield
ef45008b30 Updated members bulk delete to work with filters/paid/search
no issue

- use the same API query param generation for bulk delete requests as we use for the primary members list so that delete affects the same list that is visible/selected
2020-06-25 22:44:43 +01:00
Kevin Ansfield
3da8815759 Renamed activeTimezone setting to timezone
refs https://github.com/TryGhost/Ghost/issues/10318

- API has been updated to still work with `active_timezone` for backwards compatibility but it makes sense for the client to match the underlying settings keys
2020-06-24 15:34:59 +01:00
Kevin Ansfield
90dc419249 Fixed settings not saving due to settings.brand
refs https://github.com/TryGhost/Ghost/issues/10318

- moves `settings.brand` as a JSON object to `settings.accentColor` as a string
2020-06-23 20:49:29 +01:00
Kevin Ansfield
312b9fb4e1 Added first pass bulk members delete confirmation and results display
no issue

- display a confirmation modal when bulk deleting members
- hit the `DELETE /members/?all=true` endpoint when confirming
- show counts of members deleted/skipped
- fix selection reset when leaving edit mode
2020-06-19 18:14:41 +01:00
Kevin Ansfield
29bed994ff Moved members bulk delete confirmation into a modal 2020-06-19 14:14:39 +01:00
Rish
0e55590360 🐛 Fixed incorrect save warning on design settings
closes https://github.com/TryGhost/Ghost/issues/11590

- Dirty attribute flag was set incorrectly on focus out from label/url fields as no check with existing was used
- Checks against existing nav item value before setting dirty attribute on focus out
2020-06-18 17:46:18 +05:30
Kevin Ansfield
5601939f92 Added exit of edit mode when changing members filters
no issue

- keeping selection does not make sense when a filter or search is changed
2020-06-18 11:23:15 +01:00
Kevin Ansfield
0f587a90d0 Added rough "edit mode" for members table behind dev flag
no issue

- initial UI for bulk-selection, focusing for now on first stage which is limited to select-all and delete actions
- adds "Edit" button to the members table that shows the "selection" toolbar in place of the table header and shows a checkbox next to each member
2020-06-18 11:08:53 +01:00
Kevin Ansfield
a6fe448512 Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
Nazar Gargol
c666cbbed8 Renamed members import/export endpoints to match API changes
refs 5f00619d1a
2020-06-16 18:13:06 +12:00
Kevin Ansfield
e8336b847d Fixed stripe connect persistent button and "unsaved changes" warnings
no issue

- hook template up directly to the `settings.stripeConnectIntegrationToken` value
- reset `settings.stripeConnectIntegrationToken` when leaving the labs route
  - without the reset, after a failed save other settings screens will show the "unsaved changes" warning
2020-06-15 17:43:02 +01:00
Kevin Ansfield
67d195179f
Added all/free/paid filter to members admin screen (#1600)
requires https://github.com/TryGhost/Ghost/pull/11892

- adds `?paid` query parameter to members route that is tied to the `?paid` query param in the API request
- added all/free/paid members dropdown to members filter component
2020-06-12 12:12:27 +01:00
Kevin Ansfield
24bf414cc3 Added access level filter to posts and pages lists in admin
no issue

- adds `visibility` query param to posts and pages controllers/routes that is tied to the `filter` query param used in API requests
- adds dropdown for selecting post/page visibility to `<GhContentFilter>`
2020-06-09 12:19:40 +01:00
Kevin Ansfield
49700d9b64 Fixed delete-tag modal showing unexpectedly
no issue

- there was a race condition when deleting tags...
    - the delete tag modal's `close` action toggles the `showDeleteTagModal` property to `false`
    - the `deleteTag` action triggered when clicking the delete button was transitioning to the tags screen
    - if the transition occurs before the close action is triggered, the modal component is destroyed and it's close action is never triggered leaving the `showDeleteTagModal` property on the controller set to `true`
    - the next time the tag screen is accessed the delete tag modal is displayed because the `showDeleteTagModal` property is `true`
- adds an explicit reset of `showDeleteTagModal` after a tag is successfully destroyed
- makes open/close of the delete tag modal explicit actions so there's no ambiguity when toggling
2020-06-09 10:15:28 +01:00
Nazar Gargol
c1866ed3ec Fixes labels duplicating themselves across lalbe inputs when unsaved
no issue

- Unsaved labels were still persisted in the store. This was causing unsaved labels reappearing on different instances and caused broken states
2020-06-09 20:31:09 +12:00
Rish
c16381bb42 Added site domain for default from address
refs https://github.com/TryGhost/Ghost/issues/11414

- Appends blog domain as default for from address members setting
- Disabled update button when current from address is same as in field
2020-06-09 11:14:53 +05:30
Rishabh Garg
1e7c80a1da
Allowed domain change for members "from" address (#1597)
refs TryGhost/Ghost#11414

- Restructures member settings in labs, from address gets its own section
- Removes explicit site domain for fromAddress as we allow updating the full address
- Adds new CTA to trigger magic link for updating members from address
- Adds new confirmation modal for email sent to new from address
- Adds notification banner for from address update redirect link
2020-06-09 01:52:58 +05:30
Kevin Ansfield
1635a34e4b 🐛 Fixed member list not updating when manually adding a new member
no issue

- always refresh members list/stats data when adding or saving a member from the members screen
2020-06-05 09:01:01 +01:00
Kevin Ansfield
ff565a369c 🐛 Fixed members list not updating after deleting a member
no issue

- force a full refresh of all members data when deleting rather than only forcing a refresh of the stats
2020-06-05 08:53:58 +01:00
Kevin Ansfield
b75f5965d3 🐛 Fixed members list not refreshing after adding yourself
no issue

- passed in the `refreshData` action to the `<GhMembersNoMembers>` component and called it after creating the member
- converted `<GhMembersNoMembers>` to a glimmer component
2020-06-05 08:50:20 +01:00
Kevin Ansfield
4a53587f3b Switched per-user custom views to shared custom views
requires fdeb7daf40

- swapped to using settings model for storing custom views instead of user accessibility field
- added conditional that checks current user is an admin/owner when displaying the manage custom views button in the content filter (only admins/owners can edit settings model)
  - passed `session.user` into the `<GhContentFilter>` component as an argument so that the conditional getter doesn't need to handle async user access
- fixed no-shadow linting error in settings service
2020-06-04 21:30:06 +01:00
Fabien 'egg' O'Carroll
c17612e3d1
Added Stripe Connect UI (#1586)
no-issue

- Rendering is conditional on `stripeDirect` config being false.
- CSS downloaded from https://stripe.com/newsroom/brand-assets
- `stripe_connect_integration_token` is the setting to _set_ the
  stripe_connect_integration setting
2020-06-02 13:58:43 +02:00
Kevin Ansfield
ef491730d8 Fixed members list/chart not updating after members import
no issue

- move members loading code into `members` controller so that it's more accessible to other areas of the app
- add `refreshData()` to the `members` controller which forces members list and stats to be re-fetched
- call `members.refreshData()` after successful upload of members import file
- store range/days in `membersStats` service so that it's remembered across refreshes and component renders
2020-06-01 15:48:46 +01:00
Kevin Ansfield
3da16a8c32 Improved performance of members admin screens
no issue

- removes the "old" members screens
- swaps route names and links to point at the new members screens that were behind the experiments flag

Why are the new screens faster?

- only loads 50 members at once rather than every member in the database
- loads pages of members in as-needed whilst scrolling
- fetches member stats from the API rather than calculating locally
- caches members list and stats data for 60 seconds to avoid re-fetching when navigating to/from the members list
- moves search and filtering duties to the API rather than calculating locally
2020-05-28 13:35:53 +01:00
Kevin Ansfield
64d7639b57
Added server-side search to new members screen (#1582)
requires https://github.com/TryGhost/Ghost/pull/11854

- ties the search input on the members screen to a `?search` query param, debounced at 250ms to avoid unnecessary API requests and UI churn
- updated the members route's `model` hook to pass through the search param in the API request query parameters
2020-05-28 10:15:17 +01:00
Kevin Ansfield
80346e4868 Memoized member stats with expiration
no issue

- added a `member-stats` service to keep member stats state outside of the chart component's lifecycle
- returns memoized member stats when fetching if the query hasn't changed and the data is less than a minute old
- reduces potentially heavy network requests when quickly navigating between members list and other screens
2020-05-26 17:17:52 +01:00
Kevin Ansfield
4610068e2c Improved number formatting in members screen
no issue

- added `format-number` helper that uses browser's built-in `toLocaleString()` method to format numbers such as adding commas or periods to improve number readability (`123,000` instead of `123000`)
- updated members chart totals to use the helper
- replaced direct `.toLocaleString()` usage with the new helper so we can change global number formatting if needed
2020-05-26 14:40:03 +01:00
Kevin Ansfield
332cb72e25 Updated <GhMembersChart> to fetch stats from the API
no issue

- added mocked API for `/admin/members/stats/` that generates random data for the chart
- re-architected `<GhMembersChart>` to fetch data from the API rather than calculating stats from all members loaded in memory
- enabled mirage in development so that the chart can be tested before the live API is ready
2020-05-22 17:58:45 +01:00
Kevin Ansfield
ad7c8ed423 Linked label dropdown in members screen to paginated list loading
no issue

- moved model loading back into the route
- updated model loading to refresh correctly when `label` query param changes
- fixed infinite loading/"no members" display in members list by using the `members.loading` property that `ella-sparse` gives us (previously we'd never leave the loading display because `this.members.length` would be 0)
- changed the members nav link to reset query params only if it's clicked whilst on the members screen - matches posts/pages behaviour and lets you navigate without having to re-enter your filter/search
2020-05-22 17:58:45 +01:00
Kevin Ansfield
d948ba33fb Fixed redirect after saving member in "old" member screen
no issue

- changed the `replaceRoute` after saving to transition to the `member-old` route instead of `member` route
- updated tests to work with the old routes (for now)
2020-05-22 10:50:12 +01:00
Nazar Gargol
1cf3573d12 Fixed browser URL syncronization with embeded iframe state
no issue

- Opted in to use explicit `hisotry.replaceState` and setting iframe's `src` using assignment instead of tracking it through computed property. This allows for tighter control over when iframe's history is updated which was causing problems when `src` was bound to computed property
- Added billing page metadata. This way browser history records appear with nicer signature
- Removed "update button" iframe and rewrote "global iframe" to not use modals. This allows to have single iframe on a page, which simplifies `postMessage` communication and preserve history inside iframe to be able to navigate it after closure
- Added route change handler responding to BMA app route changes. Allows to sync browser URL visible to the user with active route in BMA iframe. The sync is based on `hisory.replaceState` method that makes sure singular history records are kept in the browser history
- Added nested wildcard billing route. This is meant to catch all the nested routes inside of BMA iframe
2020-05-22 14:44:37 +12:00
Kevin Ansfield
33bb521c11 Updated members list to use paginated loading
no issue

- disabled members search/filter/chart as they won't work without all members loaded into memory (they will be added back later)
- added `ember-ella-sparse` to handle a sparse array of members
- updated `fetchMembersTask` to return a sparse array instance
- updated components that work on a `member` instance to use `.get` because all items in a sparse array are proxy objects
- changed list loading behaviour to not refresh the list from the API unless the client-side list is more than a minute old - allows for much snappier nav between list and details screens
2020-05-20 16:39:32 +01:00
Kevin Ansfield
650b785d3d Refactored members routes
no issue

- moved labels fetching into the controller to unify members+labels loading approaches
- removed unnecessary `deactivate` hook on members route because the label form component already rolls back the model attributes when it's destroyed
- unified non owner/admin redirect approach across members and member routes
2020-05-20 16:39:31 +01:00
Kevin Ansfield
e80fa137db Updated members routes/controllers with Octane idioms
no issue

- ran [`ember-native-class-codemod`](https://github.com/ember-codemods/ember-native-class-codemod) on members-related files
- updated files to remove need for `@classic` decorator where possible
    - switched to tracked properties
    - removed usage of `this.get/set/toggleProperty` etc
- swapped usage of `{{action 'foo'}}` for `{{this.foo}}`
2020-05-20 16:39:31 +01:00
Kevin Ansfield
9250d7939b Swapped duplicated members files from -dev to -old
no issue

- allows continued development on the "original/non duplicated" files to better preserve git history once the `-old.*` files are deleted
2020-05-20 16:39:31 +01:00