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

Koenig - Made full width images work with closed sidebar (#1014)

refs https://github.com/TryGhost/Ghost/issues/9505
- use `ui` service to adjust full-width image styles then the side nav is open
This commit is contained in:
Peter Zimon 2018-05-08 11:26:46 +02:00 committed by Kevin Ansfield
parent 50bf7b2bc8
commit d7b096b8f0
2 changed files with 3 additions and 1 deletions

View file

@ -8,9 +8,11 @@ import {
import {computed} from '@ember/object';
import {htmlSafe} from '@ember/string';
import {run} from '@ember/runloop';
import {inject as service} from '@ember/service';
import {set} from '@ember/object';
export default Component.extend({
ui: service(),
layout,
// attrs

View file

@ -20,7 +20,7 @@
}}
<div class="relative">
{{#if (or previewSrc payload.src)}}
<img src={{or previewSrc payload.src}} class={{kg-style kgImgStyle}} alt={{payload.alt}}>
<img src={{or previewSrc payload.src}} class="{{kg-style kgImgStyle sidebar=ui.hasSideNav}}" alt={{payload.alt}}>
{{/if}}
{{#if (or uploader.errors uploader.isUploading (not payload.src))}}