This commit is contained in:
Henry Jameson 2021-06-22 20:47:35 +03:00
parent dd3fe61cf3
commit b67db47c88
6 changed files with 25 additions and 26 deletions

View file

@ -15,11 +15,11 @@
@click.prevent="" @click.prevent=""
> >
<FAIcon :icon="placeholderIconClass" /> <FAIcon :icon="placeholderIconClass" />
<b>{{ nsfw ? "NSFW / " : "" }}</b>{{ this.edit ? '' : placeholderName }} <b>{{ nsfw ? "NSFW / " : "" }}</b>{{ edit ? '' : placeholderName }}
</a> </a>
<div <div
class="attachment-buttons"
v-if="edit || remove" v-if="edit || remove"
class="attachment-buttons"
> >
<button <button
v-if="remove" v-if="remove"
@ -48,13 +48,13 @@
</div> </div>
</button> </button>
<div <div
v-else
class="Attachment" class="Attachment"
:class="classNames" :class="classNames"
v-else
> >
<div <div
class="attachment-wrapper"
v-show="!isEmpty" v-show="!isEmpty"
class="attachment-wrapper"
> >
<a <a
v-if="hidden" v-if="hidden"
@ -76,8 +76,8 @@
/> />
</a> </a>
<div <div
class="attachment-buttons"
v-if="!hidden" v-if="!hidden"
class="attachment-buttons"
> >
<button <button
v-if="type === 'flash' && flashLoaded" v-if="type === 'flash' && flashLoaded"
@ -190,8 +190,8 @@
@click.stop.prevent="openModal" @click.stop.prevent="openModal"
> >
<Flash <Flash
class="flash"
ref="flash" ref="flash"
class="flash"
:src="attachment.large_thumb_url || attachment.url" :src="attachment.large_thumb_url || attachment.url"
@playerOpened="setFlashLoaded(true)" @playerOpened="setFlashLoaded(true)"
@playerClosed="setFlashLoaded(false)" @playerClosed="setFlashLoaded(false)"

View file

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="Gallery"
ref="galleryContainer" ref="galleryContainer"
class="Gallery"
:class="{ '-long': tooManyAttachments && hidingLong }" :class="{ '-long': tooManyAttachments && hidingLong }"
> >
<div class="gallery-rows"> <div class="gallery-rows">
@ -18,8 +18,8 @@
> >
<attachment <attachment
v-for="attachment in row.items" v-for="attachment in row.items"
class="gallery-item"
:key="attachment.id" :key="attachment.id"
class="gallery-item"
:nsfw="nsfw" :nsfw="nsfw"
:attachment="attachment" :attachment="attachment"
:allow-play="false" :allow-play="false"
@ -28,7 +28,7 @@
:remove="removeAttachment" :remove="removeAttachment"
:edit="editAttachment" :edit="editAttachment"
:description="descriptions && descriptions[attachment.id]" :description="descriptions && descriptions[attachment.id]"
:hideDescription="size === 'small' || tooManyAttachments && hidingLong" :hide-description="size === 'small' || tooManyAttachments && hidingLong"
:style="itemStyle(attachment.id, row.items)" :style="itemStyle(attachment.id, row.items)"
@setMedia="onMedia" @setMedia="onMedia"
@naturalSizeLoad="onNaturalSizeLoad" @naturalSizeLoad="onNaturalSizeLoad"
@ -41,7 +41,7 @@
class="many-attachments" class="many-attachments"
> >
<div class="many-attachments-text"> <div class="many-attachments-text">
{{ $t("status.many_attachments", { number: attachments.length })}} {{ $t("status.many_attachments", { number: attachments.length }) }}
</div> </div>
<div class="many-attachments-buttons"> <div class="many-attachments-buttons">
<span <span
@ -67,8 +67,8 @@
</button> </button>
</span> </span>
<span <span
class="many-attachments-button"
v-if="hidingLong" v-if="hidingLong"
class="many-attachments-button"
> >
<button <button
class="button-unstyled -link" class="button-unstyled -link"

View file

@ -296,8 +296,8 @@
:descriptions="newStatus.mediaDescriptions" :descriptions="newStatus.mediaDescriptions"
:set-media="() => $store.dispatch('setMedia', newStatus.files)" :set-media="() => $store.dispatch('setMedia', newStatus.files)"
:editable="true" :editable="true"
:editAttachment="editAttachment" :edit-attachment="editAttachment"
:removeAttachment="removeMediaFile" :remove-attachment="removeMediaFile"
@play="$emit('mediaplay', attachment.id)" @play="$emit('mediaplay', attachment.id)"
@pause="$emit('mediapause', attachment.id)" @pause="$emit('mediapause', attachment.id)"
/> />

View file

@ -1,5 +1,5 @@
<template> <template>
<div <div
class="StatusBody" class="StatusBody"
:class="{ '-compact': compact }" :class="{ '-compact': compact }"
> >

View file

@ -3,7 +3,6 @@ import Poll from '../poll/poll.vue'
import Gallery from '../gallery/gallery.vue' import Gallery from '../gallery/gallery.vue'
import StatusBody from 'src/components/status_body/status_body.vue' import StatusBody from 'src/components/status_body/status_body.vue'
import LinkPreview from '../link-preview/link-preview.vue' import LinkPreview from '../link-preview/link-preview.vue'
import fileType from 'src/services/file_type/file_type.service'
import { mapGetters, mapState } from 'vuex' import { mapGetters, mapState } from 'vuex'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import { import {

View file

@ -1,8 +1,8 @@
<template> <template>
<div <div
class="StatusContent" class="StatusContent"
:class="{ '-compact': compact }" :class="{ '-compact': compact }"
> >
<slot name="header" /> <slot name="header" />
<StatusBody <StatusBody
:status="status" :status="status"
@ -16,11 +16,11 @@
</div> </div>
<gallery <gallery
class="attachments media-body"
v-if="status.attachments.length !== 0" v-if="status.attachments.length !== 0"
class="attachments media-body"
:nsfw="nsfwClickthrough" :nsfw="nsfwClickthrough"
:attachments="status.attachments" :attachments="status.attachments"
:limit="this.compact ? 1 : 0" :limit="compact ? 1 : 0"
:size="attachmentSize" :size="attachmentSize"
@setMedia="onMedia" @setMedia="onMedia"
@play="$emit('mediaplay', attachment.id)" @play="$emit('mediaplay', attachment.id)"