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

48 commits

Author SHA1 Message Date
Nazar Gargol
80501a5c75 Removed post specific fields from page model serializer 2019-11-05 18:43:26 +07:00
Kevin Ansfield
da5d4e7131 Display "sent" info in publish menu 2019-11-04 16:13:18 +07:00
Kevin Ansfield
a35fa9e764 Merge branch 'master' into v3 2019-10-11 10:43:38 +01:00
Rish
f0c906f289 Enabled write operation for member name and note
no issue

- Allows editing member's name and note in admin
2019-10-10 17:29:35 +05:30
Kevin Ansfield
276d4308f4 Merge branch 'master' into v3 2019-10-08 14:04:38 +01:00
Naz Gargol
6bbe7bb3d4
Content visibility configuration in labs (#1346)
no issue

- Changed members description to less verbose
- Added content visibility radio options to members configuration screen
- Moved setting of default visibility to server-side
- Default visibility setting when PSM is opened before making the first request to the server
2019-10-02 11:13:59 +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
Kevin Ansfield
996cc166ef 🐛 Fixed error when creating subscribers via the admin area
refs https://github.com/TryGhost/Ghost/issues/10569
- updates the Subscriber serialiser to strip the `status` property from the API request when saving if it's falsy
2019-03-06 09:19:39 +00:00
Kevin Ansfield
f90811e994 Updated post list preview to use excerpt instead of plaintext 2019-02-26 13:37:23 +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
Kevin Ansfield
fe1365d03e Fixed missing invite role name on team screen
no issue
- removed the rename of `role_id` to `role` in the invite serialiser to let Ember Data do it's thing with the `invite.role` relationship
- added a guard to the team screen background reloading to ensure that role data is present in the store before loading invites so that Ember Data doesn't trigger unnecessary requests to find missing relationship data
2019-01-14 17:01:30 +00:00
Kevin Ansfield
edc36c0a55 Fixed serialisation of belongsTo relationships
no issue
- `belongsTo` relationships were failing to save on the server correctly because they did not contain the `_id` suffix
  - became noticeable when the first standalone `belongsTo` relationship was added to webhooks
  - added conditional for special-case `_by` relationships which don't require an additional `_id` when saving to the API
2018-10-18 18:23:19 +01:00
Kevin Ansfield
519b736015
Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

- `integration`, `api-key`, and `webhook` models and respective mirage mocks
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- adds custom integrations list to integrations screen
- adds custom integration screen
  - allow editing of integration details
  - show list of webhooks
  - webhook creation modal

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield
426e5a872d 🐛 Fixed plaintext field not being updated when modifying a post
refs https://github.com/TryGhost/Ghost/issues/9512
- if values for auto-generated fields are passed to Ghost via the API then those values will override any auto-generated value and be saved to the database
- add `plaintext` attribute to list of attributes we strip when serialising to avoid the issue until Ghost has appropriate protections in place
2018-04-09 14:58:33 +01:00
Kevin Ansfield
7fa52be861 Don't send created_by and updated_by attrs in API requests
refs https://github.com/TryGhost/Ghost/issues/9548
- refactor serialisers to use `serialize` rather than `serializeToHash` to avoid code duplication
- strip `created_by` and `updated_by` attrs when serializing - Ghost will set these automatically based on the currently logged in user
2018-04-05 11:54:36 +01:00
Kevin Ansfield
38b138d759 Use token input to allow selection of multiple authors in PSM
requires https://github.com/TryGhost/Ghost/pull/9426
- fixed default token component display in {{gh-token-input}}
    - if no `tokenComponent` is passed to `{{gh-token-input}}` then it should default to the ember-drag-drop `draggable-object` component but instead it didn't output anything
    - put `draggable-object` in quotes because `{{component}}` needs a component name rather than an object
    - rename `option` attribute to `content` to match the default `{{draggable-object}}` interface
- add embedded `authors` attr to the Post model
    - ensure authors is populated when starting new post
    - add validation for empty authors list
- swap author dropdown for a token input in PSM
- show all post authors in posts list
- update tests for `authors`
  - always provide through an authors array
  - fix mirage serialisation for paginated responses (embedded records were not being serialised)
- unify tags and author inputs design
  - remove highlight of primary tags
  - highlight internal tags
  - remove unnecessary/redundant title attributes on tags
  - use SVG icon for "remove option" button in token inputs
2018-03-27 18:50:52 +01:00
Kevin Ansfield
3da1702af9 Fix Ember deprecations and warnings (#895)
no issue 

- `controller.content` will no longer be an alias to `controller.model`
- split relationships and `attrs` in Post model, add missing transforms
- fix unknown `error` field in payload warning when `/users/me` returns 404 during tests
- fix unsafe style binding warnings
2017-10-13 16:39:49 +07:00
Kevin Ansfield
c994022511 🐛 Fixed error when navigating to tag from admin search box (#881)
closes https://github.com/TryGhost/Ghost/issues/9074

- remove unused pagination route attrs that were interfering with routing service - these were a pre-1.0 hangover from when the tags screen had infinite scroll
- change `Posts` to `Stories` in the search dropdown for consistency
- add general fix for `adapter returned an array for the primary data of a 'queryRecord' response` deprecations by ensuring that `normalizeResponse` in our application serializer transforms the array we get from the server into a "single" JSON-API response
  - this deprecation was being triggered when loading a tag route directly
- fix `defaultValue` complex object deprecations raised from `Setting.unsplash` attr
2017-10-03 11:54:24 +07:00
Kevin Ansfield
88449ed639 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00
Kevin Ansfield
7eefbba69f 💄🐷 sort-imports eslint rule (#712)
no issue

- adds `eslint-plugin-sort-imports-es6-autofix` dependency
  - implements ESLint's base `sort-imports` rule but has a distinction in that `import {foo} from 'bar';` is considered `multiple` rather than `single`
  - fixes ESLint's autofix behaviour so `eslint --fix` will actually fix the sort order
- updates all unordered import rules by using `eslint --fix`

With the increased number of `import` statements since Ember+ecosystem started moving towards es6 modules I've found it frustrating at times trying to search through randomly ordered import statements. Recently I've been sorting imports manually when I've added new code or touched old code so I thought I'd add an ESLint rule to codify it.
2017-05-29 20:50:03 +02:00
Katharina Irrgang
37689059af 🎨 settings model inconsistency (#669)
requires https://github.com/TryGhost/Ghost/pull/8381
- all camelCase settings model attribute names received from the API are now underscore_case
- discussed here https://github.com/TryGhost/Ghost-Admin/pull/661#discussion_r112939982
2017-04-24 18:42:43 +01:00
Katharina Irrgang
4d2441873f 🎨 rename last_login to last_seen (#612)
refs https://github.com/TryGhost/Ghost/issues/8258
2017-04-05 20:20:45 +01:00
Kevin Ansfield
c43974c14b fetch themes from /themes endpoint (#542)
refs https://github.com/TryGhost/Ghost/pull/8022

- use `/themes` API endpoint to fetch list of themes instead of `settings[0].availableThemes`
2017-02-21 18:28:44 +00:00
Kevin Ansfield
601e9dd2aa Remove UUID attrs from all models except Post (#404)
refs https://github.com/TryGhost/Ghost/issues/7494
- remove `uuid` attrs from all models except Post
- remove uuids from mirage factories and fixtures
- add a workaround for tags where the selectize-based tags input on the PSM relies on a unique identifier for each tag which doesn't get sent back to the server when saving (fixes the broken tags input caused by uuid removal in https://github.com/TryGhost/Ghost/pull/7495)
2016-11-17 11:38:47 -06:00
Katharina Irrgang
75623f7016 🎨 invites roles table into a field on the invites table (#394)
refs https://github.com/TryGhost/Ghost/issues/7432
- invite.role instead of invite.roles
- be able to serialize/deserialize response from and request to server
- server returns role_id
2016-11-16 11:01:58 +00:00
Kevin Ansfield
4a604ce64f Update code to match eslint rules
no issue
- switch `jscs` and `jshint` inline config to `eslint` config
- fix eslint errors, predominantly in tests where the config now the main app config more closely
2016-11-14 13:26:00 +00:00
ivan sebastian
85e4789beb Fix delete post (#372)
closes TryGhost/Ghost#7599
- when deleting a post we don't have a pluralised root in the response, adds a guard to ensure we don't throw an error
2016-11-03 13:39:40 +00:00
Kevin Ansfield
87e1c5afa5 use ember-ajax in place of ember-data's networking (#283)
closes #7014
- uses the `AjaxServiceSupport` mixin from `ember-ajax` to replace Ember Data's internal `ajax` method with our own ajax service
- normalizes all error handling to use `ember-ajax` style errors
- default to the `application/vnd.api+json` content-type so that we don't have a mix of urlencoded and plain JSON content
- fix `normalizeErrorResponse` in our `ajax` service so that it doesn't add an empty `errors` array to payloads
2016-09-26 11:59:04 -05:00
Kevin Ansfield
5913827646 Separate invites and users (#277)
closes https://github.com/TryGhost/Ghost/issues/7420, requires https://github.com/TryGhost/Ghost/pull/7422
- adds a new `Invite` model with associated serializer and test setup
- updates team screen to use invites rather than existing users with the "invited" property
- updates signup process to work with new invite model
- updates setup process to create invites instead of users
- swaps usage of `gh-select-native` for `one-way-select` in the invite modal so that attributes can be set on the `select` element
- updates resend invite process to account for server returning a new model
- rewrites the invite management tests and fixes mirage mocks for invite endpoints
- sorts invites by email address to avoid jumping invites when re-sending
2016-09-26 18:03:53 +02:00
Kevin Ansfield
195bca322a 🐛 fix duplicate server alerts + default alert bg color (#242)
closes https://github.com/TryGhost/Ghost/issues/7305

The `location` property of server-side notifications was being ignored by the client and so wasn't being used to de-duplicate alerts.

- adds `key` attribute to `Notification` model
- adds a serializer for notifications that renames the `location` key sent by the server to `key`
- set the default background color of alerts to white so that alerts with no `type` set do not inherit the background color (useful in Ghost Desktop which has a transparent background color set)
2016-09-01 11:01:54 -05:00
Austin Burdine
a9ce94de9f convert ember imports to ember-cli-shim imports where possible (#95) 2016-06-30 11:21:47 +01:00
Aileen Nowak
dd8d3507f0 Renaming date properties to contain UTC
closes TryGhost/Ghost#6985

- renames all date properties to end with `UTC`:
	- `publishedAt` in `post` model
	- `createdAt` in `post`, `role`, `subscriber`, `tag` and `user` model
	- `updatedAt` in `post`, `role`, `subscriber`, `tag` and `user` model
	- `unsubscribedAt` in `subscriber` model
	- `lastLogin` in `user` model
- adds `attrs` transforms in matching serializers `post`, `tag` and `user`
- new serializers files for `subscribers` and `role` to add `attr` transforms
- adds unit tests for all serializers
- use two variables in `post-settings-menu` controller to handle blog-timezone adjusted date as well as UTC date
2016-06-17 11:09:21 +02:00
Austin Burdine
ed2c5f328d deps: grunt-jscs,ember-suave@3.0.0
replaces #41, #60
- update ember-suave and grunt-jscs to 3.0
- standardize Ember global de-structuring rules across app & tests
2016-06-11 13:39:31 -06:00
Kevin Ansfield
604fda4348 Update package.json details, rename module to ghost-admin
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Kevin Ansfield
084df31ca1 Fix redirect to posts list when saving a new post as an author
no issue
- replace deprecated `normalizeHash` with `normalize` in post serializer
- ensure we check for both `post` and `posts` properties as it will vary depending on the expected response type
2016-04-13 12:28:11 -05:00
Kevin Ansfield
07847bed3b deps: ember-data@2.4.2
no issue
- https://github.com/emberjs/data/releases/tag/v2.4.1
- https://github.com/emberjs/data/releases/tag/v2.4.2
- uses the new public import path for `EmbeddedRecordsMixin` (http://emberjs.com/blog/2016/03/13/ember-data-2-4-released.html#toc_importing-modules - note that the module naming there isn't quite right)
2016-03-21 16:37:42 +00:00
Austin Burdine
ec79609d80 fix underscore usage in post serializer
closes #6512
- because of the keyForAttribute method in the application serializer, the hash property must be snake_case
- change the normalize method to the more concise normalizeHash method available on the rest serializer
2016-02-16 09:37:15 -06:00
Kevin P. Kucharczyk
24cc72cafd Standardise client property names to camelCase
closes #6018
- added keyForAttribute method in application serializer
- override keyForAttribute in settings serializer to not apply camelCase/underscore conversion
- rename under_scored properties to camelCased
2016-01-23 19:12:22 +01:00
Kevin Ansfield
e30e178c4f deps: ember-data@2.3.2
no issue
- updates ember-data dependency and switches to direct es6 module import instead of destructuring assignment
- fixes issue with `authenticationFailed` action being called before transitions have finished
2016-01-19 14:36:39 +00:00
Austin Burdine
f9b4c89e51 deps: ember/ember-data@2.2.0 2015-11-30 12:23:47 -06:00
Kevin Ansfield
7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Kevin Ansfield
91e86bde61 Update client for tag.post_count -> tag.count.posts rename
refs #6105
- adds `raw` ember-data transform to handle standard JSON `count` attribute
- update mirage factory to return correct `count.posts` format
- rename all uses of `post_count` to `count.posts`
2015-11-23 19:57:56 +00:00
Kevin Ansfield
fbb92476f0 Ember-cli, Ember, & Ember Data 1.13.x upgrades
closes #5630
- upgrade ember-cli to latest version
- upgrade ember to latest 1.13.x release
- upgrade ember data to latest 1.13.x release
    - update custom adapters and serialisers for new internal JSON-API compatible formats [(docs)][1]
    - update all store queries to use new standardised query methods [(docs)][2]
    - add ember-data-filter addon ready for store.filter removal in ember-data 2.0 [(docs)][3]
- remove use of prototype extensions for computed properties and observers
- consolidate pagination into a single route mixin and simplify configuration

[1]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_transition-to-the-new-jsonserializer-and-restserializer-apis
[2]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_simplified-find-methods
[3]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_ds-store-filter-moved-to-an-addon
2015-10-06 16:09:05 +01:00
Kevin Ansfield
d127d79019 Standardize on var-less export default across ember app
no issue
- drops the `var Foo = Ember.Thing.extend({}); export default Foo;` syntax in favour of exporting directly, eg: `export default Ember.Thing.extend({})`
- discussion on this change [here](https://github.com/TryGhost/Ghost/pull/5340#issuecomment-105828423) and [here](https://github.com/TryGhost/Ghost/pull/5694#discussion-diff-37511606)
2015-10-06 10:59:50 +01:00
Austin Burdine
5f28034189 update Ember to 1.12.1/ember-data to 1.0.0-beta.18
No issue
- fixed "{{#each}}" helper in templates to use block syntax
- fixed deprecated ember.controller getter/setter function to use new syntax
- removed unnecessary pass-protect route view
2015-06-02 22:26:16 -06:00
Matt Enlow
e20fdfebe8 Normalize settings payloads in client serializer
Closes #5117
2015-04-08 13:03:56 -06:00
Matt Enlow
55472b143f Ember init, bower deps, es6 modules 2015-03-11 12:37:41 -06:00
Matt Enlow
6bbc62d3c2 The great migration (EAK -> ember-cli) 2015-03-11 12:37:41 -06:00