Commit Graph

105 Commits

Author SHA1 Message Date
Kevin Ansfield 2e3c72891e Updated members screen to work with final stats API naming
refs 071ab9774b

- stats API uses snake_case rather than camelCase to be consistent with the rest of Ghost's APIs
2020-05-26 12:26:04 +01:00
Kevin Ansfield 5de9483df8 Removed "members" from mocked stats API payload property names
no issue

- removes duplication from property names as the "members" part is implicit from the resource name
2020-05-25 10:35:39 +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
renovate[bot] 2eff6cf2d7
Update dependency eslint to v7 (#1566)
* Update dependency eslint to v7

* Fixed linting errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-17 22:53:37 +01:00
Nazar Gargol e7cff63982 Cleaned up use of members `isPaid` flag
refs https://github.com/TryGhost/Ghost/pull/11651

- The flag is being removed from the backend, so can be safely removed on client as well
2020-03-16 13:44:14 +08:00
Rishabh Garg 7319d11e94
Fixed tests for labels (#1493)
no issue

- Updated member settings css property in tests
- Added mock for label API
2020-02-14 16:37:25 +05:30
Kevin Ansfield 2bc00a375b Removed <GhDownloadCount>
no issue

- the count.ghost.org service is being shut down
- replaced the fetch+poll component with a hardcoded figure
2020-01-27 09:51:45 +00:00
Kevin Ansfield 3f7f3812e7 Fixed invite management tests
no issue

- adjusts mirage config so that we're correctly serializing foreign keys
- our API outputs (and our app code expects) foreign keys for non-embedded resources to be in the format `{relationship_name}_id` but mirage's default REST serializer does not include the `_id` suffix
- tests started failing because cc0aa73355 introduced a direct access of the invite->role relationship which Ember Data was not correctly creating when mirage was outputting `role` rather than `role_id`
2020-01-08 15:37:06 +00:00
Hannah Wolfe 377055a7de Added Secondary Navigation (#1410)
refs: https://github.com/TryGhost/Ghost/pull/11409

- Added a new UI for a second set of navigation links
- This should support most concepts of nav, e.g. left and right, or header and footer
- This PR mostly updates the design and nav components to cope with a second set of nav
2019-12-04 11:14:45 +07:00
Naz Gargol 3ec3671aee
Added member "add" screen (#1411)
no issue

- We have a need to create a member manually, this changeset solves this problem.
- Added new member button to the member's screen
- Needed to be able to perform add member action
- Fixed inconsistent `createAt` naming. All models use consistent `createdAtUTC`, fixed it up so that members model follows the same pattern. If we want to change this pattern should probably happen for all models at once
- Fixed member avatar when creating a new member. If the values are completely empty the screen ends up being filled with empty space. Added some dummy initials which are recalculated once the member enters the name or an email
- Refactored DS naming for consistency. Nowhere else in the codebase 'DS' name is ever used, made this consistent
- Added missing validations in members form
- Simplified if conditions in the member list template. When using the if/esle statements unnecessary new-line symbols were inserted which made it hard to test. Also by using computed property view is much cleaner
- Updated member's model default value for `subscribed` to "true". It is turned on by default in the model layer  on the backend (ref: https://github.com/TryGhost/Ghost/blob/3.1.0/core/server/data/schema/schema.js#L330), this behavior is intended and should be the same on the frontend
2019-11-28 18:30:21 +07:00
Rish 45bb968fd3 Added new top-level bulk email settings
no issue
2019-11-13 22:38:16 +05:30
Kevin Ansfield 9aaf5be339 Fixed linting 2019-11-08 11:25:00 +07:00
Kevin Ansfield 5b0e9826f7 Fixed tests 2019-11-08 11:14:04 +07:00
Rishabh Garg 7739adecaa
Added email settings to post settings menu (#1398)
no issue
2019-11-04 13:15:13 +07:00
Kevin Ansfield a35fa9e764 Merge branch 'master' into v3 2019-10-11 10:43:38 +01:00
Rish 3ecc6f68ca Renamed member require payment setting
no issue

Renames member setting `requirePaymentForsSignup` -> `allowSelfSignup` to match existing usage in members API
2019-10-11 14:10:37 +05:30
Kevin Ansfield facea619ee Merge branch 'master' into v3 2019-10-09 15:06:37 +01:00
Rish 677de7f317 Updated members lab settings design
no issue

- Extracts members lab settings from `Beta Features` section to its own section
- Adds new `fromAddress` field to members settings
2019-10-09 15:33:08 +05:30
Kevin Ansfield 276d4308f4 Merge branch 'master' into v3 2019-10-08 14:04:38 +01:00
Kevin Ansfield 8976e4ff3e Fixed tests 2019-10-07 11:17:16 +01:00
Naz Gargol 411b2fa232
Added PSM visibility input (#1344)
refs 80f7e0b19e

- Added visibility input in PSM to control content access level for members
- Added default post visibility in editor. To be changed (moved to server-side) once `defaultContentVisibility` is available in settings service
- Added `visibility` property to post model & mirage
2019-10-01 15:00:53 +02:00
Naz Gargol 8dff0ee6d4
🔥 Removed all subscriber feature related code (#1337)
refs https://github.com/TryGhost/Ghost/pull/11153

- Removed all subscriber feature related code
- The feature is being substituted by members
2019-09-26 15:58:01 +02:00
Naz Gargol f0d6adf416
🔥 Removed publicAPI feature flag related code (#1323)
no issue

- Changes are related to API v0.1 being completely gone and this flag won't be returned from API anywhere anymore
2019-09-13 16:11:37 +02:00
Rishabh Garg 09f0c0d2ee
Switched Admin API version from canary to v3 (#1317)
no issue

- Switches over to new v3 endpoint from canary
2019-09-03 12:40:27 +05:30
Kevin Ansfield a63943edd6
Added "What's new" indicator and modal to highlight recent updates (#1292)
no issue

- adds `whats-new` service that fetches the changelog from ghost.org and exposes the latest changelog entries
- trigger a background fetch of the changelog from ghost.org when first loading the admin when logged in, or after signing in
- adds a "What's new" menu item next to the user popup menu
- adds an indicator to the user menu button and what's new menu item if there are unseen changelog entries
- closing the changelog modal will update the "last seen date", clearing both indicators
2019-08-23 10:01:27 +01:00
Kevin Ansfield 6d13041fe5
Switched Admin API version from v2 to canary (#1291)
no issue

- Ghost-Admin is our primary API client, we should keep it in sync with the canary API branch to dog food our API changes
2019-08-12 09:56:21 +01:00
Kevin Ansfield 7c66d66551
🎨 Added auto-login to private site when viewing site preview in admin (#1286)
closes https://github.com/TryGhost/Ghost/issues/10995

- when first loading the site preview, if private mode is enabled submit the login form in the background to get the cookie before loading the iframe
- refactors post-authentication preloading to ensure it occurs before post-authentication route hooks are called
- adds `showSuccess` attribute to `<GhTaskButton>` so that when set to `false` it can stay in the running state after "success" to avoid state change flashes whilst waiting for a transition
2019-08-12 09:11:10 +01:00
Kevin Ansfield be07650154 Fix linting errors
refs https://github.com/TryGhost/Ghost-Admin/pull/1274

- fixes errors introduced from upgrading to eslint@6
2019-07-22 11:21:24 +01:00
Kevin Ansfield fdb4b46fd2 Updated for breaking changes in ember-cli-mirage@1.0.0 2019-05-27 09:58:33 +01:00
Kevin Ansfield fa8a08e40b
Removed usage of ember-light-table in subscribers screen (#1191)
no issue

`ember-light-table` is falling behind Ember.js and other addon development and is increasingly causing issues with Ember deprecations and addon incompatibility.

- swaps `ember-light-table` usage for a straightforward table using `vertical-collection` for occlusion
- uses the same loading mechanism as the members screen with a slight optimisation where the initial load will fetch subscribers in batches of 200 until they are all loaded
- removes now-unused pagination mixin
- fixes duplicate subscriber validation handling
2019-05-07 12:39:56 +01:00
Kevin Ansfield 0a76e3e4b6
Removed coveralls code-coverage reporting (#1190)
no issue
- coverage reports were not really being used and were frequently ignored when merging PRs because we knew there were reductions in test coverage
- coveralls also causes some problems with Renovate because there can be random micro changes in reported coverage that meant a PR "failed" when really it was fine
2019-05-06 12:02:23 +01:00
Peter Zimon ca5f9f1f6e Improved theme upload/activate flow and error styles (#1142)
no issue 

* Update error and warning styles
* Refined upload dialog
* Theme upload and activation style refinements
2019-04-05 17:27:14 +01:00
Kevin Ansfield f0ad9dcdc4 🐛 Fixed missing error notification when attempting to activate an invalid theme
no issue
- updates error handling to work with new v2 error response formats
  - `.errorType` -> `.error`
  - `.errorDetails` -> `.details`
2019-03-25 11:32:29 +00:00
Kevin Ansfield 78b67968a3 Removed unused `forceI18n` attribute from the settings model 2019-03-07 09:10:46 +00:00
Kevin Ansfield 850d56e60e
Renamed ghostHead/Foot settings to codeinjectionHead/Foot (#1107)
closes https://github.com/TryGhost/Ghost/issues/10560
- match changes in the API
2019-03-05 10:40:19 +00:00
Rish 248c20c42a Removed mock members API config
no issue
2019-03-05 11:45:43 +05:30
Kevin Ansfield f90811e994 Updated post list preview to use `excerpt` instead of `plaintext` 2019-02-26 13:37:23 +07:00
Kevin Ansfield a5c69cc86d Removed usage of /configuration/timezones/ endpoint
no issue
- replaced timezones endpoint with `@tryghost/timezone-data` module
2019-02-26 12:37:50 +07:00
Kevin Ansfield 4ab77cbb21 Fixed "Authorization Failed" error screens when not logged in
no issue
- `/config/` can only be requested when authenticated
- updated `/config/` mock to look for an Authentication header and return a 403 if it's missing
- updated `ajax` service to add an `Authentication` header when authenticated in testing env (cookies are not present when testing)
- updated `config` service to add `fetchUnauthenticated()` and `fetchAuthenticated()` methods in addition to `.fetch()`
- updated `application` route to only fetch authenticated config when authenticated
- updated `signin` controller to correctly fetch config after sign-in
2019-02-26 10:38:00 +07:00
Kevin Ansfield 17854c6c81 Disabled mirage logging in tests to fix Travis runs 2019-02-26 09:45:29 +07:00
Kevin Ansfield e3d5689fe1 Updated gh-uploader to work with new /images/upload/ endpoint 2019-02-25 23:01:49 +07:00
Kevin Ansfield 3cf7912ab0 Removed use of `?include=tags,authors,authors.roles` query param on post/page requests
no issue
- Admin API v2 now includes tags and authors by default
2019-02-25 21:55:55 +07:00
Kevin Ansfield b34269b66c Updated config service to use new /site/ and /config/ endpoints 2019-02-25 21:47:17 +07:00
Kevin Ansfield c405f5c351 Removed usage of /configuration/private/ endpoint 2019-02-25 19:20:17 +07:00
Kevin Ansfield 75753b17cb Implemented first pass of member details screen 2019-02-22 18:32:09 +07:00
Nazar Gargol df5134deba Updated /images* response structure
refs #10438
2019-02-22 18:16:25 +07:00
Nazar Gargol 8f03ac3611 Renamed /uploads* endpoints to /images*
refs #10438
2019-02-22 18:16:25 +07:00
Kevin Ansfield 5254488121 Fixed custom integrations tests 2019-02-22 11:11:15 +07:00
Kevin Ansfield f8b03f50b6
🎨 Separated post and page list screens (#1101)
no issue
- added `page` model
- removed `page` param from Post model
- added pages screen with associated links
- added `:type` param to editor screens to work with the right models
- removed post<->page toggle and associated tour item
2019-02-22 10:17:33 +07:00
Sumedh Nimkarde 1cf7e576d9 🐛 Fixed Unsplash image selector being empty when first opening (#1100)
closes https://github.com/TryGhost/Ghost/issues/10455
- call `loadNew()` when initialising the `unsplash` service. Services are lazy-initialised so this is only called when the service is first injected which happens when the `<GhUnsplash>` component is first rendered
2019-02-06 10:40:34 +00:00