Ghost/ghost/admin/app/components/gh-image-uploader-with-preview.hbs

22 lines
674 B
Handlebars
Raw Normal View History

{{#if @image}}
<div class="gh-image-uploader -with-image">
<div><img src={{@image}}></div>
<KoenigImageEditor
@imageSrc={{@image}}
@saveUrl={{@update}}
/>
<a class="image-action image-delete" title="Delete" {{on "click" (fn @remove "")}}>
{{svg-jar "trash"}}
<span class="hidden">Delete</span>
</a>
</div>
{{else}}
<GhImageUploader
@text={{@text}}
@altText={{@altText}}
@allowUnsplash={{@allowUnsplash}}
@update={{@update}}
@uploadStarted={{optional @uploadStarted}}
@uploadFinished={{optional @uploadFinished}}
/>
{{/if}}