mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Removed feature image indicator and improved visibility of feature im… (#18877)
…age button No ref
This commit is contained in:
parent
7b9ecd6056
commit
7f6a252721
3 changed files with 2 additions and 12 deletions
|
@ -1,8 +1,6 @@
|
||||||
{{!-- template-lint-disable no-invalid-interactive --}}
|
{{!-- template-lint-disable no-invalid-interactive --}}
|
||||||
<div
|
<div
|
||||||
class="gh-editor-feature-image-container"
|
class="gh-editor-feature-image-container"
|
||||||
{{on "mouseover" (fn (mut this.isHovered) true)}}
|
|
||||||
{{on "mouseleave" (fn (mut this.isHovered) false)}}
|
|
||||||
>
|
>
|
||||||
{{!-- template-lint-enable no-invalid-interactive --}}
|
{{!-- template-lint-enable no-invalid-interactive --}}
|
||||||
<GhUploader
|
<GhUploader
|
||||||
|
@ -40,10 +38,6 @@
|
||||||
<span class="gh-editor-hidden-indicator" data-tooltip="Feature image and post title are hidden on page">
|
<span class="gh-editor-hidden-indicator" data-tooltip="Feature image and post title are hidden on page">
|
||||||
{{svg-jar "eye-closed"}}
|
{{svg-jar "eye-closed"}}
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
|
||||||
<span class="gh-editor-feature-image-indicator" data-tooltip="A feature image is publicly visible to anyone">
|
|
||||||
{{svg-jar "feature-image"}}
|
|
||||||
</span>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="gh-editor-feature-image">
|
<div class="gh-editor-feature-image">
|
||||||
<img src={{@image}} alt={{@alt}} role={{if @alt "img" "presentation"}} class="{{if @isHidden "faded"}}">
|
<img src={{@image}} alt={{@alt}} role={{if @alt "img" "presentation"}} class="{{if @isHidden "faded"}}">
|
||||||
|
@ -87,7 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{!-- no-image state --}}
|
{{!-- no-image state --}}
|
||||||
<div class="flex flex-row items-center {{if this.hideButton "invisible"}}">
|
<div class="flex flex-row items-center">
|
||||||
{{#if this.canDrop}}
|
{{#if this.canDrop}}
|
||||||
<div class="gh-editor-feature-image-add-button"><span>Drop to upload feature image</span></div>
|
<div class="gh-editor-feature-image-add-button"><span>Drop to upload feature image</span></div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -15,15 +15,10 @@ export default class GhEditorFeatureImageComponent extends Component {
|
||||||
@service settings;
|
@service settings;
|
||||||
|
|
||||||
@tracked isEditingAlt = false;
|
@tracked isEditingAlt = false;
|
||||||
@tracked isHovered = false;
|
|
||||||
@tracked captionInputFocused = false;
|
@tracked captionInputFocused = false;
|
||||||
@tracked showUnsplashSelector = false;
|
@tracked showUnsplashSelector = false;
|
||||||
@tracked canDrop = false;
|
@tracked canDrop = false;
|
||||||
|
|
||||||
get hideButton() {
|
|
||||||
return !this.canDrop && !this.isHovered && !this.args.forceButtonDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
get caption() {
|
get caption() {
|
||||||
const content = this.args.caption;
|
const content = this.args.caption;
|
||||||
if (!content) {
|
if (!content) {
|
||||||
|
|
|
@ -593,6 +593,7 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
|
margin-bottom: 2px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue