diff --git a/src/client/components/code.vue b/src/client/components/code.vue index a82411a458..95a616539c 100644 --- a/src/client/components/code.vue +++ b/src/client/components/code.vue @@ -7,7 +7,7 @@ import { defineComponent, defineAsyncComponent } from 'vue'; export default defineComponent({ components: { - XCode: defineAsyncComponent(() => import('./code-core.vue').then(m => m.default)) + XCode: defineAsyncComponent(() => import('./code-core.vue')) }, props: { code: { diff --git a/src/client/components/deck/notifications-column.vue b/src/client/components/deck/notifications-column.vue index 84b4840c81..fb6fd2fdc0 100644 --- a/src/client/components/deck/notifications-column.vue +++ b/src/client/components/deck/notifications-column.vue @@ -42,7 +42,7 @@ export default defineComponent({ icon: faCog, text: this.$t('notificationSetting'), action: async () => { - this.$root.new(await import('../notification-setting-window.vue').then(m => m.default), { + this.$root.new(await import('../notification-setting-window.vue'), { includingTypes: this.column.includingTypes, }).$on('ok', async ({ includingTypes }) => { this.$set(this.column, 'includingTypes', includingTypes); diff --git a/src/client/components/formula.vue b/src/client/components/formula.vue index 0284063a44..9ea44b2988 100644 --- a/src/client/components/formula.vue +++ b/src/client/components/formula.vue @@ -6,7 +6,7 @@ import { defineComponent, defineAsyncComponent } from 'vue'; export default defineComponent({ components: { - XFormula: defineAsyncComponent(() => import('./formula-core.vue').then(m => m.default)) + XFormula: defineAsyncComponent(() => import('./formula-core.vue')) }, props: { formula: { diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index af74a8b262..d0d1f99576 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -74,9 +74,9 @@ import { utils } from '@syuilo/aiscript'; export default defineComponent({ components: { XNotePreview, - XUploader: defineAsyncComponent(() => import('./uploader.vue').then(m => m.default)), - XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue').then(m => m.default)), - XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue').then(m => m.default)) + XUploader: defineAsyncComponent(() => import('./uploader.vue')), + XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue')), + XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue')) }, props: { @@ -603,7 +603,7 @@ export default defineComponent({ }, async insertEmoji(ev) { - const vm = this.$root.new(await import('./emoji-picker.vue').then(m => m.default), { + const vm = this.$root.new(await import('./emoji-picker.vue'), { source: ev.currentTarget || ev.target }).$once('chosen', emoji => { insertTextAtCursor(this.$refs.text, emoji); diff --git a/src/client/components/sidebar.vue b/src/client/components/sidebar.vue index 7c48f6c5cb..6e9c3864d4 100644 --- a/src/client/components/sidebar.vue +++ b/src/client/components/sidebar.vue @@ -275,7 +275,7 @@ export default defineComponent({ }, async addAcount() { - this.$root.new(await import('./signin-dialog.vue').then(m => m.default)).$once('login', res => { + this.$root.new(await import('./signin-dialog.vue')).$once('login', res => { this.$store.dispatch('addAcount', res); this.$root.dialog({ type: 'success', @@ -285,7 +285,7 @@ export default defineComponent({ }, async createAccount() { - this.$root.new(await import('./signup-dialog.vue').then(m => m.default)).$once('signup', res => { + this.$root.new(await import('./signup-dialog.vue')).$once('signup', res => { this.$store.dispatch('addAcount', res); this.switchAccountWithToken(res.i); }); diff --git a/src/client/components/signup.vue b/src/client/components/signup.vue index c4ab9de6ef..8da92997e9 100644 --- a/src/client/components/signup.vue +++ b/src/client/components/signup.vue @@ -63,7 +63,7 @@ export default defineComponent({ MkButton, MkInput, MkSwitch, - captcha: defineAsyncComponent(() => import('./captcha.vue').then(m => m.default)), + captcha: defineAsyncComponent(() => import('./captcha.vue')), }, props: { diff --git a/src/client/deck.vue b/src/client/deck.vue index 441f5ea38e..cb84214281 100644 --- a/src/client/deck.vue +++ b/src/client/deck.vue @@ -165,7 +165,7 @@ export default defineComponent({ id: notification.id }); - this.$root.new(await import('./components/toast.vue').then(m => m.default), { + this.$root.new(await import('./components/toast.vue'), { notification }); } diff --git a/src/client/default.vue b/src/client/default.vue index 9a6369d7f2..84810945dd 100644 --- a/src/client/default.vue +++ b/src/client/default.vue @@ -101,8 +101,8 @@ const DESKTOP_THRESHOLD = 1100; export default defineComponent({ components: { XSidebar, - XClock: defineAsyncComponent(() => import('./components/header-clock.vue').then(m => m.default)), - MkButton: defineAsyncComponent(() => import('./components/ui/button.vue').then(m => m.default)), + XClock: defineAsyncComponent(() => import('./components/header-clock.vue')), + MkButton: defineAsyncComponent(() => import('./components/ui/button.vue')), XDraggable: defineAsyncComponent(() => import('vuedraggable')), }, @@ -334,7 +334,7 @@ export default defineComponent({ id: notification.id }); - this.$root.new(await import('./components/toast.vue').then(m => m.default), { + this.$root.new(await import('./components/toast.vue'), { notification }); } diff --git a/src/client/directives/autocomplete.ts b/src/client/directives/autocomplete.ts index a3e16135df..9ba950b02f 100644 --- a/src/client/directives/autocomplete.ts +++ b/src/client/directives/autocomplete.ts @@ -155,7 +155,7 @@ class Autocomplete { this.opening = false; } else { - const MkAutocomplete = await import('../components/autocomplete.vue').then(m => m.default); + const MkAutocomplete = await import('../components/autocomplete.vue'); // サジェスト要素作成 this.suggestion = new MkAutocomplete({ diff --git a/src/client/pages/index.home.vue b/src/client/pages/index.home.vue index 45d613162d..94261f470a 100644 --- a/src/client/pages/index.home.vue +++ b/src/client/pages/index.home.vue @@ -42,7 +42,7 @@ export default defineComponent({ components: { XTimeline, - XTutorial: defineAsyncComponent(() => import('./index.home.tutorial.vue').then(m => m.default)), + XTutorial: defineAsyncComponent(() => import('./index.home.tutorial.vue')), XPostForm, }, diff --git a/src/client/pages/index.vue b/src/client/pages/index.vue index 8ca51241c1..6000a5627d 100644 --- a/src/client/pages/index.vue +++ b/src/client/pages/index.vue @@ -11,7 +11,7 @@ export default defineComponent({ components: { Home, - Welcome: defineAsyncComponent(() => import('./index.welcome.vue').then(m => m.default)), + Welcome: defineAsyncComponent(() => import('./index.welcome.vue')), }, data() { diff --git a/src/client/pages/instance/settings.vue b/src/client/pages/instance/settings.vue index e21b4a5724..2048cd0b22 100644 --- a/src/client/pages/instance/settings.vue +++ b/src/client/pages/instance/settings.vue @@ -259,7 +259,7 @@ export default defineComponent({ MkTextarea, MkSwitch, MkInfo, - Captcha: defineAsyncComponent(() => import('../../components/captcha.vue').then(m => m.default)), + Captcha: defineAsyncComponent(() => import('../../components/captcha.vue')), }, data() { diff --git a/src/client/pages/messaging/messaging-room.form.vue b/src/client/pages/messaging/messaging-room.form.vue index 05ffe9d539..4103150a87 100644 --- a/src/client/pages/messaging/messaging-room.form.vue +++ b/src/client/pages/messaging/messaging-room.form.vue @@ -32,7 +32,7 @@ import { selectFile } from '../../scripts/select-file'; export default defineComponent({ components: { - XUploader: defineAsyncComponent(() => import('../../components/uploader.vue').then(m => m.default)), + XUploader: defineAsyncComponent(() => import('../../components/uploader.vue')), }, props: { user: { @@ -219,7 +219,7 @@ export default defineComponent({ }, async insertEmoji(ev) { - const vm = this.$root.new(await import('../../components/emoji-picker.vue').then(m => m.default), { + const vm = this.$root.new(await import('../../components/emoji-picker.vue'), { source: ev.currentTarget || ev.target }).$once('chosen', emoji => { insertTextAtCursor(this.$refs.text, emoji); diff --git a/src/client/pages/my-settings/api.vue b/src/client/pages/my-settings/api.vue index bd0014c738..35dac16758 100644 --- a/src/client/pages/my-settings/api.vue +++ b/src/client/pages/my-settings/api.vue @@ -25,7 +25,7 @@ export default defineComponent({ }, methods: { async generateToken() { - this.$root.new(await import('../../components/token-generate-window.vue').then(m => m.default), { + this.$root.new(await import('../../components/token-generate-window.vue'), { }).$on('ok', async ({ name, permissions }) => { const { token } = await this.$root.api('miauth/gen-token', { session: null, diff --git a/src/client/pages/my-settings/index.vue b/src/client/pages/my-settings/index.vue index 4d637b3097..f70d2e038e 100644 --- a/src/client/pages/my-settings/index.vue +++ b/src/client/pages/my-settings/index.vue @@ -113,7 +113,7 @@ export default defineComponent({ }, async configure() { - this.$root.new(await import('../../components/notification-setting-window.vue').then(m => m.default), { + this.$root.new(await import('../../components/notification-setting-window.vue'), { includingTypes: this.$store.state.i.includingNotificationTypes, showGlobalToggle: false, }).$on('ok', async ({ includingTypes: value }: any) => { diff --git a/src/client/pages/my-settings/reaction.vue b/src/client/pages/my-settings/reaction.vue index 12b3270b5c..9474e865f1 100644 --- a/src/client/pages/my-settings/reaction.vue +++ b/src/client/pages/my-settings/reaction.vue @@ -72,7 +72,7 @@ export default defineComponent({ }, async chooseEmoji(ev) { - const vm = this.$root.new(await import('../../components/emoji-picker.vue').then(m => m.default), { + const vm = this.$root.new(await import('../../components/emoji-picker.vue'), { source: ev.currentTarget || ev.target }).$once('chosen', emoji => { this.reactions += emoji; diff --git a/src/client/pages/preferences/plugins.vue b/src/client/pages/preferences/plugins.vue index 2eb5725dd5..3cb64a64cd 100644 --- a/src/client/pages/preferences/plugins.vue +++ b/src/client/pages/preferences/plugins.vue @@ -117,7 +117,7 @@ export default defineComponent({ } const token = permissions == null || permissions.length === 0 ? null : await new Promise(async (res, rej) => { - this.$root.new(await import('../../components/token-generate-window.vue').then(m => m.default), { + this.$root.new(await import('../../components/token-generate-window.vue'), { title: this.$t('tokenRequested'), information: this.$t('pluginTokenRequestedDescription'), initialName: name, diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index 33d3e4ef4f..b620f3aa1f 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -128,8 +128,8 @@ export default defineComponent({ MkFollowButton, MkContainer, MkRemoteCaution, - XPhotos: defineAsyncComponent(() => import('./index.photos.vue').then(m => m.default)), - XActivity: defineAsyncComponent(() => import('./index.activity.vue').then(m => m.default)), + XPhotos: defineAsyncComponent(() => import('./index.photos.vue')), + XActivity: defineAsyncComponent(() => import('./index.activity.vue')), }, metaInfo() { diff --git a/src/client/router.ts b/src/client/router.ts index ae3bbc5f84..7a83592b1e 100644 --- a/src/client/router.ts +++ b/src/client/router.ts @@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'; import MkIndex from './pages/index.vue'; import { defineAsyncComponent } from 'vue'; -const page = (path: string) => defineAsyncComponent(() => import(`./pages/${path}.vue`).then(m => m.default)); +const page = (path: string) => defineAsyncComponent(() => import(`./pages/${path}.vue`)); let indexScrollPos = 0; diff --git a/src/client/scripts/select-drive-file.ts b/src/client/scripts/select-drive-file.ts index 3a4ac70007..cd36ea55a5 100644 --- a/src/client/scripts/select-drive-file.ts +++ b/src/client/scripts/select-drive-file.ts @@ -1,6 +1,6 @@ export function selectDriveFile($root: any, multiple) { return new Promise((res, rej) => { - import('../components/drive-window.vue').then(m => m.default).then(dialog => { + import('../components/drive-window.vue').then(dialog => { const w = $root.new(dialog, { type: 'file', multiple diff --git a/src/client/scripts/select-drive-folder.ts b/src/client/scripts/select-drive-folder.ts index 313d552e3a..9814dac86c 100644 --- a/src/client/scripts/select-drive-folder.ts +++ b/src/client/scripts/select-drive-folder.ts @@ -1,6 +1,6 @@ export function selectDriveFolder($root: any, multiple) { return new Promise((res, rej) => { - import('../components/drive-window.vue').then(m => m.default).then(dialog => { + import('../components/drive-window.vue').then(dialog => { const w = $root.new(dialog, { type: 'folder', multiple diff --git a/src/client/widgets/index.ts b/src/client/widgets/index.ts index b9561b59ab..92372d30eb 100644 --- a/src/client/widgets/index.ts +++ b/src/client/widgets/index.ts @@ -1,18 +1,18 @@ import { App, defineAsyncComponent } from 'vue'; export default function(app: App) { - app.component('mkw-welcome', defineAsyncComponent(() => import('./welcome.vue').then(m => m.default))); - app.component('mkw-memo', defineAsyncComponent(() => import('./memo.vue').then(m => m.default))); - app.component('mkw-notifications', defineAsyncComponent(() => import('./notifications.vue').then(m => m.default))); - app.component('mkw-timeline', defineAsyncComponent(() => import('./timeline.vue').then(m => m.default))); - app.component('mkw-calendar', defineAsyncComponent(() => import('./calendar.vue').then(m => m.default))); - app.component('mkw-rss', defineAsyncComponent(() => import('./rss.vue').then(m => m.default))); - app.component('mkw-trends', defineAsyncComponent(() => import('./trends.vue').then(m => m.default))); - app.component('mkw-clock', defineAsyncComponent(() => import('./clock.vue').then(m => m.default))); - app.component('mkw-activity', defineAsyncComponent(() => import('./activity.vue').then(m => m.default))); - app.component('mkw-photos', defineAsyncComponent(() => import('./photos.vue').then(m => m.default))); - app.component('mkw-digitalClock', defineAsyncComponent(() => import('./digital-clock.vue').then(m => m.default))); - app.component('mkw-federation', defineAsyncComponent(() => import('./federation.vue').then(m => m.default))); + app.component('mkw-welcome', defineAsyncComponent(() => import('./welcome.vue'))); + app.component('mkw-memo', defineAsyncComponent(() => import('./memo.vue'))); + app.component('mkw-notifications', defineAsyncComponent(() => import('./notifications.vue'))); + app.component('mkw-timeline', defineAsyncComponent(() => import('./timeline.vue'))); + app.component('mkw-calendar', defineAsyncComponent(() => import('./calendar.vue'))); + app.component('mkw-rss', defineAsyncComponent(() => import('./rss.vue'))); + app.component('mkw-trends', defineAsyncComponent(() => import('./trends.vue'))); + app.component('mkw-clock', defineAsyncComponent(() => import('./clock.vue'))); + app.component('mkw-activity', defineAsyncComponent(() => import('./activity.vue'))); + app.component('mkw-photos', defineAsyncComponent(() => import('./photos.vue'))); + app.component('mkw-digitalClock', defineAsyncComponent(() => import('./digital-clock.vue'))); + app.component('mkw-federation', defineAsyncComponent(() => import('./federation.vue'))); } export const widgets = [ diff --git a/src/client/widgets/notifications.vue b/src/client/widgets/notifications.vue index 5702670b21..9630d9d6fd 100644 --- a/src/client/widgets/notifications.vue +++ b/src/client/widgets/notifications.vue @@ -50,7 +50,7 @@ export default defineComponent({ methods: { async configure() { - this.$root.new(await import('../components/notification-setting-window.vue').then(m => m.default), { + this.$root.new(await import('../components/notification-setting-window.vue'), { includingTypes: this.props.includingTypes, }).$on('ok', async ({ includingTypes }) => { this.props.includingTypes = includingTypes;