From 90345f158ff2eb12e619dbd7406f2fa81c379637 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 18 Jun 2021 02:01:37 +0300 Subject: gallery now supports flash, fixes for flash component. refactored media modal --- src/components/media_modal/media_modal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/components/media_modal/media_modal.js') diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index e7384c93..b6919366 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -3,6 +3,7 @@ import VideoAttachment from '../video_attachment/video_attachment.vue' import Modal from '../modal/modal.vue' import fileTypeService from '../../services/file_type/file_type.service.js' import GestureService from '../../services/gesture_service/gesture_service' +import Flash from 'src/components/flash/flash.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faChevronLeft, @@ -18,7 +19,8 @@ const MediaModal = { components: { StillImage, VideoAttachment, - Modal + Modal, + Flash }, computed: { showing () { @@ -67,13 +69,13 @@ const MediaModal = { goPrev () { if (this.canNavigate) { const prevIndex = this.currentIndex === 0 ? this.media.length - 1 : (this.currentIndex - 1) - this.$store.dispatch('setCurrent', this.media[prevIndex]) + this.$store.dispatch('setCurrentMedia', this.media[prevIndex]) } }, goNext () { if (this.canNavigate) { const nextIndex = this.currentIndex === this.media.length - 1 ? 0 : (this.currentIndex + 1) - this.$store.dispatch('setCurrent', this.media[nextIndex]) + this.$store.dispatch('setCurrentMedia', this.media[nextIndex]) } }, handleKeyupEvent (e) { -- cgit v1.2.3-70-g09d2 From 34d265467a77d4e680e3c56c254df7dfb904fc18 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 19:45:48 +0300 Subject: add media description into media modal --- src/components/media_modal/media_modal.js | 3 + src/components/media_modal/media_modal.vue | 116 +++++++++++++++++------------ 2 files changed, 71 insertions(+), 48 deletions(-) (limited to 'src/components/media_modal/media_modal.js') diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index b6919366..2e6aa1e3 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -29,6 +29,9 @@ const MediaModal = { media () { return this.$store.state.mediaViewer.media }, + description () { + return this.currentMedia.description + }, currentIndex () { return this.$store.state.mediaViewer.currentIndex }, diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 31455e48..2a571056 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -61,6 +61,12 @@ icon="chevron-right" /> + + {{ description }} + @@ -69,6 +75,7 @@