feat: show alt button even when content hidden
This commit is contained in:
parent
27625b67da
commit
bcb62f1c16
1 changed files with 60 additions and 55 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue