mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update PhotoPresenter component, add lightbox toggle
This commit is contained in:
parent
0c8fffbd73
commit
0cc1365f98
1 changed files with 6 additions and 1 deletions
|
@ -29,7 +29,8 @@
|
||||||
:alt="altText(status)"
|
:alt="altText(status)"
|
||||||
:width="width()"
|
:width="width()"
|
||||||
:height="height()"
|
: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"
|
<p v-if="!status.sensitive && sensitive"
|
||||||
@click="status.sensitive = true"
|
@click="status.sensitive = true"
|
||||||
|
@ -116,6 +117,10 @@
|
||||||
this.$emit('togglecw');
|
this.$emit('togglecw');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleLightbox() {
|
||||||
|
this.$emit('lightbox');
|
||||||
|
},
|
||||||
|
|
||||||
width() {
|
width() {
|
||||||
if( !this.status.media_attachments[0].meta ||
|
if( !this.status.media_attachments[0].meta ||
|
||||||
!this.status.media_attachments[0].meta.original ||
|
!this.status.media_attachments[0].meta.original ||
|
||||||
|
|
Loading…
Reference in a new issue