Reduce initial bundle size
This commit is contained in:
parent
3cc2049fb3
commit
cd4c7689b7
13 changed files with 67 additions and 46 deletions
|
|
@ -6,11 +6,9 @@ import note from './note.vue';
|
|||
import notes from './notes.vue';
|
||||
import subNoteContent from './sub-note-content.vue';
|
||||
import window from './window.vue';
|
||||
import noteFormWindow from './post-form-window.vue';
|
||||
import renoteFormWindow from './renote-form-window.vue';
|
||||
import mediaVideo from './media-video.vue';
|
||||
import notifications from './notifications.vue';
|
||||
import noteForm from './post-form.vue';
|
||||
import renoteForm from './renote-form.vue';
|
||||
import notePreview from './note-preview.vue';
|
||||
import noteDetail from './note-detail.vue';
|
||||
|
|
@ -25,11 +23,9 @@ Vue.component('mk-note', note);
|
|||
Vue.component('mk-notes', notes);
|
||||
Vue.component('mk-sub-note-content', subNoteContent);
|
||||
Vue.component('mk-window', window);
|
||||
Vue.component('mk-post-form-window', noteFormWindow);
|
||||
Vue.component('mk-renote-form-window', renoteFormWindow);
|
||||
Vue.component('mk-media-video', mediaVideo);
|
||||
Vue.component('mk-notifications', notifications);
|
||||
Vue.component('mk-post-form', noteForm);
|
||||
Vue.component('mk-renote-form', renoteForm);
|
||||
Vue.component('mk-note-preview', notePreview);
|
||||
Vue.component('mk-note-detail', noteDetail);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<div class="mk-post-form-window--body">
|
||||
<mk-note-preview v-if="reply" class="notePreview" :note="reply"/>
|
||||
<mk-post-form ref="form"
|
||||
<x-post-form ref="form"
|
||||
:reply="reply"
|
||||
:mention="mention"
|
||||
@posted="onPosted"
|
||||
|
|
@ -27,9 +27,15 @@
|
|||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import i18n from '../../../i18n';
|
||||
import XPostForm from './post-form.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('desktop/views/components/post-form-window.vue'),
|
||||
|
||||
components: {
|
||||
XPostForm
|
||||
},
|
||||
|
||||
props: {
|
||||
reply: {
|
||||
type: Object,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="mk-post-form"
|
||||
<div class="gjisdzwh"
|
||||
@dragover.stop="onDragover"
|
||||
@dragenter="onDragenter"
|
||||
@dragleave="onDragleave"
|
||||
|
|
@ -519,7 +519,7 @@ export default Vue.extend({
|
|||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-post-form
|
||||
.gjisdzwh
|
||||
display block
|
||||
padding 16px
|
||||
background var(--desktopPostFormBg)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</footer>
|
||||
</template>
|
||||
<template v-if="quote">
|
||||
<mk-post-form ref="form" :renote="note" @posted="onChildFormPosted"/>
|
||||
<x-post-form ref="form" :renote="note" @posted="onChildFormPosted"/>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -22,6 +22,10 @@ import i18n from '../../../i18n';
|
|||
export default Vue.extend({
|
||||
i18n: i18n('desktop/views/components/renote-form.vue'),
|
||||
|
||||
components: {
|
||||
XPostForm: () => import('./post-form.vue').then(m => m.default)
|
||||
},
|
||||
|
||||
props: {
|
||||
note: {
|
||||
type: Object,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="pwbzawku">
|
||||
<mk-post-form class="form" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }" v-if="$store.state.settings.showPostFormOnTopOfTl"/>
|
||||
<x-post-form class="form" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }" v-if="$store.state.settings.showPostFormOnTopOfTl"/>
|
||||
<div class="main">
|
||||
<component :is="src == 'list' ? 'mk-user-list-timeline' : 'x-core'" ref="tl" v-bind="options">
|
||||
<header class="zahtxcqi">
|
||||
|
|
@ -31,8 +31,10 @@ import MkSettingsWindow from '../components/settings-window.vue';
|
|||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('desktop/views/components/timeline.vue'),
|
||||
|
||||
components: {
|
||||
XCore
|
||||
XCore,
|
||||
XPostForm: () => import('../components/post-form.vue').then(m => m.default)
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue