Move media_viewer module to store
This commit is contained in:
parent
3430604dda
commit
c25cfe540b
8 changed files with 49 additions and 56 deletions
|
|
@ -23,6 +23,7 @@ import {
|
|||
faTimes,
|
||||
faExpandAlt
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { useMediaViewerStore } from '../../stores/media_viewer'
|
||||
|
||||
library.add(
|
||||
faRss,
|
||||
|
|
@ -222,8 +223,8 @@ export default {
|
|||
url: this.user.profile_image_url_original,
|
||||
mimetype: 'image'
|
||||
}
|
||||
this.$store.dispatch('setMedia', [attachment])
|
||||
this.$store.dispatch('setCurrentMedia', attachment)
|
||||
useMediaViewerStore().setMedia([attachment])
|
||||
useMediaViewerStore().setCurrentMedia(attachment)
|
||||
},
|
||||
mentionUser () {
|
||||
usePostStatusStore().openPostStatusModal({ replyTo: true, repliedUser: this.user })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue