remaining changes...
This commit is contained in:
parent
3cbaa00449
commit
a50cd7e37d
23 changed files with 162 additions and 97 deletions
|
@ -3,6 +3,20 @@ import VideoAttachment from '../video_attachment/video_attachment.vue'
|
|||
import nsfwImage from '../../assets/nsfw.png'
|
||||
import fileTypeService from '../../services/file_type/file_type.service.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faFile,
|
||||
faMusic,
|
||||
faImage,
|
||||
faVideo
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
faFile,
|
||||
faMusic,
|
||||
faImage,
|
||||
faVideo
|
||||
)
|
||||
|
||||
const Attachment = {
|
||||
props: [
|
||||
|
@ -39,10 +53,10 @@ const Attachment = {
|
|||
return this.attachment.description
|
||||
},
|
||||
placeholderIconClass () {
|
||||
if (this.type === 'image') return 'icon-picture'
|
||||
if (this.type === 'video') return 'icon-video'
|
||||
if (this.type === 'audio') return 'icon-music'
|
||||
return 'icon-doc'
|
||||
if (this.type === 'image') return 'image'
|
||||
if (this.type === 'video') return 'video'
|
||||
if (this.type === 'audio') return 'music'
|
||||
return 'file'
|
||||
},
|
||||
referrerpolicy () {
|
||||
return this.$store.state.instance.mediaProxyAvailable ? '' : 'no-referrer'
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
:alt="attachment.description"
|
||||
:title="attachment.description"
|
||||
>
|
||||
<span :class="placeholderIconClass" />
|
||||
<FAIcon :icon="placeholderIconClass" />
|
||||
<b>{{ nsfw ? "NSFW / " : "" }}</b>{{ placeholderName }}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -36,9 +36,9 @@
|
|||
:src="nsfwImage"
|
||||
:class="{'small': isSmall}"
|
||||
>
|
||||
<i
|
||||
<FAIcon
|
||||
v-if="type === 'video'"
|
||||
class="play-icon icon-play-circled"
|
||||
class="play-icon" icon="play-circle"
|
||||
/>
|
||||
</a>
|
||||
<div
|
||||
|
@ -83,9 +83,9 @@
|
|||
@play="$emit('play')"
|
||||
@pause="$emit('pause')"
|
||||
/>
|
||||
<i
|
||||
<FAIcon
|
||||
v-if="!allowPlay"
|
||||
class="play-icon icon-play-circled"
|
||||
class="play-icon" icon="play-circle"
|
||||
/>
|
||||
</a>
|
||||
|
||||
|
@ -142,6 +142,10 @@
|
|||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
|
||||
svg {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.nsfw-placeholder {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue