Ghost/ghost/admin/app/components/gh-image-uploader-with-preview.hbs
Rishabh Garg c6a75cf015
Integrated image editor for staff and tag admin pages (#16755)
refs https://github.com/TryGhost/Team/issues/3145

- includes image editing for generic upload image components to extend
image editing capabilities to other areas in Admin
- allows image editing for tag images and staff user images
2023-05-08 15:22:25 +05:30

24 lines
746 B
Handlebars

{{#if @image}}
<div class="gh-image-uploader -with-image">
<div><img src={{@image}}></div>
{{#if (feature 'imageEditor')}}
<KoenigImageEditor
@imageSrc={{@image}}
@saveUrl={{@update}}
/>
{{/if}}
<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}}