wip
This commit is contained in:
parent
1a7a07cb1a
commit
c49e5a80be
|
@ -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: {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue