Move statusHistory module to store
This commit is contained in:
parent
c25cfe540b
commit
872569ae8e
5 changed files with 23 additions and 31 deletions
|
|
@ -17,6 +17,7 @@ import {
|
|||
faFlag
|
||||
} from '@fortawesome/free-regular-svg-icons'
|
||||
import { useEditStatusStore } from '../../stores/editStatus'
|
||||
import { useStatusHistoryStore } from '../../stores/statusHistory'
|
||||
|
||||
library.add(
|
||||
faEllipsisH,
|
||||
|
|
@ -123,7 +124,7 @@ const ExtraButtons = {
|
|||
const originalStatus = { ...this.status }
|
||||
const stripFieldsList = ['attachments', 'created_at', 'emojis', 'text', 'raw_html', 'nsfw', 'poll', 'summary', 'summary_raw_html']
|
||||
stripFieldsList.forEach(p => delete originalStatus[p])
|
||||
this.$store.dispatch('openStatusHistoryModal', originalStatus)
|
||||
useStatusHistoryStore().openStatusHistoryModal(originalStatus)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { get } from 'lodash'
|
||||
import Modal from '../modal/modal.vue'
|
||||
import Status from '../status/status.vue'
|
||||
import { useStatusHistoryStore } from '../../stores/statusHistory'
|
||||
|
||||
const StatusHistoryModal = {
|
||||
components: {
|
||||
|
|
@ -14,10 +15,10 @@ const StatusHistoryModal = {
|
|||
},
|
||||
computed: {
|
||||
modalActivated () {
|
||||
return this.$store.state.statusHistory.modalActivated
|
||||
return useStatusHistoryStore().modalActivated
|
||||
},
|
||||
params () {
|
||||
return this.$store.state.statusHistory.params
|
||||
return useStatusHistoryStore().params
|
||||
},
|
||||
statusId () {
|
||||
return this.params.id
|
||||
|
|
@ -52,7 +53,7 @@ const StatusHistoryModal = {
|
|||
})
|
||||
},
|
||||
closeModal () {
|
||||
this.$store.dispatch('closeStatusHistoryModal')
|
||||
useStatusHistoryStore().closeStatusHistoryModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue