mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 16:03:02 +00:00
[Client] Split components to reduce bundle size
This commit is contained in:
parent
9f0b8ba2f8
commit
62132570e1
3 changed files with 8 additions and 5 deletions
|
@ -16,7 +16,6 @@ import noteForm from './post-form.vue';
|
||||||
import renoteForm from './renote-form.vue';
|
import renoteForm from './renote-form.vue';
|
||||||
import notePreview from './note-preview.vue';
|
import notePreview from './note-preview.vue';
|
||||||
import noteDetail from './note-detail.vue';
|
import noteDetail from './note-detail.vue';
|
||||||
import settings from './settings.vue';
|
|
||||||
import calendar from './calendar.vue';
|
import calendar from './calendar.vue';
|
||||||
import activity from './activity.vue';
|
import activity from './activity.vue';
|
||||||
import friendsMaker from './friends-maker.vue';
|
import friendsMaker from './friends-maker.vue';
|
||||||
|
@ -40,7 +39,6 @@ Vue.component('mk-post-form', noteForm);
|
||||||
Vue.component('mk-renote-form', renoteForm);
|
Vue.component('mk-renote-form', renoteForm);
|
||||||
Vue.component('mk-note-preview', notePreview);
|
Vue.component('mk-note-preview', notePreview);
|
||||||
Vue.component('mk-note-detail', noteDetail);
|
Vue.component('mk-note-detail', noteDetail);
|
||||||
Vue.component('mk-settings', settings);
|
|
||||||
Vue.component('mk-calendar', calendar);
|
Vue.component('mk-calendar', calendar);
|
||||||
Vue.component('mk-activity', activity);
|
Vue.component('mk-activity', activity);
|
||||||
Vue.component('mk-friends-maker', friendsMaker);
|
Vue.component('mk-friends-maker', friendsMaker);
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<mk-window ref="window" is-modal width="700px" height="550px" @closed="destroyDom">
|
<mk-window ref="window" is-modal width="700px" height="550px" @closed="destroyDom">
|
||||||
<span slot="header" :class="$style.header"><fa icon="cog"/>{{ $t('settings') }}</span>
|
<span slot="header" :class="$style.header"><fa icon="cog"/>{{ $t('settings') }}</span>
|
||||||
<mk-settings :initial-page="initialPage" @done="close"/>
|
<x-settings :initial-page="initialPage" @done="close"/>
|
||||||
</mk-window>
|
</mk-window>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../../../i18n';
|
import i18n from '../../../i18n';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n: i18n('desktop/views/components/settings-window.vue'),
|
i18n: i18n('desktop/views/components/settings-window.vue'),
|
||||||
|
|
||||||
|
components: {
|
||||||
|
XSettings: () => import('./settings.vue').then(m => m.default)
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
initialPage: {
|
initialPage: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -27,7 +27,6 @@ import MkFollowing from './views/pages/following.vue';
|
||||||
import MkFavorites from './views/pages/favorites.vue';
|
import MkFavorites from './views/pages/favorites.vue';
|
||||||
import MkUserLists from './views/pages/user-lists.vue';
|
import MkUserLists from './views/pages/user-lists.vue';
|
||||||
import MkUserList from './views/pages/user-list.vue';
|
import MkUserList from './views/pages/user-list.vue';
|
||||||
import MkSettings from './views/pages/settings.vue';
|
|
||||||
import MkReversi from './views/pages/games/reversi.vue';
|
import MkReversi from './views/pages/games/reversi.vue';
|
||||||
import MkTag from './views/pages/tag.vue';
|
import MkTag from './views/pages/tag.vue';
|
||||||
import MkShare from './views/pages/share.vue';
|
import MkShare from './views/pages/share.vue';
|
||||||
|
@ -137,7 +136,7 @@ init((launch) => {
|
||||||
routes: [
|
routes: [
|
||||||
{ path: '/', name: 'index', component: MkIndex },
|
{ path: '/', name: 'index', component: MkIndex },
|
||||||
{ path: '/signup', name: 'signup', component: MkSignup },
|
{ path: '/signup', name: 'signup', component: MkSignup },
|
||||||
{ path: '/i/settings', name: 'settings', component: MkSettings },
|
{ path: '/i/settings', name: 'settings', component: () => import('./views/pages/settings.vue').then(m => m.default) },
|
||||||
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
|
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
|
||||||
{ path: '/i/favorites', name: 'favorites', component: MkFavorites },
|
{ path: '/i/favorites', name: 'favorites', component: MkFavorites },
|
||||||
{ path: '/i/lists', name: 'user-lists', component: MkUserLists },
|
{ path: '/i/lists', name: 'user-lists', component: MkUserLists },
|
||||||
|
|
Loading…
Reference in a new issue