Reduce initial bundle size
This commit is contained in:
parent
3cc2049fb3
commit
cd4c7689b7
13 changed files with 67 additions and 46 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<h1>{{ $t('share-with', { name }) }}</h1>
|
||||
<div>
|
||||
<mk-signin v-if="!$store.getters.isSignedIn"/>
|
||||
<mk-post-form v-else-if="!posted" :initial-text="template" :instant="true" @posted="posted = true"/>
|
||||
<x-post-form v-else-if="!posted" :initial-text="template" :instant="true" @posted="posted = true"/>
|
||||
<p v-if="posted" class="posted"><fa icon="check"/></p>
|
||||
</div>
|
||||
<ui-button class="close" v-if="posted" @click="close">{{ $t('@.close') }}</ui-button>
|
||||
|
|
@ -16,6 +16,9 @@ import i18n from '../../../i18n';
|
|||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('mobile/views/pages/share.vue'),
|
||||
components: {
|
||||
XPostForm: () => import('../../../desktop/views/components/post-form.vue').then(m => m.default)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: null,
|
||||
|
|
@ -35,15 +38,15 @@ export default Vue.extend({
|
|||
return t.trim();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
window.close();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
this.name = meta.name || 'Misskey';
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
import define from '../../../common/define-widget';
|
||||
import i18n from '../../../i18n';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import XPostFormAttaches from '../components/post-form-attaches.vue';
|
||||
|
||||
export default define({
|
||||
name: 'post-form',
|
||||
|
|
@ -49,7 +48,7 @@ export default define({
|
|||
i18n: i18n('desktop/views/widgets/post-form.vue'),
|
||||
|
||||
components: {
|
||||
XPostFormAttaches
|
||||
XPostFormAttaches: () => import('../components/post-form-attaches.vue').then(m => m.default)
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue