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

3223 commits

Author SHA1 Message Date
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
Kevin Ansfield d6cbc0244e 🔥 remove unused markdown/preview helper and component
no issue
- `gh-format-markdown` is no longer used
- `gh-ed-preview` is a hangover from the old editor
2017-03-08 09:42:32 -07:00
John O'Nolan 20ac1e4096 Editor card-menu and toolbar style updates 2017-03-08 21:08:20 +08:00
Kevin Ansfield 541fe992f1 bump yarn.lock sub-dependencies 2017-03-08 12:16:25 +00:00
Kevin Ansfield 1c8d54808b deps: loader.js@4.2.3 2017-03-08 12:16:25 +00:00
Kevin Ansfield d02803e8a0 deps: liquid-wormhole@2.0.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield 2cf56db0e1 deps: ember-power-select@1.5.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield ce625b65dc deps: ember-light-table@1.8.4 2017-03-08 12:16:25 +00:00
Kevin Ansfield b1eda7340f deps: ember-cli-postcss@3.1.2 2017-03-08 12:16:25 +00:00
Kevin Ansfield a1883bd5b4 deps: broccoli-merge-trees@2.0.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield 03ce096c88 deps: ember-ajax@2.5.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield 43f791cf9f deps: csscomb@4.0.1 2017-03-08 12:16:25 +00:00
Kevin Ansfield d2abedb4ba deps: coveralls@2.12.0 2017-03-08 12:16:25 +00:00
Kevin Ansfield 265d67b7bb deps: autoprefixer@6.7.6 2017-03-08 12:16:25 +00:00
Kevin Ansfield df3da411df 🎨 move theme activation to /themes endpoint
requires https://github.com/TryGhost/Ghost/pull/8093
- adds `theme.activate()` method and associated adapter method for activating themes rather than relying on `settings.activeTheme`
- minor refactors to the `modals/upload-theme` component to use a full theme model
2017-03-08 10:46:33 +00:00
Kevin Ansfield d2449ea5df add "sort by" dropdown to content screen filters (#565)
closes TryGhost/Ghost#7860
- add "sort by" dropdown allowing to order posts by earliest or latest publication date
2017-03-07 10:36:28 -07:00
Kevin Ansfield bd65c1efd4 success/failure state spinner buttons (#566)
refs https://github.com/TryGhost/Ghost/issues/7515
- changes to `gh-task-button`:
  - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params
  - positional param for `buttonText`
  - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion:
    ```
    {{#gh-task-button task=myTask as |task|}}
    {{if task.isIdle "Save me"}}
    {{if task.isRunning "Saving"}}
    {{if task.isSuccess "Thank you!"}}
    {{if task.isFailure "Nooooooo!"}}
    {{/gh-task-button}}
    ```
- update existing uses of `gh-task-button` to match new component signature
2017-03-07 10:28:52 -07:00
Ryan McCarvill dafd5109b4 Koenig tests. (#564)
* 👷   Editor tests
Added acceptance tests for koenig markdown-like support.
Added some unit tests for koenig located in the /lib/koenig/test-support directory.
2017-03-07 23:57:09 +13:00
kirrg001 cd916ede17 Version bump to 1.0.0-alpha.15 2017-03-03 18:35:18 +01:00