diff options
| author | Henry Jameson <me@hjkos.com> | 2022-02-10 15:42:28 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-02-10 15:42:28 +0200 |
| commit | befd4d5fc787d3f8287456dbf5d1a6c70419591f (patch) | |
| tree | ab83a080e3f1911d4a3faf8aa340be0c6c0d8082 /src/components/attachment/attachment.vue | |
| parent | d1f02221cb8e15654da2e101d51440db1570e14d (diff) | |
improve unknown attachment handling
Diffstat (limited to 'src/components/attachment/attachment.vue')
| -rw-r--r-- | src/components/attachment/attachment.vue | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 4abf63dd..59173759 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -12,7 +12,6 @@ :href="attachment.url" :alt="attachment.description" :title="attachment.description" - @click.prevent="" > <FAIcon :icon="placeholderIconClass" /> <b>{{ nsfw ? "NSFW / " : "" }}</b>{{ edit ? '' : placeholderName }} @@ -88,7 +87,7 @@ <FAIcon icon="stop" /> </button> <button - v-if="attachment.description && size !== 'small' && !edit" + v-if="attachment.description && size !== 'small' && !edit && type !== 'unknown'" class="button-unstyled attachment-button" @click.prevent="toggleDescription" :title="$t('status.show_attachment_description')" @@ -96,7 +95,7 @@ <FAIcon icon="align-right" /> </button> <button - v-if="!useModal" + v-if="!useModal && type !== 'unknown'" class="button-unstyled attachment-button" @click.prevent="openModalForce" :title="$t('status.show_attachment_in_modal')" @@ -155,6 +154,18 @@ /> </a> + <a + v-if="type === 'unknown' && !hidden" + class="placeholder-container" + :href="attachment.url" + target="_blank" + > + <FAIcon size="5x" :icon="placeholderIconClass" /> + <p> + {{ localDescription }} + </p> + </a> + <component :is="videoTag" v-if="type === 'video' && !hidden" |
