Commit Graph

77 Commits

Author SHA1 Message Date
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 9f9273fafc Renamed `defaultLocale` setting to `lang`
refs https://github.com/TryGhost/Ghost/issues/10318

- API has been updated to still work with `default_locale` for backwards compatibility but it makes sense for the client to match the underlying settings keys
2020-06-24 15:27:17 +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
Rish 4ed4f71c71 Removed redundant reset value for task buttons
no issue

- Since task buttons by default have reset on now, we don't need to explicitly add it to individual buttons
2020-06-04 19:23:59 +05:30
Kevin Ansfield 69e5cdb5e9 Reduced unnecessary waiting in tests
no issue

- fixed `<GhTaskButton>` not resetting after an externally triggered task run such as when pressing Cmd+S
- cleaned up manual timeouts/resets where button reset is now fully handled by `<GhTaskButton>` (these were causing 2.5s waits each time a save occurred in acceptance tests)
- where manual timeouts were required, reduce testing time from >2.5s to 50ms
2020-05-11 11:37:35 +01:00
Rishabh Garg 825161422f
💄Updated save buttons to reset state (#1522)
* Updated save buttons to reset state

no issue

Currently the save buttons across Admin don't auto-reset to idle state after success/failure on run which can give false impression once user changes any value. This PR auto-resets the button to idle state after a fixed timeout if no subsequent action is performed as a short term UX improvement.

* Fixed success check for auto reset

* Updated timeout value

* Added explicit save button reset for pages

* Updated save buttons to reset via shortcut

Auto-reset for save buttons wasn't working if not done through manual click on task button previously, this handles by splitting the original save task in controller to handle shortcut saves.

* Updated reset check for only successful tasks

* Added save reset to code-injection and design settings

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2020-04-06 16:17:28 +05:30
Kevin Ansfield f529296129
Migrated to `<AngleBracketSyntax />` (#1460)
no issue

Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md

We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.

This simplifies the rules for what template code is referring to...

`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)

- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
  - `app/templates`
  - `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
  - `gh-feature-flag`
  - `gh-tour-item`
  - `gh-cm-editor`
  - `gh-fullscreen-modal`
  - `gh-task-button`
- updates some code that was missed in aaf9f88ebc to use explicit this
2020-01-16 15:14:03 +00:00
Rishabh Garg 9298e30562
Added new brand color publication setting (#1409)
no issue

Reads new brand primary color setting and adds UI to modify/update it behind the dev flag
2019-12-17 16:37:34 +05:30
Kevin Ansfield 403bac5876 Converted <GhErrorMessage> to glimmer component
no issue

- fixes `isVisible` deprecation warning that was showing up for every component invocation since the Ember 3.14 upgrade
2019-12-13 16:12:04 +00:00
Kevin Ansfield aaf9f88ebc Ran "no implicit this in templates" codemod
no issue

We were in a part-way state where some touched files had been (sometimes partially) migrated to explicit `this`. The codemod that was available has now fixed the formatting issues it had so it was a good time to run it.

https://github.com/ember-codemods/ember-no-implicit-this-codemod

- part of the migration path for https://github.com/emberjs/rfcs/pull/308
- starts to make template resolution rules more explicit
  - `<MyComponent />` - always a component
  - `{{my-component}}` - component or helper (components _must_ have a `-`. This style of component will go away once fully migrated to angle bracket components)
  - `{{value}}` - a helper or local template variable
  - `{{this.value}}` - reference to a property on the backing context (either a controller or a component JS file)
2019-12-13 14:20:29 +00:00
Kevin Ansfield 296dc30aa1
Added global meta data and Twitter/Facebook card settings (#1287)
closes https://github.com/TryGhost/Ghost/issues/10921

- added new fields to settings model
- added "Site meta settings" section to general settings
2019-08-21 16:16:59 +01:00
Aileen Nowak f65460694a 🔗 Updated docs api links to be version-less 2019-07-25 15:15:31 +08:00
Aileen Nowak b134b24679
Updated links to docs (#1276)
no issue
2019-07-22 16:53:24 +08:00
Peter Zimon 183e22e0bf 🎨 Updated admin area design and usability (#1232)
refs. https://github.com/TryGhost/Team/issues/205

Major update to Ghost Admin UI including:
- improved general consistency (typography, colors and contrast, UI components, icons)
- new design for post and pages lists, improved discoverability of filters 
- search moved to modal
- account menu is decoupled from ghost logo
- further usability fixes
2019-06-18 11:47:20 +01:00
John O'Nolan aa9424e3e5
Updated to new Twitter username placeholder 2019-04-11 14:33:15 +02:00
Kevin Ansfield 87e5778c33 🐛 Fixed vague upload error messages on General and Labs setting screens
no issue
- API now returns the "useful" error message in `error.context` rather than `error.message`
- updated `{{gh-uploader}}` to expose `context` on errors
- updated error display to try using `context` with a fallback to `message`
2019-03-07 13:40:38 +00:00
Kevin Ansfield d2a112723b Fixed general settings acceptance test 2019-02-26 09:15:19 +07:00
Kevin Ansfield e3d5689fe1 Updated gh-uploader to work with new /images/upload/ endpoint 2019-02-25 23:01:49 +07:00
Nazar Gargol 8f03ac3611 Renamed /uploads* endpoints to /images*
refs #10438
2019-02-22 18:16:25 +07:00
Hannah Wolfe bcd8f485ad
Updated docs links to best equivalents (#1097)
- Our documentation has been overhauled, this updates the all the old links sprinkled through Ghost-Admin
2019-01-16 16:03:33 +00:00
Kevin Ansfield 05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield 479b187ac0
Remove ember-one-way-controls (#959)
closes https://github.com/TryGhost/Ghost/issues/9386
- remove usage of `{{one-way-checkbox}}` in favour of direct HTML+handlebars
- add `{{gh-text-input}}` that inherits from Ember's built-in `TextInput` component along with our custom `TextInput` mixin
- swap all uses of `{{gh-input}}` for `{{gh-text-input}}
- remove `{{gh-input}}` component
- update `{{gh-textarea}}` to inherit from Ember's `TextArea` component instead of `OneWayTextarea` and update all component uses accordingly
- update `{{gh-trim-focus-input}}` to inherit from `{{gh-text-input}}` and update all component uses accordingly
- standardize on using the `focus-out` action naming rather than `focusOut` for all text inputs, this is because the text input components (especially `{{gh-trim-focus-input}}`) have their own `focusOut` handler which gets overridden if consumers supply their own `focusOut` attr
- drop `ember-one-way-controls` package
- add `ember-one-way-select` package
2018-02-28 11:44:03 +00:00
Sarah Frantz 2c0e4b3938 🐛 Fixed broken i18n docs link on general settings screen (#958)
no issue
- Link to i18n on the general settings screen 404'd - fixed link to go to https://themes.ghost.org/docs/i18n
2018-02-21 20:49:57 +00:00
Chris Morgan 9bcac85a5d Fixed copy in /settings/general (#953)
no issue

Two spelling and grammar fixes, and one technical.

- eg. → e.g.
- /yyyy/mm/slug/ → /yyyy/mm/dd/slug/
- , → .
2018-02-02 08:24:35 +00:00
Kevin Ansfield 0ef503f23d ESLint: Don't use observers if possible
closes https://github.com/TryGhost/Ghost/issues/8690
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-observers.md
- remove observers where possible
- move night shift toggle behaviour to the feature service
	- refresh feature service after import to fix stuck night shift toggle
2018-01-12 12:17:56 +00:00
Kevin Ansfield 050f4d99b6 ESLint: Alias model in controllers
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/HEAD/docs/rules/alias-model-in-controller.md
- replace `model` with a meaningful property name everywhere possible
- refactor `design` and `general` settings controllers to use a directly injected settings service rather than passing it in as a "model" to be more explicit
2018-01-12 12:17:56 +00:00
juan-g f701962f63 Theme translations and blog localisation (#703)
refs #5345, refs #3801, refs https://github.com/TryGhost/Ghost/pull/8437

- added language option to General Settings
- just a text field for flexibility, to allow any language (validation will be added later)
- default language is: English (en)
- added i18n docs link under the input field

**Documentation can be found at https://themes.ghost.org/v1.20.0/docs/i18n.**
2018-01-09 14:55:28 +01:00
Peter Zimon aaff539fc0 Fixed icon upload button hover state on General Settings screen (#934)
no issue
2018-01-02 16:32:26 +00:00
Kevin Ansfield 74428efd8b
🐛 Fixed inability to re-upload the same redirects file (#912)
closes https://github.com/TryGhost/Ghost/issues/9266
- `emberx-file-input` passes a `resetInput` function through to it's action handler but we weren't doing that in our override component. Added the missing functionality and updated all of our handlers to use that instead of doing manual resets
- added a `setFiles` action to `{{gh-uploader}}` and yield it for use in block invocations
2017-11-22 17:04:48 +00:00
Katharina Irrgang cb576b14d3 Display private RSS feed url in general settings (#888)
refs https://github.com/TryGhost/Ghost/issues/9001

- show private feed url if private blogging is enabled
- added a `.avoid-break-out` CSS utility class to prevent layout issues caused by non-breaking text such as long links
2017-10-05 10:59:14 +01:00
Aileen Nowak bbbe6038b2 🎨 Added confirmation dialog when leaving settings screen with unsaved changes (#871)
closes TryGhost/Ghost#8483

- Added a new modal component that gets rendered when leaving general/settings after changes have been done but not saved
- Removed independent saving logic for social URL for consistent UX
2017-10-04 11:49:30 +01:00
Kevin Ansfield 6cf39d49af Upload/Download redirects UI
closes TryGhost/Ghost#9028

- add upload/download UI to labs screen
  - displays success/failure state in the button for 5 secs after uploading
- minor refactor to remove redundant `{{#if}}` conditionals in general settings screen
- minor naming refactor of `onUploadFail` -> `onUploadFailure` for `{{gh-uploader}}`'s closure action
2017-09-21 17:01:40 +02:00
Aileen Nowak 2a73c798c5 ⬆️ Trigger image upload when clicking on image (#735)
* ⬆️  Trigger image upload when clicking on image

closes TryGhost/Ghost#8544

When clicking on an already uploaded icon, logo or cover in Settings -> General we trigger now the file upload to be able to replace it.

* use lowercase event names

* toggle progress bar when replacing image
2017-06-19 11:55:28 +01:00
Kevin Ansfield f5227fce01 🎨 team + apps header consistency (#716)
refs https://github.com/TryGhost/Ghost/issues/8464

- fix padding on user actions button
- match user screen heading to other screens
- match app screen headers to other screens, update form styles
- change header link colour to match non-link colour
- fix team acceptance test
- fix canvas top padding so header elements always align
- reduce header font size
2017-05-30 15:23:38 +02:00
Kevin Ansfield 9db932ee48 streamline image uploads in settings/general (#702)
refs TryGhost/Ghost#8455

- ensure `uploadUrls` and `errors` are cleared in `gh-uploader` when new uploads are started
- yield `isUploading` in `gh-uploader` component
- replace image upload modals in settings/general with in-page uploads
2017-05-23 10:50:04 +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 7169a14568 🔥 Adapt image property changes (#661)
refs https://github.com/TryGhost/Ghost/issues/8348, requires https://github.com/TryGhost/Ghost/pull/8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
2017-04-24 18:22:39 +01:00
Aileen Nowak 981d77c923 🎨 Checkbox styles in settings (#633)
no issue
- wraps the existing `{{one-way-checkbox}}` in general-setting in a `<label>` tag to make the checkbox styles work properly.
2017-04-11 10:10:56 +01:00
Aileen Nowak 750d55737f 🎨 No more icon font: `{{inline-svg}}` (#605)
refs TryGhost/Ghost#8107
- Replaces icon font with `{{inline-svg}}` helper incl. necessary style adjustments.
2017-04-07 16:23:45 +01:00
Kevin Ansfield bc4e607661 🎨 refactor settings screens to use ember-concurrency & gh-task-button
refs https://github.com/TryGhost/Ghost/issues/7865
- updates all settings screens to use EC tasks and `gh-task-button` to get save-state save buttons
- removes now-unused `settings-save` mixin
- moves the order of button color CSS so that grey buttons can change to green/red after completing
- removes the heading from `apps-loading` template so that there's no odd flash when loading slack/amp screens directly
2017-03-08 10:00:03 -07:00
Kevin Ansfield 89776fb169 🔥 remove URL input option from image upload components
refs https://github.com/TryGhost/Ghost/issues/8032
- `fileStorage: false` config is going away, it predates storage engines and will simplify future image optimisation work
- simplifies UI, it can be brought back in the future in a more robust fashion if required
2017-03-03 11:01:55 -06:00
John O'Nolan ae1007c58d Update design screen styles, fix login bugs
Refs https://github.com/TryGhost/Ghost/issues/8021
2017-02-27 13:31:01 +07:00
Kevin Ansfield 0f4ea73254 rename settings/navigation -> settings/design, move theme management (#543)
no issue

- following from the `settings/general` redesign, navigation and themes management are now co-located in `settings/design`
2017-02-21 19:04:50 +00: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 5674498759 accordion toggles for settings sections 2017-02-21 13:03:44 +00:00
Kevin Ansfield 1ff1a8306f fix settings/general acceptance tests 2017-02-21 13:03:44 +00:00
John O'Nolan 27ed167340 New settings/general styles 2017-02-21 13:03:44 +00:00
Kevin Ansfield d12a9901fb update tests for HTML changes 2017-02-17 10:14:16 +00:00
John O'Nolan 51cdd60b3e Style updates to new app frame for all other screens 2017-02-17 10:14:16 +00:00
Kevin Ansfield 503e8d8263 Update styles for content screen, buttons, and app frame
* Updates styling on content management screen, replaces button styles, tweaks application frame style
2017-02-16 19:50:05 +00:00