This commit is contained in:
syuilo 2020-09-05 01:27:02 +09:00
parent 1a7a07cb1a
commit c49e5a80be
23 changed files with 42 additions and 42 deletions

View File

@ -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: {

View File

@ -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);

View File

@ -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: {

View File

@ -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);

View File

@ -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);
});

View File

@ -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: {

View File

@ -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
});
}

View File

@ -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
});
}

View File

@ -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({

View File

@ -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,
},

View File

@ -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() {

View File

@ -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() {

View File

@ -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);

View File

@ -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,

View File

@ -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) => {

View File

@ -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;

View File

@ -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,

View File

@ -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() {

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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 = [

View File

@ -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;