mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
ceb16b5e9f
refs https://github.com/TryGhost/Team/issues/771 - updated `<GhImageUploaderWithPreview>` to take an `@includeMetadata` argument that shows a basic html supporting caption field underneath (ready for toggle between caption/alt but not fully implemented) - added feature image alt/caption properties to post model - updated UI behind "featureImageMeta" labs flag - added the feature image uploader to the top of `<GhKoenigEditor>` for display above the editor title - removed feature image uploader from post settings menu - added labs flag checkbox
33 lines
1.0 KiB
Handlebars
33 lines
1.0 KiB
Handlebars
{{#if @image}}
|
|
<div class="gh-image-uploader -with-image">
|
|
<div><img src={{@image}}></div>
|
|
<a class="image-cancel" title="Delete" {{on "click" @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}}
|
|
|
|
{{#if @includeMetadata}}
|
|
{{#if this.isEditingAlt}}
|
|
{{else}}
|
|
<KoenigBasicHtmlInput
|
|
@html={{@caption}}
|
|
@placeholder={{if this.captionInputFocused "" @captionPlaceholder}}
|
|
@class="miw-100 tc bn form-text bg-transparent pr8 pl8"
|
|
@name="caption"
|
|
@onChange={{@updateCaption}}
|
|
@onFocus={{fn (mut this.captionInputFocused) true}}
|
|
@onBlur={{fn (mut this.captionInputFocused) false}}
|
|
/>
|
|
{{/if}}
|
|
{{/if}} |