Client: alt text dialog properly handles non-images

Changelog: Changed
This commit is contained in:
Johann150 2022-09-04 00:07:18 +02:00
parent 525c8391a6
commit 00c8eff611
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -16,7 +16,14 @@
</div> </div>
<div class="hdrwpsaf fullwidth"> <div class="hdrwpsaf fullwidth">
<header>{{ file.name }}</header> <header>{{ file.name }}</header>
<img :src="file.url" @click="modal.close()"/> <img v-if="file.type.startsWidth('image/')" :src="file.url" @click="modal.close()"/>
<video v-else-if="file.type.startsWidth('video/')" controls>
<source :src="file.url" :type="file.type">
</video>
<audio v-else-if="file.type.startsWidth('audio/')" controls>
<source :src="file.url" :type="file.type">
</audio>
<a v-else :href="file.url">{{ file.url }}</a>
<footer> <footer>
<span>{{ file.type }}</span> <span>{{ file.type }}</span>
<span>{{ bytes(file.size) }}</span> <span>{{ bytes(file.size) }}</span>