better status circular dependency breakup
This commit is contained in:
parent
81af89ff30
commit
03e64df7ee
3 changed files with 18 additions and 20 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
import Status from '../status/status.vue'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
|
@ -7,10 +8,7 @@ library.add(faCircleNotch)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// Quote and Status depend on each other, dynamic import to break this circular dependency
|
Status,
|
||||||
Status: defineAsyncComponent(
|
|
||||||
() => import('src/components/status/status.vue'),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
name: 'Quote',
|
name: 'Quote',
|
||||||
props: {
|
props: {
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,14 @@ import {
|
||||||
highlightClass,
|
highlightClass,
|
||||||
highlightStyle,
|
highlightStyle,
|
||||||
} from '../../services/user_highlighter/user_highlighter.js'
|
} from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import AvatarList from '../avatar_list/avatar_list.vue'
|
import AvatarList from 'src/components/avatar_list/avatar_list.vue'
|
||||||
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
|
import EmojiReactions from 'src/components/emoji_reactions/emoji_reactions.vue'
|
||||||
import Quote from '../quote/quote.vue'
|
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
import StatusContent from '../status_content/status_content.vue'
|
import Timeago from 'src/components/timeago/timeago.vue'
|
||||||
import StatusPopover from '../status_popover/status_popover.vue'
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
import Timeago from '../timeago/timeago.vue'
|
import UserLink from 'src/components/user_link/user_link.vue'
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
import UserListPopover from 'src/components/user_list_popover/user_list_popover.vue'
|
||||||
import UserLink from '../user_link/user_link.vue'
|
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||||
import UserListPopover from '../user_list_popover/user_list_popover.vue'
|
|
||||||
import UserPopover from '../user_popover/user_popover.vue'
|
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
|
|
@ -123,7 +121,9 @@ const Status = {
|
||||||
UserAvatar,
|
UserAvatar,
|
||||||
AvatarList,
|
AvatarList,
|
||||||
Timeago,
|
Timeago,
|
||||||
StatusPopover,
|
StatusPopover: defineAsyncComponent(
|
||||||
|
() => import( 'src/components/status_popover/status_popover.vue')
|
||||||
|
),
|
||||||
UserListPopover,
|
UserListPopover,
|
||||||
EmojiReactions,
|
EmojiReactions,
|
||||||
StatusContent,
|
StatusContent,
|
||||||
|
|
@ -132,7 +132,9 @@ const Status = {
|
||||||
MentionsLine,
|
MentionsLine,
|
||||||
UserPopover,
|
UserPopover,
|
||||||
UserLink,
|
UserLink,
|
||||||
Quote,
|
Quote: defineAsyncComponent(
|
||||||
|
() => import('src/components/quote/quote.vue')
|
||||||
|
),
|
||||||
StatusActionButtons,
|
StatusActionButtons,
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { find } from 'lodash'
|
import { find } from 'lodash'
|
||||||
import { defineAsyncComponent } from 'vue'
|
|
||||||
|
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
|
import Status from '../status/status.vue'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
@ -22,9 +22,7 @@ const StatusPopover = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Status: defineAsyncComponent(
|
Status,
|
||||||
() => import('src/components/status/status.vue'),
|
|
||||||
),
|
|
||||||
Popover,
|
Popover,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue