lighten up by dynamically loading logged-in pages and non-immideate components
This commit is contained in:
parent
b7ccbc6726
commit
3ccf14d3dd
7 changed files with 134 additions and 65 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||
import EditStatusForm from 'src/components/edit_status_form/edit_status_form.vue'
|
||||
import Gallery from 'src/components/gallery/gallery.vue'
|
||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
@ -15,8 +14,12 @@ library.add(faPollH)
|
|||
|
||||
const Draft = {
|
||||
components: {
|
||||
PostStatusForm,
|
||||
EditStatusForm,
|
||||
PostStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||
),
|
||||
EditStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/edit_status_form/edit_status_form.vue'),
|
||||
),
|
||||
ConfirmModal,
|
||||
StatusContent,
|
||||
Gallery,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import get from 'lodash/get'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import EditStatusForm from '../edit_status_form/edit_status_form.vue'
|
||||
import Modal from '../modal/modal.vue'
|
||||
|
||||
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
||||
|
||||
const EditStatusModal = {
|
||||
components: {
|
||||
EditStatusForm,
|
||||
EditStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/edit_status_form/edit_status_form.vue'),
|
||||
),
|
||||
Modal,
|
||||
},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import get from 'lodash/get'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Modal from '../modal/modal.vue'
|
||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
||||
|
||||
import { usePostStatusStore } from 'src/stores/post_status.js'
|
||||
|
||||
const PostStatusModal = {
|
||||
components: {
|
||||
PostStatusForm,
|
||||
PostStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||
),
|
||||
Modal,
|
||||
},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { unescape as ldUnescape, uniqBy } from 'lodash'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import MentionLink from 'src/components/mention_link/mention_link.vue'
|
||||
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
|
||||
|
|
@ -11,7 +12,6 @@ import {
|
|||
} from '../../services/user_highlighter/user_highlighter.js'
|
||||
import AvatarList from '../avatar_list/avatar_list.vue'
|
||||
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
|
||||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
||||
import Quote from '../quote/quote.vue'
|
||||
import StatusContent from '../status_content/status_content.vue'
|
||||
import StatusPopover from '../status_popover/status_popover.vue'
|
||||
|
|
@ -117,7 +117,9 @@ const controlledOrUncontrolledSet = (obj, name, val) => {
|
|||
const Status = {
|
||||
name: 'Status',
|
||||
components: {
|
||||
PostStatusForm,
|
||||
PostStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||
),
|
||||
UserAvatar,
|
||||
AvatarList,
|
||||
Timeago,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import AuthForm from 'src/components/auth_form/auth_form.js'
|
||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
|
||||
const UserPanel = {
|
||||
computed: {
|
||||
signedIn() {
|
||||
|
|
@ -12,8 +9,12 @@ const UserPanel = {
|
|||
...mapState({ user: (state) => state.users.currentUser }),
|
||||
},
|
||||
components: {
|
||||
AuthForm,
|
||||
PostStatusForm,
|
||||
AuthForm: defineAsyncComponent(
|
||||
() => import('src/components/auth_form/auth_form.js'),
|
||||
),
|
||||
PostStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||
),
|
||||
UserCard: defineAsyncComponent(
|
||||
() => import('src/components/user_card/user_card.vue'),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue