Procházet zdrojové kódy

Update PhotoPresenter component, add lightbox toggle

Daniel Supernault před 3 roky
rodič
revize
0cc1365f98

+ 6 - 1
resources/assets/js/components/presenter/PhotoPresenter.vue

@@ -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 ||