wip
This commit is contained in:
parent
1a7a07cb1a
commit
c49e5a80be
|
@ -7,7 +7,7 @@ import { defineComponent, defineAsyncComponent } from 'vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XCode: defineAsyncComponent(() => import('./code-core.vue').then(m => m.default))
|
XCode: defineAsyncComponent(() => import('./code-core.vue'))
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
code: {
|
code: {
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default defineComponent({
|
||||||
icon: faCog,
|
icon: faCog,
|
||||||
text: this.$t('notificationSetting'),
|
text: this.$t('notificationSetting'),
|
||||||
action: async () => {
|
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,
|
includingTypes: this.column.includingTypes,
|
||||||
}).$on('ok', async ({ includingTypes }) => {
|
}).$on('ok', async ({ includingTypes }) => {
|
||||||
this.$set(this.column, 'includingTypes', includingTypes);
|
this.$set(this.column, 'includingTypes', includingTypes);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XFormula: defineAsyncComponent(() => import('./formula-core.vue').then(m => m.default))
|
XFormula: defineAsyncComponent(() => import('./formula-core.vue'))
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
formula: {
|
formula: {
|
||||||
|
|
|
@ -74,9 +74,9 @@ import { utils } from '@syuilo/aiscript';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XNotePreview,
|
XNotePreview,
|
||||||
XUploader: defineAsyncComponent(() => import('./uploader.vue').then(m => m.default)),
|
XUploader: defineAsyncComponent(() => import('./uploader.vue')),
|
||||||
XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue').then(m => m.default)),
|
XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue')),
|
||||||
XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue').then(m => m.default))
|
XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue'))
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -603,7 +603,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async insertEmoji(ev) {
|
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
|
source: ev.currentTarget || ev.target
|
||||||
}).$once('chosen', emoji => {
|
}).$once('chosen', emoji => {
|
||||||
insertTextAtCursor(this.$refs.text, emoji);
|
insertTextAtCursor(this.$refs.text, emoji);
|
||||||
|
|
|
@ -275,7 +275,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async addAcount() {
|
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.$store.dispatch('addAcount', res);
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
@ -285,7 +285,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async createAccount() {
|
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.$store.dispatch('addAcount', res);
|
||||||
this.switchAccountWithToken(res.i);
|
this.switchAccountWithToken(res.i);
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default defineComponent({
|
||||||
MkButton,
|
MkButton,
|
||||||
MkInput,
|
MkInput,
|
||||||
MkSwitch,
|
MkSwitch,
|
||||||
captcha: defineAsyncComponent(() => import('./captcha.vue').then(m => m.default)),
|
captcha: defineAsyncComponent(() => import('./captcha.vue')),
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -165,7 +165,7 @@ export default defineComponent({
|
||||||
id: notification.id
|
id: notification.id
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$root.new(await import('./components/toast.vue').then(m => m.default), {
|
this.$root.new(await import('./components/toast.vue'), {
|
||||||
notification
|
notification
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,8 +101,8 @@ const DESKTOP_THRESHOLD = 1100;
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XSidebar,
|
XSidebar,
|
||||||
XClock: defineAsyncComponent(() => import('./components/header-clock.vue').then(m => m.default)),
|
XClock: defineAsyncComponent(() => import('./components/header-clock.vue')),
|
||||||
MkButton: defineAsyncComponent(() => import('./components/ui/button.vue').then(m => m.default)),
|
MkButton: defineAsyncComponent(() => import('./components/ui/button.vue')),
|
||||||
XDraggable: defineAsyncComponent(() => import('vuedraggable')),
|
XDraggable: defineAsyncComponent(() => import('vuedraggable')),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ export default defineComponent({
|
||||||
id: notification.id
|
id: notification.id
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$root.new(await import('./components/toast.vue').then(m => m.default), {
|
this.$root.new(await import('./components/toast.vue'), {
|
||||||
notification
|
notification
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ class Autocomplete {
|
||||||
|
|
||||||
this.opening = false;
|
this.opening = false;
|
||||||
} else {
|
} else {
|
||||||
const MkAutocomplete = await import('../components/autocomplete.vue').then(m => m.default);
|
const MkAutocomplete = await import('../components/autocomplete.vue');
|
||||||
|
|
||||||
// サジェスト要素作成
|
// サジェスト要素作成
|
||||||
this.suggestion = new MkAutocomplete({
|
this.suggestion = new MkAutocomplete({
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default defineComponent({
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
XTimeline,
|
XTimeline,
|
||||||
XTutorial: defineAsyncComponent(() => import('./index.home.tutorial.vue').then(m => m.default)),
|
XTutorial: defineAsyncComponent(() => import('./index.home.tutorial.vue')),
|
||||||
XPostForm,
|
XPostForm,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default defineComponent({
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Home,
|
Home,
|
||||||
Welcome: defineAsyncComponent(() => import('./index.welcome.vue').then(m => m.default)),
|
Welcome: defineAsyncComponent(() => import('./index.welcome.vue')),
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -259,7 +259,7 @@ export default defineComponent({
|
||||||
MkTextarea,
|
MkTextarea,
|
||||||
MkSwitch,
|
MkSwitch,
|
||||||
MkInfo,
|
MkInfo,
|
||||||
Captcha: defineAsyncComponent(() => import('../../components/captcha.vue').then(m => m.default)),
|
Captcha: defineAsyncComponent(() => import('../../components/captcha.vue')),
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -32,7 +32,7 @@ import { selectFile } from '../../scripts/select-file';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XUploader: defineAsyncComponent(() => import('../../components/uploader.vue').then(m => m.default)),
|
XUploader: defineAsyncComponent(() => import('../../components/uploader.vue')),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
user: {
|
user: {
|
||||||
|
@ -219,7 +219,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async insertEmoji(ev) {
|
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
|
source: ev.currentTarget || ev.target
|
||||||
}).$once('chosen', emoji => {
|
}).$once('chosen', emoji => {
|
||||||
insertTextAtCursor(this.$refs.text, emoji);
|
insertTextAtCursor(this.$refs.text, emoji);
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async generateToken() {
|
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 }) => {
|
}).$on('ok', async ({ name, permissions }) => {
|
||||||
const { token } = await this.$root.api('miauth/gen-token', {
|
const { token } = await this.$root.api('miauth/gen-token', {
|
||||||
session: null,
|
session: null,
|
||||||
|
|
|
@ -113,7 +113,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async configure() {
|
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,
|
includingTypes: this.$store.state.i.includingNotificationTypes,
|
||||||
showGlobalToggle: false,
|
showGlobalToggle: false,
|
||||||
}).$on('ok', async ({ includingTypes: value }: any) => {
|
}).$on('ok', async ({ includingTypes: value }: any) => {
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async chooseEmoji(ev) {
|
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
|
source: ev.currentTarget || ev.target
|
||||||
}).$once('chosen', emoji => {
|
}).$once('chosen', emoji => {
|
||||||
this.reactions += 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) => {
|
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'),
|
title: this.$t('tokenRequested'),
|
||||||
information: this.$t('pluginTokenRequestedDescription'),
|
information: this.$t('pluginTokenRequestedDescription'),
|
||||||
initialName: name,
|
initialName: name,
|
||||||
|
|
|
@ -128,8 +128,8 @@ export default defineComponent({
|
||||||
MkFollowButton,
|
MkFollowButton,
|
||||||
MkContainer,
|
MkContainer,
|
||||||
MkRemoteCaution,
|
MkRemoteCaution,
|
||||||
XPhotos: defineAsyncComponent(() => import('./index.photos.vue').then(m => m.default)),
|
XPhotos: defineAsyncComponent(() => import('./index.photos.vue')),
|
||||||
XActivity: defineAsyncComponent(() => import('./index.activity.vue').then(m => m.default)),
|
XActivity: defineAsyncComponent(() => import('./index.activity.vue')),
|
||||||
},
|
},
|
||||||
|
|
||||||
metaInfo() {
|
metaInfo() {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router';
|
||||||
import MkIndex from './pages/index.vue';
|
import MkIndex from './pages/index.vue';
|
||||||
import { defineAsyncComponent } from '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;
|
let indexScrollPos = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export function selectDriveFile($root: any, multiple) {
|
export function selectDriveFile($root: any, multiple) {
|
||||||
return new Promise((res, rej) => {
|
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, {
|
const w = $root.new(dialog, {
|
||||||
type: 'file',
|
type: 'file',
|
||||||
multiple
|
multiple
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export function selectDriveFolder($root: any, multiple) {
|
export function selectDriveFolder($root: any, multiple) {
|
||||||
return new Promise((res, rej) => {
|
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, {
|
const w = $root.new(dialog, {
|
||||||
type: 'folder',
|
type: 'folder',
|
||||||
multiple
|
multiple
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import { App, defineAsyncComponent } from 'vue';
|
import { App, defineAsyncComponent } from 'vue';
|
||||||
|
|
||||||
export default function(app: App) {
|
export default function(app: App) {
|
||||||
app.component('mkw-welcome', defineAsyncComponent(() => import('./welcome.vue').then(m => m.default)));
|
app.component('mkw-welcome', defineAsyncComponent(() => import('./welcome.vue')));
|
||||||
app.component('mkw-memo', defineAsyncComponent(() => import('./memo.vue').then(m => m.default)));
|
app.component('mkw-memo', defineAsyncComponent(() => import('./memo.vue')));
|
||||||
app.component('mkw-notifications', defineAsyncComponent(() => import('./notifications.vue').then(m => m.default)));
|
app.component('mkw-notifications', defineAsyncComponent(() => import('./notifications.vue')));
|
||||||
app.component('mkw-timeline', defineAsyncComponent(() => import('./timeline.vue').then(m => m.default)));
|
app.component('mkw-timeline', defineAsyncComponent(() => import('./timeline.vue')));
|
||||||
app.component('mkw-calendar', defineAsyncComponent(() => import('./calendar.vue').then(m => m.default)));
|
app.component('mkw-calendar', defineAsyncComponent(() => import('./calendar.vue')));
|
||||||
app.component('mkw-rss', defineAsyncComponent(() => import('./rss.vue').then(m => m.default)));
|
app.component('mkw-rss', defineAsyncComponent(() => import('./rss.vue')));
|
||||||
app.component('mkw-trends', defineAsyncComponent(() => import('./trends.vue').then(m => m.default)));
|
app.component('mkw-trends', defineAsyncComponent(() => import('./trends.vue')));
|
||||||
app.component('mkw-clock', defineAsyncComponent(() => import('./clock.vue').then(m => m.default)));
|
app.component('mkw-clock', defineAsyncComponent(() => import('./clock.vue')));
|
||||||
app.component('mkw-activity', defineAsyncComponent(() => import('./activity.vue').then(m => m.default)));
|
app.component('mkw-activity', defineAsyncComponent(() => import('./activity.vue')));
|
||||||
app.component('mkw-photos', defineAsyncComponent(() => import('./photos.vue').then(m => m.default)));
|
app.component('mkw-photos', defineAsyncComponent(() => import('./photos.vue')));
|
||||||
app.component('mkw-digitalClock', defineAsyncComponent(() => import('./digital-clock.vue').then(m => m.default)));
|
app.component('mkw-digitalClock', defineAsyncComponent(() => import('./digital-clock.vue')));
|
||||||
app.component('mkw-federation', defineAsyncComponent(() => import('./federation.vue').then(m => m.default)));
|
app.component('mkw-federation', defineAsyncComponent(() => import('./federation.vue')));
|
||||||
}
|
}
|
||||||
|
|
||||||
export const widgets = [
|
export const widgets = [
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default defineComponent({
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async configure() {
|
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,
|
includingTypes: this.props.includingTypes,
|
||||||
}).$on('ok', async ({ includingTypes }) => {
|
}).$on('ok', async ({ includingTypes }) => {
|
||||||
this.props.includingTypes = includingTypes;
|
this.props.includingTypes = includingTypes;
|
||||||
|
|
Loading…
Reference in New Issue