feat: show alt button even when content hidden

This commit is contained in:
freeplay 2023-07-03 00:02:36 -04:00
parent ac51ce0051
commit b37ba33c12

View file

@ -1,5 +1,6 @@
<template>
<button v-if="hide" class="qjewsnkg" @click="hide = false">
<div class="media" :class="{ mini: plyrMini }">
<button v-if="hide" class="hidden" @click="hide = false">
<ImgWithBlurhash
:hash="media.blurhash"
:title="media.comment"
@ -15,7 +16,7 @@
</div>
</div>
</button>
<div v-else class="gqnyydlz media" :class="{ mini: plyrMini }">
<template v-else>
<a
v-if="media.type.startsWith('image')"
:href="media.url"
@ -57,6 +58,7 @@
<source :src="media.url" :type="media.type" />
</video>
</VuePlyr>
</template>
<div class="buttons">
<button
v-if="media.comment"
@ -67,9 +69,10 @@
<i class="ph-subtitles ph-bold ph-lg"></i>
</button>
<button
v-if="!hide"
v-tooltip="i18n.ts.hide"
class="_button"
@click="hide = true"
@click.stop="hide = true"
>
<i class="ph-eye-slash ph-bold ph-lg"></i>
</button>
@ -141,9 +144,11 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
.qjewsnkg {
.hidden {
all: unset;
position: relative;
width: 100%;
height: 100%;
> .text {
position: relative;