mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
62553cdf92
no issue - adds `gh-image-uploader` that handles image uploads in a fully ember fashion and with no dependency on `uploader.js` - adds `gh-image-uploader-with-preview` that can fully replace the old `gh-uploader` - replace uses of `gh-uploader` in PSM & TSM with `gh-image-uploader-with-preview` - updates the editor preview image handling to use the new `gh-image-uploader-with-preview` component - updates the image upload modal to use `gh-image-uploader` (utilises the `saveButton=false` flag which means the preview has to be handled externally to avoid auto-replacement when typing a URL) - removes all old `uploader.js` related code - adds custom `RequestEntityTooLargeError` and `UnsupportedMediaTypeError` errors to our `ajax` service
17 lines
518 B
Handlebars
17 lines
518 B
Handlebars
{{#if image}}
|
|
<div class="gh-image-uploader --with-image">
|
|
<div><img src={{image}}></div>
|
|
<a class="image-cancel icon-trash" title="Delete" {{action remove}}>
|
|
<span class="hidden">Delete</span>
|
|
</a>
|
|
</div>
|
|
{{else}}
|
|
{{gh-image-uploader
|
|
text=text
|
|
update=(action 'update')
|
|
onInput=(action 'onInput')
|
|
uploadStarted=(action 'uploadStarted')
|
|
uploadFinished=(action 'uploadFinished')
|
|
formChanged=(action 'formChanged')}}
|
|
{{/if}}
|