This commit is contained in:
Tusooa Zhu 2021-08-02 22:45:19 -04:00
parent 3366c915e9
commit 4c2a7aabe5
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 3 additions and 8 deletions

View file

@ -133,11 +133,6 @@
animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein;
}
//.modal-image {
// height: 90vh;
// width: 100%;
//}
.modal-view-button-arrow {
position: absolute;
display: block;

View file

@ -19,18 +19,18 @@ const mediaViewer = {
}
},
actions: {
setMedia ({ commit, dispatch }, attachments) {
setMedia ({ commit }, attachments) {
const media = attachments.filter(attachment => {
const type = fileTypeService.fileType(attachment.mimetype)
return type === 'image' || type === 'video' || type === 'audio'
})
commit('setMedia', media)
},
setCurrent ({ commit, state, dispatch }, current) {
setCurrent ({ commit, state }, current) {
const index = state.media.indexOf(current)
commit('setCurrent', index || 0)
},
closeMediaViewer ({ commit, dispatch }) {
closeMediaViewer ({ commit }) {
commit('close')
}
}