Commit Graph

6 Commits

Author SHA1 Message Date
Kevin Ansfield
1ad2c05d37 Bumped eslint-plugin-ghost and fixed linter errors
no issue

- new linting rules that needed fixing:
   - calling `super` in lifecycle hooks
   - no usage of String prototype extensions
2021-07-15 15:27:29 +01:00
Kevin Ansfield
1447a57aa8 Fixed enter key in brand accent form triggering error
no issue

- pressing enter in the accent field would attempt to submit the form and trigger the confirm action
- no confirm action was present on the modal component meaning the base modal confirm action would trigger a invalid usage error
- we don't want enter in the accent field to save, instead we want to blur the element and trigger a preview update
2021-06-18 09:42:32 +01:00
Kevin Ansfield
66f6d25d4b 🐛 Fixed blank branding preview on split front-end/admin domain setups
no issue

- the POST request made to fetch the preview was going to the non-trailing-slash version of the site URL which was resulting in a redirect to the trailing-slash version which then failed due to CORS
2021-06-01 10:46:28 +01:00
Kevin Ansfield
e584569914 Switch deprecated htmlSafe imports from @ember/string to @ember/template
no issue

See https://deprecations.emberjs.com/v3.x#toc_ember-string-htmlsafe-ishtmlsafe
2021-05-12 12:33:40 +01:00
Rishabh Garg
85c2628049 Added validation to not allow empty accent color (#1863)
closes https://github.com/TryGhost/Team/issues/535

To ensure accent color is always set for a site, this updates brand settings screen and launch wizard to not allow empty accent color to be set or updated, adding the relevant error on the page which needs to be fixed before saving or continuing on the screens.

- Shows error message for empty accent color on brand settings and launch wizard
- Shows error message for invalid accent color on brand settings and launch wizard
- Blocks save and continue with invalid/empty accent color on brand settings and launch wizard

Co-authored-by: Peter Zimon <zimo@ghost.org>
2021-03-09 23:55:06 +05:30
Kevin Ansfield
3cd1eb5826 Standardised brand settings form behaviour
closes https://github.com/TryGhost/Team/issues/506

- launch wizard and brand settings both shared the same design and behaviour for customising brand settings but used duplicated code that had diverged
- extracted the more up-to-date behaviour from the launch wizard into a component
- updated brand settings and launch wizard to use the new component

changes to brand settings modal behaviour:
- preview is no longer interactive
- switches to using iframe contents replacement instead of `postMessage`
2021-03-02 17:10:43 +00:00