Client: alt text dialog properly handles non-images
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

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

View file

@ -16,7 +16,14 @@
</div>
<div class="hdrwpsaf fullwidth">
<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>
<span>{{ file.type }}</span>
<span>{{ bytes(file.size) }}</span>