Display player for audio attachments
This commit is contained in:
parent
8321999d2b
commit
530ba50e09
2 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Render custom emojis in display names.
|
- Render custom emojis in display names.
|
||||||
|
- Display player for audio attachments.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<img v-if="attachment.type === 'image'" :src="attachment.url">
|
<img v-if="attachment.type === 'image'" :src="attachment.url">
|
||||||
<video v-else-if="attachment.type === 'video'" :src="attachment.url" controls></video>
|
<video v-else-if="attachment.type === 'video'" :src="attachment.url" controls></video>
|
||||||
|
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url" controls></audio>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
• <a :href="attachment.url">{{ attachment.url }}</a>
|
• <a :href="attachment.url">{{ attachment.url }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,6 +31,7 @@ img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
audio,
|
||||||
video {
|
video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue