feat(client): Improve image viewer

Resolve #7545
Resolve #6811
Close #7808
This commit is contained in:
syuilo
2021-10-25 02:28:18 +09:00
parent 67bf6ff3ce
commit e52a9e0a65
5 changed files with 67 additions and 62 deletions

View File

@@ -12,7 +12,6 @@
<a
:href="image.url"
:title="image.name"
@click.prevent="onClick"
>
<ImgWithBlurhash :hash="image.blurhash" :src="url" :alt="image.comment" :title="image.comment" :cover="false"/>
<div class="gif" v-if="image.type === 'image/gif'">GIF</div>
@@ -73,17 +72,6 @@ export default defineComponent({
immediate: true,
});
},
methods: {
onClick() {
if (this.$store.state.imageNewTab) {
window.open(this.image.url, '_blank');
} else {
os.popup(ImageViewer, {
image: this.image
}, {}, 'closed');
}
}
}
});
</script>