Commit Graph

840 Commits

Author SHA1 Message Date
Kevin Ansfield
c3b49b45cf 🎨 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
c3a6792299 🐝 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
0439966587 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
Kevin Ansfield
e143bce0b2 fix broken gh-image-uploader tests 2017-03-17 19:15:02 +02:00
John O'Nolan
0b867dfb89 Styling for editor image uploader card 2017-03-16 16:39:57 +02:00
John O'Nolan
f8dd2c37dd Card menu trigger styling 2017-03-15 17:43:12 +02:00
Kevin Ansfield
4637c92797 🔥 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
21361df3be Revert "Multi line title (#575)"
This reverts commit 989ad7b9c1.
2017-03-14 16:37:47 +00:00
Kevin Ansfield
4de244974e 🎨 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
640499af70 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
Ryan McCarvill
989ad7b9c1 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
Ryan McCarvill
9a0b72071d 👯 ♥️ ♣️ ♦️ ♠️ 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
Austin Burdine
ed843718b2 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
4a1c548e5b 🐛 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
a6e3f704e5 🐛 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
d0d97d1aa2 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
b9c391333e Content filter style updates 2017-03-13 12:48:21 +02:00
John O'Nolan
e39a31656e New publish menu 2017-03-11 19:23:44 +08:00
Austin Burdine
ab287848d4 🎨 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
56e5e90334 💄 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
9344fd6a1a 🎨 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
253a0fb2cf 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
ad98a9a072 🎨 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
33a0e50ae5 🐛 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
fce096afd1 🔥 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
8aa02da02c Editor card-menu and toolbar style updates 2017-03-08 21:08:20 +08:00
Kevin Ansfield
96743e64cd 🎨 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
f26ddc68dd 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
f1512d12c2 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
Kevin Ansfield
ea58dc6f85 🔥 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
Austin Burdine
0366bde545 💄 import gh-koenig styles into dark mode stylesheet 2017-03-03 16:54:50 +00:00
Austin Burdine
6619f09eca 🎨 implement night mode
no issue
- add functionality for night mode feature flag using alternate
stylesheets
- modify lazy loader service to work with alternate stylesheets
- update feature service to use user accessibility property & add tests
2017-03-03 16:54:50 +00:00
Austin Burdine
3536d91c9c 🎨 make lazyLoader return a promise for loadStyle method
no issue
- cleans up the interface to maintain consistency between loadScript and
loadStyle
- update gh-cm-editor component to await result of loadStyle
2017-03-03 16:54:50 +00:00
Kevin Ansfield
85d9d76f88 comment out temporary static card menu template
no issue
- card menu template on Labs screen is temporary whilst working on the design, this disables it for the alpha
2017-03-03 16:42:07 +00:00
Kevin Ansfield
ae60352c16 disable email input field when using OAuth, direct users to my.ghost.org for login details (#560)
no issue

- disables user email input field when using Ghost OAuth because email addresses are synced from the central identity management system
- adds a link to my.ghost.org account management when using Ghost OAuth and viewing your own user
2017-03-03 14:24:43 +01:00
Kevin Ansfield
cce955545e Merge branch 'integrated-editor' 2017-03-02 18:50:01 +00:00
Kevin Ansfield
ea8b4277b0 add dropdown filters for post type, author, and tag (#554)
refs TryGhost/Ghost#7860
- removes post type filter links
- adds dropdown filters for post type, author, and tag
- replaces custom refresh on query params change with Ember's standard `refreshModel` config
2017-03-02 12:35:09 -06:00
Kevin Ansfield
91137a486e fix malformed CSS that was breaking production builds
no issue
- cssnano was erroring with `Error: Unexpected "space" found`
2017-03-02 11:52:33 +00:00
Kevin Ansfield
a3c5a1b5e6 fix cardmenu.css import location 2017-03-02 10:16:30 +00:00
John O'Nolan
49a15a70c5 Card menu styles and editor tweaks 2017-03-02 09:56:52 +00:00
Ryan McCarvill
4ceb547db7 fixed the menu in perperation to the + button 2017-03-02 09:56:52 +00:00
Ryan McCarvill
b61e2055a2 refactor and rename ghost-editor to koenig, removed tests from koenig to integrate into ghost-admin 2017-03-02 09:56:52 +00:00
Ryan McCarvill
b5cb951d3c renamed to koenig 2017-03-02 09:56:52 +00:00
Ryan McCarvill
999c6067f0 Implemented new toolbar styling and layout. 2017-03-02 09:56:52 +00:00
John O'Nolan
08e6b00048 Minor editor style updates
Refs https://github.com/TryGhost/Ghost/issues/8021
2017-03-02 09:56:52 +00:00
Ryan McCarvill
e422f0bcba 👷🏻‍♀️🚧👷 Ghost-Editor integration.
Integrated Ghost-Editor as an in-repo addon.
Moved CSS to /app/styles/addons/ghost-editor/

Still a WIP.
2017-03-02 09:56:51 +00:00
Kevin Ansfield
60dc827e59 🐛 fix unclickable app after closing modal
no issue
- `liquid-wormhole` changed the class of it's default destination element which meant that one of our styles resulted in it overlaying the whole app and preventing anything from being clicked after closing a modal
2017-03-01 17:30:46 +00:00
Kevin Ansfield
1db799e634 🐛 display correct expired/expires text for invites (#550)
closes https://github.com/TryGhost/Ghost/issues/8055

- use `expired` if the date is in the past, otherwise `expires`
- fix mirage factories to use `moment.valueOf` instead of `moment.unix` for invite `expires` attributes
2017-02-27 13:11:39 +00:00
Kevin Ansfield
e1532d1f5a fix tests for new themes table styles (#553) 2017-02-27 12:34:46 +00:00
John O'Nolan
afdc20d31e Update design screen styles, fix login bugs
Refs https://github.com/TryGhost/Ghost/issues/8021
2017-02-27 13:31:01 +07:00