0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Removed feature image indicator and improved visibility of feature im… (#18877)

…age button

No ref
This commit is contained in:
Sanne de Vries 2023-11-06 14:56:24 +01:00 committed by GitHub
parent 7b9ecd6056
commit 7f6a252721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 12 deletions

View file

@ -1,8 +1,6 @@
{{!-- template-lint-disable no-invalid-interactive --}}
<div
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 --}}
<GhUploader
@ -40,10 +38,6 @@
<span class="gh-editor-hidden-indicator" data-tooltip="Feature image and post title are hidden on page">
{{svg-jar "eye-closed"}}
</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}}
<div class="gh-editor-feature-image">
<img src={{@image}} alt={{@alt}} role={{if @alt "img" "presentation"}} class="{{if @isHidden "faded"}}">
@ -87,7 +81,7 @@
</div>
{{else}}
{{!-- no-image state --}}
<div class="flex flex-row items-center {{if this.hideButton "invisible"}}">
<div class="flex flex-row items-center">
{{#if this.canDrop}}
<div class="gh-editor-feature-image-add-button"><span>Drop to upload feature image</span></div>
{{else}}

View file

@ -15,15 +15,10 @@ export default class GhEditorFeatureImageComponent extends Component {
@service settings;
@tracked isEditingAlt = false;
@tracked isHovered = false;
@tracked captionInputFocused = false;
@tracked showUnsplashSelector = false;
@tracked canDrop = false;
get hideButton() {
return !this.canDrop && !this.isHovered && !this.args.forceButtonDisplay;
}
get caption() {
const content = this.args.caption;
if (!content) {

View file

@ -593,6 +593,7 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone {
width: 1em;
height: 1em;
margin-left: 24px;
margin-bottom: 2px;
line-height: 1.2;
}