Commit Graph

3351 Commits

Author SHA1 Message Date
Kevin Ansfield
990ecec873
Added caption support to code card renderer (#10719)
* Added caption support to code card renderer

refs https://github.com/TryGhost/Ghost-Admin/pull/1181

- when a caption for a code card is provided, render the contents inside a `<figure>` element with a `<figcaption class="kg-card kg-code-card">` to match other caption-enabled cards
2019-05-01 17:10:24 +02:00
Nazar Gargol
d0970ad309 Removed lts update check flag
no issue

- `lts` parameter support was discontinued as of today. Returned data completely relies on `ghost_version` sent with the update check request
2019-05-01 16:00:53 +02:00
Nazar Gargol
27dae4022c 🐛 Fixed meta schema for 'page' context in dynamic routing
refs #10082

- When specifying an existing page as an allias for collection, e.g: `data: page.it-is-a-page` it was failing to generate metadata
2019-04-30 18:20:20 +02:00
Nazar Gargol
f5c1ed8fcb 🐛 Fixed 404 in collection index page if using data.slug
closes #10542

- Fixed error that was causing collection index to not be rendered: relations connected to alliased resource were not fetched
2019-04-30 18:20:20 +02:00
Florian Schlittenbauer
8eb4d4c888 replace deprecated del() with delete() call 2019-04-29 09:09:55 +02:00
Zimo
a6d7c46f2c Updated members payment failed copy and style
no-issue
2019-04-25 15:54:30 +02:00
Fabien O'Carroll
bf90733ce1 Updated token generation to use plans on member
no-issue

This is to remove duplication of logic, that now lives solely in the
getMember method
2019-04-25 13:38:26 +02:00
Fabien O'Carroll
70343f7923 Updated getMember to return plans
no-issue

Plans are distinct from subscriptions, as in theory a subscription could
have many plans. These moves the construction of the plans array into
the getMember function so that every consumer has access to the same
data.
2019-04-25 13:38:26 +02:00
Rish
b207ea35ec Updated signup flow to handle invalid payments
no issue
2019-04-24 13:23:00 +02:00
Fabien O'Carroll
7574d9af68 Added members-theme-bindings library to public
no-issue

This file is copied across on install, making it easy to update via
package.json, tbh we could not commit it to the repo - but it makes
sense to be able to see it when browing the file explorer. Any bumps in
package.json will update the file, so that it is prompted to be
commited.
2019-04-24 12:46:00 +02:00
Fabien O'Carroll
18ba613e45 Added member.js file to initialise theme bindings 2019-04-24 12:46:00 +02:00
Fabien O'Carroll
8689493cf5 Updated ghost_head to include the members scripts
no-issue

This conditionally adds the members scripts based on the labs setting
for members, and the context of the rendering to NOT be for AMP
2019-04-24 12:46:00 +02:00
Fabien O'Carroll
d638d6e979 Added middleware for serving members.js from core
no-issue
2019-04-24 12:46:00 +02:00
Fabien O'Carroll
ed1a42f7f3 Exported raw middleware from serve-public-file
no-issue

The current public file middleware handles route matching itself, which
means it is applied to express via the use method. Due to use being a
"global" application of middleware, this means it is not possible to
apply a labs middleware before the public file serving middleware
without it affecting the entire route stack.

This commit exports a piece of raw middleware that can be used with the
get method of express, so that we can attach middleware beforehand.

This will be used to conditionally serve the members specific public
files, based on the labs flag for members.
2019-04-24 12:46:00 +02:00
Fabien O'Carroll
d7fadfeff7 Fixed bug with deleting members after config change 2019-04-24 12:46:00 +02:00
Fabien O'Carroll
235d6a0366 Refactored labs middleware to remove duplication
no-issue

Also exposes a generic interface now.
2019-04-24 12:46:00 +02:00
Nazar Gargol
cb322fc1be Improved error context usage
refs #10571

- Change was done to avoid usage of hardcoded value and provide more context. Additionally errorDetails are formatted in a readable way
2019-04-23 09:45:11 +02:00
Nazar Gargol
63337dd823 Changed context used in error to help
refs #10571

- The context should provide the context in which the error has happened instead current value was more suited to purposes of help
2019-04-23 09:31:24 +02:00
Nazar Gargol
cea598597b Restructured theme check logic
refs #10571

- Removes dependency on 'context' property being set in error when
checking a theme
- Refactoring was needed to be able to avoid passing checked theme as a
part of thrown error (logic was relying on error having this specific
data in context property). This created a problem where we controlled
the logic flow with data in error object.
- Introduced 2 different types of theme check handling, one behaves the
same way as before, the other gives more granulac control to the caller
to decide what to do with returned errors.
2019-04-22 22:34:12 +02:00
Vikas Potluri
d989d62c10 Migrated encode, facebook_url and foreach helpers to es6 (#10655)
refs #9589 

* updated encode helper to use newer code standards
* updated facebook_url helper to use newer code standards
* updated foreach helper to use newer code standards
2019-04-22 17:54:42 +02:00
ml4den
8732d40967 Fixed a typo for non-verb "setup" (#10680)
no-issue
2019-04-22 17:47:28 +02:00
Rishabh Garg
8191513a86 Updated members site config keys (#10702)
no issue
2019-04-22 17:23:58 +02:00
Nazar Gargol
2253b2d18c 🐛 Fixed redirect for pages causing 404
closes #10649

- `resourceType` in API v0.1 is only of 'post' type. Because in admin we now distinguish between 2 types of editable resources: 'posts' and 'page' the redirect has to be based on 'entry.page' flag
2019-04-22 15:08:09 +02:00
kirrg001
ab49d1eed6 Added comments for routing service
no issue

- jsdoc
- inline comments
2019-04-21 23:55:22 +02:00
kirrg001
e07c0ecdc4 Added comments for url service
no issue

- jsdoc
- inline comments
2019-04-21 00:14:40 +02:00
Nazar Gargol
e1dca54bf7 🎨 Made notifications dismissible per user
refs #10656

- To make sure more users see important updates or announcements
notification dismissal now works per user instead of globally
- Expanded acceptance test for notification deletion
- Expanded regression test covering multiuser dismissal of notification
- Added clarifying comment about destroyAll method use in API
2019-04-19 09:43:14 +02:00
Fabien O'Carroll
39ed3f9145
Updated members auth pages to use gateway-protocol (#10695)
no-issue

This swaps out a hand copied library with the published one on npm
2019-04-18 15:53:36 +02:00
Nazar Gargol
809e610842 Added notification access persmission for users of Editor role
closes #9546

- Updated permissions  fixture for Editor role
- Added migration for permissions for Editor users
- Updated tests
2019-04-18 13:02:23 +02:00
kirrg001
6dd65d7176 Corrected general comment in update check unit
no issue
2019-04-17 20:52:50 +02:00
kirrg001
22c2d0cbcb Added comments for update check service
no issue

- jsdoc
- inline comments
- clarified variable names
2019-04-17 20:03:26 +02:00
Zimo
5a0113f24c Added close event on member pages background click 2019-04-17 16:34:14 +02:00
Peter Zimon
fb8a127729
Members refine buttons (#10692)
* Members: disabled signup button during signup

* Members: disabled non-Stripe signup button during signup

* Members: added check to Log in button logged in state
2019-04-17 16:16:03 +02:00
Zimo
01fa787227 Updated mobile styles for members upgrade screen 2019-04-17 16:06:04 +02:00
Rish
db9c2d1eca Fixed lint issues
no issue
2019-04-17 18:26:32 +05:30
Nazar Gargol
c519ce55e3 Fixed failing integration test
refs #9875

- Moved the comment about filtering by version closer to version checks as it doesn't apply to whole `.filter(...)` block
2019-04-17 14:48:09 +02:00
Rishabh Garg
876e310aea
Updated check for members-ssr use at theme layer (#10693)
no issue

### Context

As part of updating the theme layer to use members-ssr [here](f9899cb8c4), we introduced a case where if `enableDeveloperExperiments` is not switched on, the whole theme loading will crash due to unavailability of `ssr` property on members service [here](https://github.com/TryGhost/Ghost/blob/master/core/server/services/members/index.js#L12). Since we switch on `enableDeveloperExperiments` by default on master now, the issue won't be reproducible locally until explicitly switched off. 

This PR includes a patch fix which adds dummy `ssr` object to members service `api` object and members middleware check on APIs to ensure no crash in case developer flags is not switched on. 

Longer term it will be definitely useful to upgrade the dummy `api` object to trigger on member labs than the developer flag.
2019-04-17 17:38:12 +05:30
Fabien O'Carroll
5cb8972e2c Fixed subscription issue with null coupons
no-issue

Coupons were being sent as null to the api, so we support non required fields
2019-04-17 13:41:27 +02:00
Rish
ab3b0d95a2 🐛 Fixed fetching RSS in case of posts with no content
refs #10679

- Handles `null` html values in calculation
2019-04-17 15:12:01 +05:30
Fabien O'Carroll
500ec826c3 Added default disabled state of false to FormInput
no-issue
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
78165a9981 Removed unused onClick handler in StripeSubscribePage
no-issue
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
4d9ddbf77a Added coupon support to StripeSubscribePage
no-issue

Only shows the (disabled) input when a coupon is available
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
feee3dc58f Cleaned up render{Subscribe,Upgrade}Page
no-issue

- ensured promises are returned
- removed unused prop
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
0970fa6a6d Added CouponInput component
no-issue

This can be used in the subscribe pages to pass coupon info through
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
b28f3a02d9 Added support for disabled form elements
no-issue

This can be used for a coupon input in future
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
88368d0d94 Updated members api and gateway to pass coupo
no-issue

This will allow the auth pages and members sdk to pass coupons through
to the api.
2019-04-17 10:35:17 +02:00
Fabien O'Carroll
cdc3971ed8 Passed coupon from metadata through to stripe
no-issue

This will allow us to send through coupons from the api layer and have
stripe handle the rest :)
2019-04-17 10:35:17 +02:00
Rish
b377549bc7 Added spinner on member signup pages
no issue
2019-04-16 23:22:15 +05:30
Rish
874fceb077 Updated member signin page to show logged in status
no issue
2019-04-16 22:42:16 +05:30
Nazar Gargol
1211c70eb3 🐛 Fixed Ghost out of date notification
closes #9875

- The solution here is a quick patch and should be cleaned up once https://github.com/TryGhost/Ghost/issues/10236 is implemented
2019-04-16 18:29:51 +02:00
Zimo
17bc79d57e Added fade in for signup complete page 2019-04-16 17:51:16 +02:00