From 4859e63a89e641d5eb9b3afb2d328fd6adb4a9b3 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 12 Feb 2021 18:14:54 +0200 Subject: Remove body scrollbar in chat layout, keep nav bar still on scroll lock, add tiny fade for media modal --- src/components/media_modal/media_modal.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/components/media_modal') diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index ea7f7a7f..34394e7e 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -73,11 +73,22 @@ } } +@keyframes media-fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + .modal-image { max-width: 90%; max-height: 90%; box-shadow: 0px 5px 15px 0 rgba(0, 0, 0, 0.5); image-orientation: from-image; // NOTE: only FF supports this + opacity: 1; + animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein; } .modal-view-button-arrow { -- cgit v1.2.3-70-g09d2 From 398aac65585cf7f743f323aa75d05646470da1d5 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 12 Feb 2021 18:47:10 +0200 Subject: remove redundant opacity2 --- src/components/media_modal/media_modal.vue | 1 - 1 file changed, 1 deletion(-) (limited to 'src/components/media_modal') diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 34394e7e..54bc5335 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -87,7 +87,6 @@ max-height: 90%; box-shadow: 0px 5px 15px 0 rgba(0, 0, 0, 0.5); image-orientation: from-image; // NOTE: only FF supports this - opacity: 1; animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein; } -- cgit v1.2.3-70-g09d2 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/attachment/attachment.js | 9 +++++---- src/components/flash/flash.vue | 21 ++++++++++++--------- src/components/media_modal/media_modal.js | 8 +++++--- src/components/media_modal/media_modal.vue | 7 +++++++ src/components/status_content/status_content.js | 6 ------ src/components/status_content/status_content.vue | 2 +- src/components/user_card/user_card.js | 2 +- src/modules/media_viewer.js | 9 +++++---- 8 files changed, 36 insertions(+), 28 deletions(-) (limited to 'src/components/media_modal') diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 06928ca6..3ea96a7a 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -113,13 +113,14 @@ const Attachment = { }, openModal (event) { if (this.useModal) { - this.setMedia() - this.$store.dispatch('setCurrent', this.attachment) + this.$emit('setMedia') + this.$store.dispatch('setCurrentMedia', this.attachment) } }, openModalForce (event) { - this.setMedia() - this.$store.dispatch('setCurrent', this.attachment) + this.$emit('setMedia') + this.$store.dispatch('setCurrentMedia', this.attachment) + }, }, stopFlash () { this.$refs.flash.closePlayer() diff --git a/src/components/flash/flash.vue b/src/components/flash/flash.vue index 5a77d235..95f71950 100644 --- a/src/components/flash/flash.vue +++ b/src/components/flash/flash.vue @@ -44,8 +44,9 @@ 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) { diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 54bc5335..a578bc71 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -28,6 +28,13 @@ :title="currentMedia.description" controls /> + + + {{ description }} + @@ -69,6 +75,7 @@