pleroma-fe/src/components/status_popover/status_popover.js

27 lines
519 B
JavaScript
Raw Normal View History

import { find } from 'lodash'
const StatusPopover = {
name: 'StatusPopover',
props: [
'statusId'
],
2019-10-25 13:14:53 +11:00
computed: {
status () {
return find(this.$store.state.statuses.allStatuses, { id: this.statusId })
}
},
components: {
2020-02-29 03:39:47 +11:00
Status: () => import('../status/status.vue'),
Popover: () => import('../popover/popover.vue')
},
methods: {
enter () {
2019-10-25 13:14:53 +11:00
if (!this.status) {
2019-10-25 13:21:33 +11:00
this.$store.dispatch('fetchStatus', this.statusId)
}
}
}
}
export default StatusPopover