mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
84d3643e9f
refs https://github.com/TryGhost/Team/issues/836
refs ceb16b5e9f
Problem:
- `<GhImageUploaderWithPreview>` was updated to swap deprecated `{{action}}` usage to `{{on "click"}}` but that came with a missed behaviour change because the click event will now be passed as the argument to `@remove`
- the `<GhImageUploaderWithPreview>` usage on the general settings screen for social images had a syntax error in it's usage of the `mut` helper that meant the supplied argument was being used as the value rather than a forced `""` value. Result was that we were replacing the image urls with a text representation of the click event when attempting to remove images, leaving a broken image in place and no way to upload a new image
Fix:
- fixed incorrect `mut` usage to correctly force `""` as the value when removing social icons
- updated `<GhImageUploaderWithPreview>` to force `""` as the argument passed to `@remove` to avoid any other issues due to the behaviour change
18 lines
557 B
Handlebars
18 lines
557 B
Handlebars
{{#if @image}}
|
|
<div class="gh-image-uploader -with-image">
|
|
<div><img src={{@image}}></div>
|
|
<a class="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}} |