Update PhotoPresenter component, add lightbox toggle

This commit is contained in:
Daniel Supernault 2021-12-14 22:18:56 -07:00
parent 0c8fffbd73
commit 0cc1365f98
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,8 @@
:alt="altText(status)"
:width="width()"
:height="height()"
onerror="this.onerror=null;this.src='/storage/no-preview.png'">
onerror="this.onerror=null;this.src='/storage/no-preview.png'"
@click.prevent="toggleLightbox">
<p v-if="!status.sensitive && sensitive"
@click="status.sensitive = true"
@ -116,6 +117,10 @@
this.$emit('togglecw');
},
toggleLightbox() {
this.$emit('lightbox');
},
width() {
if( !this.status.media_attachments[0].meta ||
!this.status.media_attachments[0].meta.original ||