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

3241 commits

Author SHA1 Message Date
Kevin Ansfield 3c848048f5 deps: ember-source@2.12.0 2017-03-29 10:47:46 +01:00
Kevin Ansfield 61e73b4d31 deps: ember-concurrency@0.8.1
no issue
- update ember-concurrency
- fix `editor-base-controller` unit tests and remove unnecessary 800ms delays
2017-03-29 10:47:46 +01:00
Kevin Ansfield eb36bb4f53 minor refactors for recent/up-coming deprecations 2017-03-28 18:17:59 +01:00
Kevin Ansfield 6ca2334495 fix addon preprocessor deprecation warning during build 2017-03-28 18:17:59 +01:00
Kevin Ansfield 3b27fe5d15 deps: ember-cli@2.12.1 (#604)
no issue
- https://emberjs.com/blog/2017/03/19/ember-2-12-released.html#toc_changes-in-ember-cli-2-12
2017-03-28 11:29:18 +01:00
Ryan McCarvill a8e58bfdf6 📦 Card-Rename (#603)
no issue
- Renames Cards so they comply with the `card-{{name}}` convention rather than `{{name}}-card`
- Adds a unkonwnCardHandler to the editor.
2017-03-24 10:03:52 +00:00
Ryan McCarvill 482543abed 🚨 Move markdown tests (#602)
refs https://github.com/TryGhost/Ghost/issues/8201
- Markdown tests are now integration tests rather than acceptance.
2017-03-24 10:00:43 +00:00
Ryan McCarvill fade388899 🚀 Link improvements (#601)
no issue
- Adds a few improvements for link insertion.
  - Sanitises links
  - Toggles a link so that if there are existing links in the selected text it removes them.
2017-03-24 09:40:21 +00:00
John O'Nolan 517111ea55 HTML card border style 2017-03-22 18:03:31 +02:00
kirrg001 9adb99058c Version bump to 1.0.0-alpha.17 2017-03-22 10:18:14 +01:00
Ryan McCarvill 4ebb184184 Multi line title. (#595)
refs https://github.com/TryGhost/Ghost/issues/7754

The title is now a contenteditable div which stretches and wraps to behave like the editor.

It also tries to seemlessly move the cursor between the editor and title to make one coherent editing experience.
2017-03-21 23:42:14 +00:00
Ryan McCarvill 446551b36c 🐜 Card Menu Default State Enter Action (#600)
closes https://github.com/TryGhost/Ghost/issues/8196

The default state of both the '/' and '+' card menus is a selection of -1, this ensure that the active tool prompt isn't shown until the user presses an arrow key for keyboard selection. However -1 isn't a valid tool id so when pressing enter without selecting a tool the user will cause an error.

This update ensures that the selected tool is the first tool available even if the selection is in fact -1.
2017-03-21 14:05:49 +00:00
Ryan McCarvill 72c0694b4a 🐝 Fix editor toolbar link focus issues. (#599)
closes https://github.com/TryGhost/Ghost/issues/8195

When the toolbar is toggled into link mode the link input field should always focus, however this only happens on the first time which leads to issues with mobiledoc having focus but not the range.

This fix means that the toolbar always focuses.
2017-03-21 13:52:47 +00:00
Ryan McCarvill ab118ba572 Insert Link styling (#598)
closes: https://github.com/TryGhost/Ghost/issues/8109
- adds styling for the insert link toolbar component.
2017-03-20 12:44:09 +00:00
Kevin Ansfield 2f56152dbf 🎨 synchronous settings service
no issue
- adds `settings` service that acts as a proxy to the singular settings model with methods to fetch and reload, also prevents accidentally loading only some settings types which has caused problems in the past
- updates app boot, signin, and signup processes to fetch settings ensuring that any part of the app can grab settings synchronously if needed
- removes `timeZone` service, it's no longer needed as we can grab `settings.activeTimezone` directly
- replaces all store queries for the settings model with appropriate `settings` methods
- refactors `apps/*` routes/controllers, they had become a little convoluted with the way they were dealing with settings and the new service helped to clean that up
2017-03-20 07:43:49 -05:00
Ryan McCarvill bcbc9c27f7 🐝 Card menu fixes (#597)
closes: https://github.com/TryGhost/Ghost/issues/8106

- Fixes the keyboard selection problems of the '+' menu.
- Makes the active state of the keyboard selection blank until a key is pressed.
- Fixes it so that the '+' menu executes the tool on Enter.
2017-03-20 12:40:20 +00:00
Ryan McCarvill 83519a1fd1 🐝 Safari fixes: (#596)
closes: https://github.com/TryGhost/Ghost/issues/8023
- make the editor 100% height in Safari and position toolbars correctly.
2017-03-20 12:33:06 +00:00
Ryan McCarvill 98d239442b 🐜 Bulk selecting (#594)
closes: https://github.com/TryGhost/Ghost/issues/8153

Previously when selecting text in the editor the screen will jump as it tries to scroll so that the cursor is always on it.

This update means it will no longer happen when selecting the text with either the mouse or in a mobile browser. Unfortunately when selecting text with the keyboard the editor will no longer scroll with the cursor.
2017-03-20 12:12:12 +00:00
Ryan McCarvill 41b035d0da Add classes to card. (#591)
closes: https://github.com/TryGhost/Ghost/issues/8179
- previously all cards just had a `__mobiledoc-card` class on them, this update replaces them with a class `kg-card` and adds an additional class of `kg-{{card_name}}`
2017-03-20 12:08:54 +00:00
Hannah Wolfe 569fe051ef 🔥 Remove handlebars from serving admin (#593)
refs TryGhost/Ghost#8140
refs TryGhost/Ghost#8184

- now that the admin index page is just html, we don't need handlebars anymore
- this changes the template be called .html to reflect this
2017-03-20 12:01:06 +00:00
Ryan McCarvill 8d19c13b3c 🐜 ️ Card menu fixes:
Closes #8164

- When a user clicks on a card within a '/' menu it now executes that tool.
- If a user engages a card with the / menu the content of the paragraph is now inserted into the card.
2017-03-20 10:30:26 +00:00
Kevin Ansfield e87762c723 fix broken gh-image-uploader tests 2017-03-17 19:15:02 +02:00
John O'Nolan 0ad27f493e Styling for editor image uploader card 2017-03-16 16:39:57 +02:00
Ryan McCarvill b618412ea9 🐝 🐜 '+' button double click bug (#589)
refs https://github.com/TryGhost/Ghost/issues/8106

When a user clicks on the plus button it opens the card menu, when they click on it twice the card menu input field loses focus and the card menu closes, because the Range object of the document is no longer within the editor the '+' button also disappears. This has the effect of making the '+' button disapear when double clicking.

Now when the input field to search cards loses focus the card menu disapears but the '+' button remains, we rely on the cursorDidChange event to also hide the button.
2017-03-16 11:18:08 +00:00
John O'Nolan 5b494a023c Card menu trigger styling 2017-03-15 17:43:12 +02:00
Ryan McCarvill 1c0a252122 🐜 🐝 Create link from toolbar (#586)
closes https://github.com/TryGhost/Ghost/issues/8163

Previously when you created a link the toolbar component would re-render and dissapear.

This update ensures that the logic that must happen on first render does not happen on subsequent renders.
2017-03-15 14:55:20 +00:00
Ryan McCarvill 867cb4101d 🐝 Add cards in lists (#585)
refs https://github.com/TryGhost/Ghost/issues/8157

Currently mobiledoc-kit doesn't allow the inserting or replacing of a list item with a card.

There is a solution that works toggling the section to a `p` then replacing the section, however there are issues with the mobiledoc range object becoming out of sync and the workarounds for that are too hacky.

We need to update mobiledoc to deal with this usecase (although the way that ranges are handled during undo might also be an option worth exploring), but for now we'll simply insert a card at the bottom of the list which is unfortunately different behaviour from any other block.
2017-03-15 10:29:10 +00:00
Kevin Ansfield 82e129b390 Version bump to 1.0.0-alpha.16 2017-03-14 19:06:41 +00:00
Kevin Ansfield 0e16bd61b8 🔥 remove Posts per Page setting (#583)
refs ##8131

- "posts per page" is now a theme-level concern
- UI has already been removed, this finishes the cleanup by removing `settings.postsPerPage` and related validation/test support
2017-03-14 18:09:06 +01:00
Kevin Ansfield 7661212b1b Revert "Multi line title (#575)"
This reverts commit b5a7fef6f9.
2017-03-14 16:37:47 +00:00
Kevin Ansfield e1f5ee8fcd 🎨 remove usage of ghost's {{asset}} helper in index.html (#574)
refs #8140

🎨 remove usage of ghost's {{asset}} helper in built index.html files

requires https://github.com/TryGhost/Ghost/pull/8142
- switch to hash-location rather than history-location
- remove usage of Ghost's `{{asset}}` helper in index.html
- add `content-for` helpers to `asset-delivery` addon that switch asset urls in index.html to `.min` files in production
- update the `asset-delivery` addon to copy the production `index.min.html` to `default-prod.hbs` so Ghost can serve production assets when in production mode
- change template output path to `core/server/admin/views/`
- enable asset fingerprinting
- remove `ember-cli-sri` dependency - we weren't using it but now that ember is handling assets it was used automatically and could potentially create issues if users have proxy servers that attempt to compress or otherwise modify asset files

 redirect to setup if server says setup isn't finished

refs https://github.com/TryGhost/Ghost/issues/8140
- now we're using hash-location the server no longer knows if we're hitting the /setup route so it's not able to redirect for us
- extends the default ESA `UnauthenticatedRouteMixin` to add a check against the `/authentication/setup` API endpoint and redirects to `/#/setup/one` if setup isn't complete - this works for all routes because the default behaviour when hitting an authenticated route without the right credentials is to force a logout and redirect to `/#/signin` which utilises the `UnauthenticatedRouteMixin`

deps: ember-cli-inject-live-reload@1.6.1
2017-03-14 17:04:46 +01:00
Kevin Ansfield 092b59fe3f show theme warnings/errors when activating a theme (#576)
closes https://github.com/TryGhost/Ghost/issues/8127
- update theme activation to manually set other themes to `active: false` in the store now that we only the active theme back from `/themes/:name/activate` endpoint
- move theme warning list item rendering into `{{gh-theme-error-li error=x}}`
- add `theme-warnings` modal that accepts a warnings list, title, and optional message
- after activating a theme, check if the theme has any warnings or errors and display an appropriate modal informing the user
2017-03-14 08:54:58 -05:00
Katharina Irrgang a4c69b0bf0 🔥 remove bg shell from Gruntfile (#582)
refs TryGhost/Ghost#7427, requires TryGhost/Ghost#8158
- both Ghost and Ghost-Admin run the watch command in background, that didn't work
- the caller can decide if running the watch command in bg or not
- furthermore, the caller can decide if printing stdout/stderr
2017-03-14 13:52:36 +00:00
Ryan McCarvill b5a7fef6f9 Multi line title (#575)
refs https://github.com/TryGhost/Ghost/issues/7754
- The title is now a contenteditable div which stretches and wraps to behave like the editor.
- It also tries to seemlessly move the cursor between the editor and title to make one coherent editing experience.
2017-03-14 13:50:30 +00:00
Kevin Ansfield e01adb2fa3 Dependency updates (#581)
no issue
* ember-data@2.12.0
* autoprefixer@6.7.7
* ember-cli-mirage@0.2.8
* ember-cli-app-version@2.0.2
* ember-resolver@3.0.0
* grunt-shell@2.1.0
* bump yarn.lock sub-dependencies
2017-03-14 13:19:58 +00:00
Ryan McCarvill 8c800ef504 👯 ♥️ ♣️ ♦️ ♠️ New editor card menu (#580)
refs https://github.com/TryGhost/Ghost/issues/8106, https://github.com/TryGhost/Ghost/issues/7429, requires https://github.com/TryGhost/Ghost/pull/8137

-Adds new "card" menus
  - Navigation with keyboard in both axis.
  - Search with keyboard in both menus.
  - Adds a "+" Menu for cards
  - Adds a "/" Menu for cards
    - if the block has content and it becomes a markdown or HTML Embed card then the content is included into the card.
    - Image and HR cards appear below the current section
- Adds new toolbar with both inline and block styling.
- Adds a new 'divider' card.
2017-03-14 11:59:34 +00:00
Kevin Ansfield a2c389e18d 👷 skip PSM unit tests until converted to integration tests 2017-03-14 10:12:06 +00:00
Austin Burdine 319cf2aa31 fix(psm): fix author dropdown in post-settings-menu
closes https://github.com/TryGhost/Ghost/issues/8122
- because the PSM is now a component, some of the component lifecycle
hooks can be employed to load things
2017-03-14 10:12:06 +00:00
Austin Burdine 33db4b538a 🐛 ensure tag property exists before trying to trim it (#578)
no issue
- fixes error thrown when you focus in/focus out of a field in the tags
editor without entering anything
2017-03-14 10:05:59 +00:00
Kevin Ansfield 652fe8589b bump gh-task-button test timers to avoid random test failures
no issue
- on some systems (and occasionally on Travis) 20ms was not enough time for the task button state to have resolved resulting in random test failures
2017-03-13 13:00:48 +01:00
Kevin Ansfield e8a1152d21 🐛 fix oauth2-ghost authenticator error handling
no issue
- updates `oauth2-ghost` authenticator to reflect the fact that `makeRequest` now returns a ember-ajax and matches the `oauth2` authenticator behaviour
- handle `UnauthorizedError` errors in application route's error handler to avoid tests breaking from unhandled exceptions
2017-03-13 13:00:48 +01:00
Kevin Ansfield 97300e3531 suspend user feature
requires https://github.com/TryGhost/Ghost/pull/8114
- adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen
- separates team index into "active" and "suspended" users
- adds "suspended" badge to user profile when suspended
2017-03-13 13:00:48 +01:00
John O'Nolan 4d66ca653a Content filter style updates 2017-03-13 12:48:21 +02:00
John O'Nolan fc2ceb5c7b New publish menu 2017-03-11 19:23:44 +08:00
Austin Burdine 525e6c85d0 🎨 convert post-settings-menu into a component (#137)
no issue
- cleans up some of the render code
- aligns things with the "ember way"
- move metaTitleScratch and metaDescriptionScratch bindings to post model
2017-03-10 14:30:01 +00:00
Austin Burdine e5657bc069 💄 fix button styling on setup/one page (#573)
no issue
- add span tag to button content
2017-03-09 22:14:50 +00:00
Kevin Ansfield d95b2b1d31 🎨 refactor signin screen to use ember-concurrency & gh-task-button (#571)
refs https://github.com/TryGhost/Ghost/issues/7865
- convert all signin related actions to ember-concurrency tasks and consolidate in the signin controller rather than spread across controller+route
- add `successClass` and `failureClass` params to `gh-task-button` that can be used to override the default success/failure button classes
- prevent clicks on `gh-task-button` from triggering form actions (this behaviour should never be necessary, task buttons should either be separate to the form as in the "forgot?" button or the form action performs the same task and can be triggered by a standard form submit)
2017-03-09 14:48:54 -07:00
Austin Burdine 35ffe11661 various test deprecation cleanup
no issue
- cleans up a lot of the deprecation noise in tests
- remove ember-cli-deprecation-workflow dependency
2017-03-08 18:56:30 +00: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 9e34812986 🐛 fix blank PSM meta description placeholder
no issue
- with the new editor there's no longer a `.rendered-markdown` preview element so the meta description placeholder stopped working
- this uses the `post.html` attribute in place of the old preview element, the downside to this is that `post.html` and therefore the meta description placeholder is only updated on save but that's better than not having any placeholder
2017-03-08 09:42:32 -07:00