diff --git a/app/assets/stylesheets/shared/assets.scss b/app/assets/stylesheets/shared/assets.scss index 9b212b738..3e2767b59 100644 --- a/app/assets/stylesheets/shared/assets.scss +++ b/app/assets/stylesheets/shared/assets.scss @@ -248,6 +248,23 @@ @include font-main; } + .attachment-image-tooltip { + bottom: 90px; + display: none; + position: relative; + right: 110px; + z-index: 9999; + + img { + height: 150px; + width: 150px; + } + } + + .file-preview-link:hover + .attachment-image-tooltip { + display: block; + } + .file-name { @include font-main; color: $brand-primary; diff --git a/app/javascript/vue/shared/content/attachments/list.vue b/app/javascript/vue/shared/content/attachments/list.vue index 3f2855f67..af01936dc 100644 --- a/app/javascript/vue/shared/content/attachments/list.vue +++ b/app/javascript/vue/shared/content/attachments/list.vue @@ -11,12 +11,14 @@ :data-gallery-view-id="parentId" :data-preview-url="attachment.attributes.urls.preview" > - + {{ attachment.attributes.file_name }} +
+ +
{{ i18n.t('attachments.new.description') }} @@ -53,7 +55,17 @@ parentId: { type: Number, required: true - } + }, }, + data() { + return { + imageLoadError: false + }; + }, + methods: { + handleImageError() { + this.imageLoadError = true; + } + } }