Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85630705
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js
index dc64aa7f5b..7dd5cc1714 100644
--- a/src/components/media_modal/media_modal.js
+++ b/src/components/media_modal/media_modal.js
@@ -1,64 +1,64 @@
import Vue from 'vue'
import VueAgile from 'vue-agile'
import VideoAttachment from '../video_attachment/video_attachment.vue'
import fileTypeService from '../../services/file_type/file_type.service.js'
Vue.use(VueAgile)
const MediaModal = {
components: {
VideoAttachment
},
data: () => ({
slideOptions: {
infinite: true,
dots: false,
slidesToShow: 1
}
}),
computed: {
showing () {
return this.$store.state.mediaViewer.activated
},
media () {
return this.$store.state.mediaViewer.media
},
currentIndex () {
return this.$store.state.mediaViewer.currentIndex
}
},
methods: {
- hide (e) {
+ hide () {
this.$store.dispatch('closeMediaViewer')
},
type (file) {
return fileTypeService.fileType(file.mimetype)
},
handleKeydownEvent (e) {
if (!this.showing) return
if (this.showing && e.keyCode === 27) {
// escape key
this.hide()
}
}
},
watch: {
showing (value) {
if (value) {
setTimeout(() => {
this.$refs.agile.setSlide(this.currentIndex, false)
}, 10)
}
}
},
mounted () {
document.addEventListener('keydown', this.handleKeydownEvent)
},
destroyed () {
document.removeEventListener('keydown', this.handleKeydownEvent)
}
}
export default MediaModal
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Aug 9, 8:14 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1724755
Default Alt Text
(1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment