diff --git a/packages/client/src/components/MkAbuseReportWindow.vue b/packages/client/src/components/MkAbuseReportWindow.vue index 03890b4e9..039f77c85 100644 --- a/packages/client/src/components/MkAbuseReportWindow.vue +++ b/packages/client/src/components/MkAbuseReportWindow.vue @@ -50,7 +50,7 @@ function send() { }, undefined).then(res => { os.alert({ type: 'success', - text: i18n.ts.abuseReported + text: i18n.ts.abuseReported, }); uiWindow.value?.close(); emit('closed'); diff --git a/packages/client/src/components/MkAutocomplete.vue b/packages/client/src/components/MkAutocomplete.vue index 144281e3c..e1fd5693b 100644 --- a/packages/client/src/components/MkAutocomplete.vue +++ b/packages/client/src/components/MkAutocomplete.vue @@ -86,7 +86,7 @@ for (const x of customEmojis) { name: x.name, emoji: `:${x.name}:`, url: x.url, - isCustomEmoji: true + isCustomEmoji: true, }); if (x.aliases) { @@ -96,7 +96,7 @@ for (const x of customEmojis) { aliasOf: x.name, emoji: `:${x.name}:`, url: x.url, - isCustomEmoji: true + isCustomEmoji: true, }); } } @@ -193,7 +193,7 @@ function exec() { os.api('users/search-by-username-and-host', { username: props.q, limit: 10, - detail: false + detail: false, }).then(searchedUsers => { users.value = searchedUsers as any[]; fetching.value = false; @@ -215,7 +215,7 @@ function exec() { } else { os.api('hashtags/search', { query: props.q, - limit: 30 + limit: 30, }).then(searchedHashtags => { hashtags.value = searchedHashtags as any[]; fetching.value = false; diff --git a/packages/client/src/components/MkAvatars.vue b/packages/client/src/components/MkAvatars.vue index 958e5db0a..162338b63 100644 --- a/packages/client/src/components/MkAvatars.vue +++ b/packages/client/src/components/MkAvatars.vue @@ -18,7 +18,7 @@ const users = ref([]); onMounted(async () => { users.value = await os.api('users/show', { - userIds: props.userIds + userIds: props.userIds, }); }); diff --git a/packages/client/src/components/MkCwButton.vue b/packages/client/src/components/MkCwButton.vue index a473d682a..ee611921e 100644 --- a/packages/client/src/components/MkCwButton.vue +++ b/packages/client/src/components/MkCwButton.vue @@ -25,7 +25,7 @@ const label = computed(() => { return concat([ props.note.text ? [i18n.t('_cw.chars', { count: length(props.note.text) })] : [], props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length })] : [], - props.note.poll != null ? [i18n.ts.poll] : [] + props.note.poll != null ? [i18n.ts.poll] : [], ] as string[][]).join(' / '); }); diff --git a/packages/client/src/components/MkDrive.navFolder.vue b/packages/client/src/components/MkDrive.navFolder.vue index 361411350..dbbfef5f0 100644 --- a/packages/client/src/components/MkDrive.navFolder.vue +++ b/packages/client/src/components/MkDrive.navFolder.vue @@ -109,7 +109,7 @@ function onDrop(ev: DragEvent) { emit('removeFile', file.id); os.api('drive/files/update', { fileId: file.id, - folderId: props.folder ? props.folder.id : null + folderId: props.folder ? props.folder.id : null, }); } //#endregion @@ -123,7 +123,7 @@ function onDrop(ev: DragEvent) { emit('removeFolder', folder.id); os.api('drive/folders/update', { folderId: folder.id, - parentId: props.folder ? props.folder.id : null + parentId: props.folder ? props.folder.id : null, }); } //#endregion diff --git a/packages/client/src/components/MkFolder.vue b/packages/client/src/components/MkFolder.vue index bc9bff99b..ee3df8328 100644 --- a/packages/client/src/components/MkFolder.vue +++ b/packages/client/src/components/MkFolder.vue @@ -32,12 +32,12 @@ export default defineComponent({ expanded: { type: Boolean, required: false, - default: true + default: true, }, persistKey: { type: String, required: false, - default: null + default: null, }, }, data() { @@ -51,7 +51,7 @@ export default defineComponent({ if (this.persistKey) { localStorage.setItem(localStoragePrefix + this.persistKey, this.showBody ? 't' : 'f'); } - } + }, }, mounted() { function getParentBg(el: Element | null): string { @@ -91,7 +91,7 @@ export default defineComponent({ afterLeave(el) { el.style.height = null; }, - } + }, }); diff --git a/packages/client/src/components/MkFormulaCore.vue b/packages/client/src/components/MkFormulaCore.vue index 8db8932fc..6028db9e6 100644 --- a/packages/client/src/components/MkFormulaCore.vue +++ b/packages/client/src/components/MkFormulaCore.vue @@ -12,20 +12,20 @@ export default defineComponent({ props: { formula: { type: String, - required: true + required: true, }, block: { type: Boolean, - required: true - } + required: true, + }, }, computed: { compiledFormula(): any { return katex.renderToString(this.formula, { - throwOnError: false + throwOnError: false, } as any); - } - } + }, + }, }); diff --git a/packages/client/src/components/MkPushNotificationAllowButton.vue b/packages/client/src/components/MkPushNotificationAllowButton.vue index a762914e6..b356fd3b8 100644 --- a/packages/client/src/components/MkPushNotificationAllowButton.vue +++ b/packages/client/src/components/MkPushNotificationAllowButton.vue @@ -70,7 +70,7 @@ function subscribe() { // SEE: https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters return promiseDialog(registration.pushManager.subscribe({ userVisibleOnly: true, - applicationServerKey: urlBase64ToUint8Array(instance.swPublickey) + applicationServerKey: urlBase64ToUint8Array(instance.swPublickey), }) .then(async subscription => { pushSubscription = subscription; @@ -79,7 +79,7 @@ function subscribe() { pushRegistrationInServer = await api('sw/register', { endpoint: subscription.endpoint, auth: encode(subscription.getKey('auth')), - publickey: encode(subscription.getKey('p256dh')) + publickey: encode(subscription.getKey('p256dh')), }); }, async err => { // When subscribe failed // 通知が許可されていなかったとき diff --git a/packages/client/src/components/MkSample.vue b/packages/client/src/components/MkSample.vue index 1169654d0..1d25ab54b 100644 --- a/packages/client/src/components/MkSample.vue +++ b/packages/client/src/components/MkSample.vue @@ -51,7 +51,7 @@ export default defineComponent({ text: '', flag: true, radio: 'misskey', - mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.` + mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`, }; }, @@ -69,17 +69,17 @@ export default defineComponent({ foo: { type: 'boolean', default: true, - label: 'This is a boolean property' + label: 'This is a boolean property', }, bar: { type: 'number', default: 300, - label: 'This is a number property' + label: 'This is a number property', }, baz: { type: 'string', default: 'Misskey makes you happy.', - label: 'This is a string property' + label: 'This is a string property', }, }); }, @@ -95,7 +95,7 @@ export default defineComponent({ async openMenu(ev) { os.popupMenu([{ type: 'label', - text: 'Fruits' + text: 'Fruits', }, { text: 'Create some apples', action: () => {}, @@ -111,6 +111,6 @@ export default defineComponent({ action: () => {}, }], ev.currentTarget ?? ev.target); }, - } + }, }); diff --git a/packages/client/src/components/page/page.block.vue b/packages/client/src/components/page/page.block.vue index d7984afac..f3e776460 100644 --- a/packages/client/src/components/page/page.block.vue +++ b/packages/client/src/components/page/page.block.vue @@ -24,21 +24,21 @@ import { Block } from '@/scripts/hpml/block'; export default defineComponent({ components: { - XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote + XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { type: Number, - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.button.vue b/packages/client/src/components/page/page.button.vue index e8878df8d..83931021d 100644 --- a/packages/client/src/components/page/page.button.vue +++ b/packages/client/src/components/page/page.button.vue @@ -13,24 +13,24 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - MkButton + MkButton, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, methods: { click() { if (this.block.action === 'dialog') { this.hpml.eval(); os.alert({ - text: this.hpml.interpolate(this.block.content) + text: this.hpml.interpolate(this.block.content), }); } else if (this.block.action === 'resetRandom') { this.hpml.updateRandomSeed(Math.random()); @@ -40,19 +40,19 @@ export default defineComponent({ pageId: this.hpml.page.id, event: this.block.event, ...(this.block.var ? { - var: unref(this.hpml.vars)[this.block.var] - } : {}) + var: unref(this.hpml.vars)[this.block.var], + } : {}), }); os.alert({ type: 'success', - text: this.hpml.interpolate(this.block.message) + text: this.hpml.interpolate(this.block.message), }); } else if (this.block.action === 'callAiScript') { this.hpml.callAiScript(this.block.fn); } - } - } + }, + }, }); diff --git a/packages/client/src/components/page/page.canvas.vue b/packages/client/src/components/page/page.canvas.vue index 8f49b88e5..80f6c8339 100644 --- a/packages/client/src/components/page/page.canvas.vue +++ b/packages/client/src/components/page/page.canvas.vue @@ -14,12 +14,12 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const canvas: Ref = ref(null); @@ -29,9 +29,9 @@ export default defineComponent({ }); return { - canvas + canvas, }; - } + }, }); diff --git a/packages/client/src/components/page/page.counter.vue b/packages/client/src/components/page/page.counter.vue index 6eeef7143..a9e1f41a5 100644 --- a/packages/client/src/components/page/page.counter.vue +++ b/packages/client/src/components/page/page.counter.vue @@ -13,17 +13,17 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - MkButton + MkButton, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -36,9 +36,9 @@ export default defineComponent({ } return { - click + click, }; - } + }, }); diff --git a/packages/client/src/components/page/page.if.vue b/packages/client/src/components/page/page.if.vue index 6dc7a429a..372a15f0c 100644 --- a/packages/client/src/components/page/page.if.vue +++ b/packages/client/src/components/page/page.if.vue @@ -11,21 +11,21 @@ import { defineComponent, defineAsyncComponent, PropType } from 'vue'; export default defineComponent({ components: { - XBlock: defineAsyncComponent(() => import('./page.block.vue')) + XBlock: defineAsyncComponent(() => import('./page.block.vue')), }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { type: Number, - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.note.vue b/packages/client/src/components/page/page.note.vue index 431f0b08d..7d5c484a1 100644 --- a/packages/client/src/components/page/page.note.vue +++ b/packages/client/src/components/page/page.note.vue @@ -20,8 +20,8 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const note: Ref | null> = ref(null); @@ -34,9 +34,9 @@ export default defineComponent({ }); return { - note + note, }; - } + }, }); diff --git a/packages/client/src/components/page/page.number-input.vue b/packages/client/src/components/page/page.number-input.vue index 47ff2a017..0348ba743 100644 --- a/packages/client/src/components/page/page.number-input.vue +++ b/packages/client/src/components/page/page.number-input.vue @@ -15,17 +15,17 @@ import { NumberInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkInput + MkInput, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -39,9 +39,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.radio-button.vue b/packages/client/src/components/page/page.radio-button.vue index 5a726da22..b0940a878 100644 --- a/packages/client/src/components/page/page.radio-button.vue +++ b/packages/client/src/components/page/page.radio-button.vue @@ -14,17 +14,17 @@ import { RadioButtonVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkRadio + MkRadio, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -38,8 +38,8 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.section.vue b/packages/client/src/components/page/page.section.vue index a2cd66283..630c1f517 100644 --- a/packages/client/src/components/page/page.section.vue +++ b/packages/client/src/components/page/page.section.vue @@ -16,20 +16,20 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - XBlock: defineAsyncComponent(() => import('./page.block.vue')) + XBlock: defineAsyncComponent(() => import('./page.block.vue')), }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.switch.vue b/packages/client/src/components/page/page.switch.vue index 1ece88157..ac8d5e05c 100644 --- a/packages/client/src/components/page/page.switch.vue +++ b/packages/client/src/components/page/page.switch.vue @@ -13,17 +13,17 @@ import { SwitchVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkSwitch + MkSwitch, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -37,9 +37,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.text-input.vue b/packages/client/src/components/page/page.text-input.vue index 30a0379df..5d7eef8bb 100644 --- a/packages/client/src/components/page/page.text-input.vue +++ b/packages/client/src/components/page/page.text-input.vue @@ -15,17 +15,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkInput + MkInput, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -39,9 +39,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.text.vue b/packages/client/src/components/page/page.text.vue index b4abe8284..689c48452 100644 --- a/packages/client/src/components/page/page.text.vue +++ b/packages/client/src/components/page/page.text.vue @@ -19,12 +19,12 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, data() { return { @@ -38,15 +38,15 @@ export default defineComponent({ } else { return []; } - } + }, }, watch: { 'hpml.vars': { handler() { this.text = this.hpml.interpolate(this.block.text); }, - deep: true - } + deep: true, + }, }, }); diff --git a/packages/client/src/components/page/page.textarea-input.vue b/packages/client/src/components/page/page.textarea-input.vue index 6e082b2be..6be009285 100644 --- a/packages/client/src/components/page/page.textarea-input.vue +++ b/packages/client/src/components/page/page.textarea-input.vue @@ -16,17 +16,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkTextarea + MkTextarea, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -40,8 +40,8 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.textarea.vue b/packages/client/src/components/page/page.textarea.vue index 5b4ee2b45..f80992508 100644 --- a/packages/client/src/components/page/page.textarea.vue +++ b/packages/client/src/components/page/page.textarea.vue @@ -10,17 +10,17 @@ import MkTextarea from '../form/textarea.vue'; export default defineComponent({ components: { - MkTextarea + MkTextarea, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, data() { return { @@ -32,8 +32,8 @@ export default defineComponent({ handler() { this.text = this.hpml.interpolate(this.block.text); }, - deep: true - } - } + deep: true, + }, + }, }); diff --git a/packages/client/src/components/page/page.vue b/packages/client/src/components/page/page.vue index 58c43b22b..b5cb73c00 100644 --- a/packages/client/src/components/page/page.vue +++ b/packages/client/src/components/page/page.vue @@ -15,12 +15,12 @@ import { defaultStore } from '@/store'; export default defineComponent({ components: { - XBlock + XBlock, }, props: { page: { type: Object as PropType>, - required: true + required: true, }, }, setup(props, ctx) { @@ -28,7 +28,7 @@ export default defineComponent({ randomSeed: Math.random(), visitor: $i, url: url, - enableAiScript: !defaultStore.state.disablePagesScript + enableAiScript: !defaultStore.state.disablePagesScript, }); onMounted(() => { diff --git a/packages/client/src/directives/appear.ts b/packages/client/src/directives/appear.ts index a504d11ef..7fa43fc34 100644 --- a/packages/client/src/directives/appear.ts +++ b/packages/client/src/directives/appear.ts @@ -18,5 +18,5 @@ export default { unmounted(src, binding, vn) { if (src._observer_) src._observer_.disconnect(); - } + }, } as Directive; diff --git a/packages/client/src/directives/click-anime.ts b/packages/client/src/directives/click-anime.ts index 099aac28f..e2f514b7c 100644 --- a/packages/client/src/directives/click-anime.ts +++ b/packages/client/src/directives/click-anime.ts @@ -27,5 +27,5 @@ export default { el.classList.add('_anime_bounce_standBy'); }); */ - } + }, } as Directive; diff --git a/packages/client/src/directives/follow-append.ts b/packages/client/src/directives/follow-append.ts index b0e99628b..62e0ac3b9 100644 --- a/packages/client/src/directives/follow-append.ts +++ b/packages/client/src/directives/follow-append.ts @@ -31,5 +31,5 @@ export default { unmounted(src, binding, vn) { if (src._ro_) src._ro_.unobserve(src); - } + }, } as Directive; diff --git a/packages/client/src/directives/get-size.ts b/packages/client/src/directives/get-size.ts index 76b54ea4b..ff3bdd78a 100644 --- a/packages/client/src/directives/get-size.ts +++ b/packages/client/src/directives/get-size.ts @@ -39,7 +39,7 @@ export default { }); resize.observe(src); - mountings.set(src, { resize, fn: binding.value, }); + mountings.set(src, { resize, fn: binding.value }); calc(src); }, @@ -50,5 +50,5 @@ export default { info.resize.disconnect(); if (info.intersection) info.intersection.disconnect(); mountings.delete(src); - } + }, } as Directive void>; diff --git a/packages/client/src/directives/hotkey.ts b/packages/client/src/directives/hotkey.ts index d813a9507..dfc5f646a 100644 --- a/packages/client/src/directives/hotkey.ts +++ b/packages/client/src/directives/hotkey.ts @@ -20,5 +20,5 @@ export default { } else { el.removeEventListener('keydown', el._keyHandler); } - } + }, } as Directive; diff --git a/packages/client/src/directives/ripple.ts b/packages/client/src/directives/ripple.ts index 5329d021f..d32f7ab44 100644 --- a/packages/client/src/directives/ripple.ts +++ b/packages/client/src/directives/ripple.ts @@ -14,5 +14,5 @@ export default { popup(Ripple, { x, y }, {}, 'end'); }); - } + }, }; diff --git a/packages/client/src/directives/size.ts b/packages/client/src/directives/size.ts index c472a528a..c8f446e3a 100644 --- a/packages/client/src/directives/size.ts +++ b/packages/client/src/directives/size.ts @@ -29,7 +29,7 @@ function getClassOrder(width: number, queue: Value): ClassOrder { remove: [ ...(queue.max ? queue.max.filter(v => width > v).map(getMaxClass) : []), ...(queue.min ? queue.min.filter(v => width < v).map(getMinClass) : []), - ] + ], }; } @@ -103,5 +103,5 @@ export default { info.resize.disconnect(); if (info.intersection) info.intersection.disconnect(); mountings.delete(src); - } + }, } as Directive; diff --git a/packages/client/src/directives/user-preview.ts b/packages/client/src/directives/user-preview.ts index c46167662..ed5f00ca6 100644 --- a/packages/client/src/directives/user-preview.ts +++ b/packages/client/src/directives/user-preview.ts @@ -27,7 +27,7 @@ export class UserPreview { popup(defineAsyncComponent(() => import('@/components/MkUserPreview.vue')), { showing, q: this.user, - source: this.el + source: this.el, }, { mouseover: () => { window.clearTimeout(this.hideTimer); @@ -41,7 +41,7 @@ export class UserPreview { this.promise = { cancel: () => { showing.value = false; - } + }, }; this.checkTimer = window.setInterval(() => { @@ -114,5 +114,5 @@ export default { const self = el._userPreviewDirective_; self.preview.detach(); - } + }, } as Directive; diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index 4f591f4fc..51464f32f 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -14,7 +14,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData export async function fetchInstance() { const meta = await api('meta', { - detail: false + detail: false, }); for (const [k, v] of Object.entries(meta)) { diff --git a/packages/client/src/pages/admin/metrics.vue b/packages/client/src/pages/admin/metrics.vue index e0e47e667..db8e44863 100644 --- a/packages/client/src/pages/admin/metrics.vue +++ b/packages/client/src/pages/admin/metrics.vue @@ -65,7 +65,7 @@ import { Legend, Title, Tooltip, - SubTitle + SubTitle, } from 'chart.js'; import MkButton from '@/components/MkButton.vue'; import MkSelect from '@/components/form/select.vue'; @@ -89,7 +89,7 @@ Chart.register( Legend, Title, Tooltip, - SubTitle + SubTitle, ); const alpha = (hex, a) => { @@ -155,13 +155,13 @@ export default defineComponent({ this.connection.on('statsLog', this.onStatsLog); this.connection.send('requestLog', { id: Math.random().toString().substr(2, 8), - length: 150 + length: 150, }); this.$nextTick(() => { this.queueConnection.send('requestLog', { id: Math.random().toString().substr(2, 8), - length: 200 + length: 200, }); }); }); @@ -190,7 +190,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#86b300', backgroundColor: alpha('#86b300', 0.1), - data: [] + data: [], }, { label: 'MEM (active)', pointRadius: 0, @@ -198,7 +198,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#935dbf', backgroundColor: alpha('#935dbf', 0.02), - data: [] + data: [], }, { label: 'MEM (used)', pointRadius: 0, @@ -207,8 +207,8 @@ export default defineComponent({ borderColor: '#935dbf', borderDash: [5, 5], fill: false, - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -217,14 +217,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -235,7 +235,7 @@ export default defineComponent({ }, ticks: { display: false, - } + }, }, y: { position: 'right', @@ -246,15 +246,15 @@ export default defineComponent({ }, ticks: { display: false, - max: 100 - } - } + max: 100, + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -271,7 +271,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#94a029', backgroundColor: alpha('#94a029', 0.1), - data: [] + data: [], }, { label: 'Out', pointRadius: 0, @@ -279,8 +279,8 @@ export default defineComponent({ borderWidth: 2, borderColor: '#ff9156', backgroundColor: alpha('#ff9156', 0.1), - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -289,14 +289,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -306,8 +306,8 @@ export default defineComponent({ zeroLineColor: this.gridColor, }, ticks: { - display: false - } + display: false, + }, }, y: { position: 'right', @@ -318,14 +318,14 @@ export default defineComponent({ }, ticks: { display: false, - } - } + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -342,7 +342,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#94a029', backgroundColor: alpha('#94a029', 0.1), - data: [] + data: [], }, { label: 'Write', pointRadius: 0, @@ -350,8 +350,8 @@ export default defineComponent({ borderWidth: 2, borderColor: '#ff9156', backgroundColor: alpha('#ff9156', 0.1), - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -360,14 +360,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -377,8 +377,8 @@ export default defineComponent({ zeroLineColor: this.gridColor, }, ticks: { - display: false - } + display: false, + }, }, y: { position: 'right', @@ -389,14 +389,14 @@ export default defineComponent({ }, ticks: { display: false, - } - } + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -458,7 +458,7 @@ export default defineComponent({ resume() { this.paused = false; }, - } + }, }); diff --git a/packages/client/src/pages/auth.form.vue b/packages/client/src/pages/auth.form.vue index 024a7a2c5..154673526 100644 --- a/packages/client/src/pages/auth.form.vue +++ b/packages/client/src/pages/auth.form.vue @@ -26,7 +26,7 @@ import * as os from '@/os'; export default defineComponent({ components: { - MkButton + MkButton, }, props: ['session'], computed: { @@ -37,12 +37,12 @@ export default defineComponent({ }, app(): any { return this.session.app; - } + }, }, methods: { cancel() { os.api('auth/deny', { - token: this.session.token + token: this.session.token, }).then(() => { this.$emit('denied'); }); @@ -50,11 +50,11 @@ export default defineComponent({ accept() { os.api('auth/accept', { - token: this.session.token + token: this.session.token, }).then(() => { this.$emit('accepted'); }); - } - } + }, + }, }); diff --git a/packages/client/src/pages/emojis.emoji.vue b/packages/client/src/pages/emojis.emoji.vue index 04bf4ef16..40fe49652 100644 --- a/packages/client/src/pages/emojis.emoji.vue +++ b/packages/client/src/pages/emojis.emoji.vue @@ -28,7 +28,7 @@ function menu(ev) { action: () => { copyToClipboard(`:${props.emoji.name}:`); os.success(); - } + }, }], ev.currentTarget ?? ev.target); } diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.button.vue b/packages/client/src/pages/page-editor/els/page-editor.el.button.vue index 0438969af..08f993c42 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.button.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.button.vue @@ -58,8 +58,8 @@ withDefaults(defineProps<{ message: null, primary: false, var: null, - fn: null - } + fn: null, + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue b/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue index 191321ae1..7ebf8c147 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue @@ -32,7 +32,7 @@ withDefaults(defineProps<{ value: { name: '', width: 300, - height: 200 - } + height: 200, + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue b/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue index 8625c26e7..994d0b5b0 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue @@ -28,7 +28,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.if.vue b/packages/client/src/pages/page-editor/els/page-editor.el.if.vue index c93caeb9b..f56c8aec8 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.if.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.if.vue @@ -42,8 +42,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { children: [], - var: null - } + var: null, + }, }); const getPageBlockList = inject<(any) => any>('getPageBlockList'); @@ -51,7 +51,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList'); async function add() { const { canceled, result: type } = await os.select({ title: i18n.ts._pages.chooseBlock, - groupedItems: getPageBlockList() + groupedItems: getPageBlockList(), }); if (canceled) return; diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.image.vue b/packages/client/src/pages/page-editor/els/page-editor.el.image.vue index 4d471e7b9..4b3c6cbf1 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.image.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.image.vue @@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{ value: any }>(), { value: { - fileId: null - } + fileId: null, + }, }); let file: any = $ref(null); @@ -43,7 +43,7 @@ onMounted(async () => { await choose(); } else { os.api('drive/files/show', { - fileId: props.value.fileId + fileId: props.value.fileId, }).then(fileResponse => { file = fileResponse; }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.note.vue b/packages/client/src/pages/page-editor/els/page-editor.el.note.vue index 5e494ee23..c3b3e3b37 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.note.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.note.vue @@ -31,8 +31,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { note: null, - detailed: false - } + detailed: false, + }, }); let id: any = $ref(props.value.note); @@ -47,6 +47,6 @@ watch(id, async () => { note = await os.api('notes/show', { noteId: props.value.note }); }, { - immediate: true + immediate: true, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue index a8fb70232..dc89d0287 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue @@ -28,7 +28,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.post.vue b/packages/client/src/pages/page-editor/els/page-editor.el.post.vue index 39be01ab3..9592d3682 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.post.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.post.vue @@ -25,7 +25,7 @@ withDefaults(defineProps<{ value: { text: '', attachCanvasImage: false, - canvasId: '' - } + canvasId: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue b/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue index 754af477b..1aa2f5ca4 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue @@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{ value: { name: '', title: '', - values: [] - } + values: [], + }, }); let values: string = $ref(props.value.values.join('\n')); @@ -34,6 +34,6 @@ let values: string = $ref(props.value.values.join('\n')); watch(values, () => { props.value.values = values.split('\n'); }, { - deep: true + deep: true, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.section.vue b/packages/client/src/pages/page-editor/els/page-editor.el.section.vue index c7b87c660..f18188ce6 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.section.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.section.vue @@ -33,8 +33,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { title: null, - children: [] - } + children: [], + }, }); const getPageBlockList = inject<(any) => any>('getPageBlockList'); @@ -42,7 +42,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList'); async function rename() { const { canceled, result: title } = await os.inputText({ title: 'Enter title', - default: props.value.title + default: props.value.title, }); if (canceled) return; props.value.title = title; @@ -51,7 +51,7 @@ async function rename() { async function add() { const { canceled, result: type } = await os.select({ title: i18n.ts._pages.chooseBlock, - groupedItems: getPageBlockList() + groupedItems: getPageBlockList(), }); if (canceled) return; diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue b/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue index c74b17cc2..96d35c396 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue @@ -22,8 +22,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue index 99631c4da..8cbae1caf 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue @@ -21,7 +21,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.text.vue b/packages/client/src/pages/page-editor/els/page-editor.el.text.vue index e0ebe68dd..27274253b 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.text.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.text.vue @@ -18,8 +18,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - text: '' - } + text: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue index 4b417e39a..973f32242 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue @@ -22,7 +22,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue b/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue index dca7de8df..e0c05df91 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue @@ -18,8 +18,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - text: '' - } + text: '', + }, }); diff --git a/packages/client/src/pages/page-editor/page-editor.container.vue b/packages/client/src/pages/page-editor/page-editor.container.vue index efc9aac2a..03228b8e0 100644 --- a/packages/client/src/pages/page-editor/page-editor.container.vue +++ b/packages/client/src/pages/page-editor/page-editor.container.vue @@ -31,24 +31,24 @@ export default defineComponent({ props: { expanded: { type: Boolean, - default: true + default: true, }, removable: { type: Boolean, - default: true + default: true, }, draggable: { type: Boolean, - default: false + default: false, }, error: { required: false, - default: null + default: null, }, warn: { required: false, - default: null - } + default: null, + }, }, emits: ['toggle', 'remove'], data() { @@ -63,8 +63,8 @@ export default defineComponent({ }, remove() { this.$emit('remove'); - } - } + }, + }, }); diff --git a/packages/client/src/pages/page-editor/page-editor.script-block.vue b/packages/client/src/pages/page-editor/page-editor.script-block.vue index bb07adaae..1f621e185 100644 --- a/packages/client/src/pages/page-editor/page-editor.script-block.vue +++ b/packages/client/src/pages/page-editor/page-editor.script-block.vue @@ -78,17 +78,17 @@ export default defineComponent({ props: { getExpectedType: { required: false, - default: null + default: null, }, modelValue: { - required: true + required: true, }, title: { - required: false + required: false, }, removable: { required: false, - default: false + default: false, }, hpml: { required: true, @@ -101,8 +101,8 @@ export default defineComponent({ }, draggable: { required: false, - default: false - } + default: false, + }, }, data() { @@ -131,11 +131,11 @@ export default defineComponent({ handler() { this.modelValue.value.slots = this.slots.split('\n').map(x => ({ name: x, - type: null + type: null, })); }, - deep: true - } + deep: true, + }, }, created() { @@ -150,7 +150,7 @@ export default defineComponent({ const id = uuid(); this.modelValue.value = { slots: [], - expression: { id, type: null } + expression: { id, type: null }, }; return; } @@ -194,13 +194,13 @@ export default defineComponent({ const emptySlotIndex = args.findIndex(x => x.type === null); if (emptySlotIndex !== -1 && emptySlotIndex < args.length) { this.warn = { - slot: emptySlotIndex + slot: emptySlotIndex, }; } else { this.warn = null; } }, { - deep: true + deep: true, }); this.$watch(() => this.hpml.variables, () => { @@ -208,7 +208,7 @@ export default defineComponent({ this.error = this.hpml.typeCheck(this.modelValue); } }, { - deep: true + deep: true, }); }, @@ -216,7 +216,7 @@ export default defineComponent({ async changeType() { const { canceled, result: type } = await os.select({ title: this.$ts._pages.selectType, - groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null) + groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null), }); if (canceled) return; this.modelValue.type = type; @@ -224,8 +224,8 @@ export default defineComponent({ _getExpectedType(slot: number) { return this.hpml.getExpectedType(this.modelValue, slot); - } - } + }, + }, }); diff --git a/packages/client/src/pages/welcome.entrance.b.vue b/packages/client/src/pages/welcome.entrance.b.vue index 53a6dd346..8230adaf1 100644 --- a/packages/client/src/pages/welcome.entrance.b.vue +++ b/packages/client/src/pages/welcome.entrance.b.vue @@ -82,7 +82,7 @@ export default defineComponent({ os.api('hashtags/list', { sort: '+mentionedLocalUsers', - limit: 8 + limit: 8, }).then(tags => { this.tags = tags; }); @@ -91,13 +91,13 @@ export default defineComponent({ methods: { signin() { os.popup(XSigninDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, signup() { os.popup(XSignupDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, @@ -107,24 +107,24 @@ export default defineComponent({ icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about'); - } + }, }, { text: this.$ts.aboutMisskey, icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about-misskey'); - } + }, }, null, { text: this.$ts.help, icon: 'ti ti-question-circle', action: () => { window.open(`https://misskey-hub.net/help.md`, '_blank'); - } + }, }], ev.currentTarget ?? ev.target); }, - number - } + number, + }, }); diff --git a/packages/client/src/pages/welcome.entrance.c.vue b/packages/client/src/pages/welcome.entrance.c.vue index bae3f2ed9..d2d07bb1f 100644 --- a/packages/client/src/pages/welcome.entrance.c.vue +++ b/packages/client/src/pages/welcome.entrance.c.vue @@ -102,7 +102,7 @@ export default defineComponent({ os.api('hashtags/list', { sort: '+mentionedLocalUsers', - limit: 8 + limit: 8, }).then(tags => { this.tags = tags; }); @@ -111,13 +111,13 @@ export default defineComponent({ methods: { signin() { os.popup(XSigninDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, signup() { os.popup(XSignupDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, @@ -127,24 +127,24 @@ export default defineComponent({ icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about'); - } + }, }, { text: this.$ts.aboutMisskey, icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about-misskey'); - } + }, }, null, { text: this.$ts.help, icon: 'ti ti-question-circle', action: () => { window.open(`https://misskey-hub.net/help.md`, '_blank'); - } + }, }], ev.currentTarget ?? ev.target); }, - number - } + number, + }, }); diff --git a/packages/client/src/pages/welcome.timeline.vue b/packages/client/src/pages/welcome.timeline.vue index f45a15448..d6a88540d 100644 --- a/packages/client/src/pages/welcome.timeline.vue +++ b/packages/client/src/pages/welcome.timeline.vue @@ -32,7 +32,7 @@ export default defineComponent({ components: { XReactionsViewer, XMediaList, - XPoll + XPoll, }, data() { @@ -52,7 +52,7 @@ export default defineComponent({ if (this.$refs.scroll.clientHeight > window.innerHeight) { this.isScrolling = true; } - } + }, }); diff --git a/packages/client/src/plugin.ts b/packages/client/src/plugin.ts index de1c95567..3a00cd045 100644 --- a/packages/client/src/plugin.ts +++ b/packages/client/src/plugin.ts @@ -12,7 +12,7 @@ export function install(plugin) { const aiscript = new AiScript(createPluginEnv({ plugin: plugin, - storageKey: 'plugins:' + plugin.id + storageKey: 'plugins:' + plugin.id, }), { in: (q) => { return new Promise(ok => { @@ -86,7 +86,7 @@ function registerPostFormAction({ pluginId, title, handler }) { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(form), values.FN_NATIVE(([key, value]) => { update(key.value, value.value); })]); - } + }, }); } @@ -94,7 +94,7 @@ function registerUserAction({ pluginId, title, handler }) { userActions.push({ title, handler: (user) => { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(user)]); - } + }, }); } @@ -102,7 +102,7 @@ function registerNoteAction({ pluginId, title, handler }) { noteActions.push({ title, handler: (note) => { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]); - } + }, }); } @@ -110,7 +110,7 @@ function registerNoteViewInterruptor({ pluginId, handler }) { noteViewInterruptors.push({ handler: async (note) => { return utils.valToJs(await pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)])); - } + }, }); } @@ -118,6 +118,6 @@ function registerNotePostInterruptor({ pluginId, handler }) { notePostInterruptors.push({ handler: async (note) => { return utils.valToJs(await pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)])); - } + }, }); } diff --git a/packages/client/src/scripts/2fa.ts b/packages/client/src/scripts/2fa.ts index d1b9581e7..62a38ff02 100644 --- a/packages/client/src/scripts/2fa.ts +++ b/packages/client/src/scripts/2fa.ts @@ -7,15 +7,15 @@ export function byteify(string: string, encoding: 'ascii' | 'base64' | 'hex') { atob( string .replace(/-/g, '+') - .replace(/_/g, '/') + .replace(/_/g, '/'), ), - c => c.charCodeAt(0) + c => c.charCodeAt(0), ); case 'hex': return new Uint8Array( string .match(/.{1,2}/g) - .map(byte => parseInt(byte, 16)) + .map(byte => parseInt(byte, 16)), ); } } @@ -24,7 +24,7 @@ export function hexify(buffer: ArrayBuffer) { return Array.from(new Uint8Array(buffer)) .reduce( (str, byte) => str + byte.toString(16).padStart(2, '0'), - '' + '', ); } diff --git a/packages/client/src/scripts/autocomplete.ts b/packages/client/src/scripts/autocomplete.ts index 62de37ed2..1bae3790f 100644 --- a/packages/client/src/scripts/autocomplete.ts +++ b/packages/client/src/scripts/autocomplete.ts @@ -171,7 +171,7 @@ export class Autocomplete { }, { done: (res) => { this.complete(res); - } + }, }); this.suggestion = { diff --git a/packages/client/src/scripts/focus.ts b/packages/client/src/scripts/focus.ts index 089487782..d6802fa32 100644 --- a/packages/client/src/scripts/focus.ts +++ b/packages/client/src/scripts/focus.ts @@ -4,7 +4,7 @@ export function focusPrev(el: Element | null, self = false, scroll = true) { if (el) { if (el.hasAttribute('tabindex')) { (el as HTMLElement).focus({ - preventScroll: !scroll + preventScroll: !scroll, }); } else { focusPrev(el.previousElementSibling, true); @@ -18,7 +18,7 @@ export function focusNext(el: Element | null, self = false, scroll = true) { if (el) { if (el.hasAttribute('tabindex')) { (el as HTMLElement).focus({ - preventScroll: !scroll + preventScroll: !scroll, }); } else { focusPrev(el.nextElementSibling, true); diff --git a/packages/client/src/scripts/format-time-string.ts b/packages/client/src/scripts/format-time-string.ts index fb4718c00..c20db5e82 100644 --- a/packages/client/src/scripts/format-time-string.ts +++ b/packages/client/src/scripts/format-time-string.ts @@ -7,7 +7,7 @@ const defaultLocaleStringFormats: {[index: string]: string} = { 'hour': 'numeric', 'minute': 'numeric', 'second': 'numeric', - 'timeZoneName': 'short' + 'timeZoneName': 'short', }; function formatLocaleString(date: Date, format: string): string { diff --git a/packages/client/src/scripts/gen-search-query.ts b/packages/client/src/scripts/gen-search-query.ts index b413cbbab..da7d62263 100644 --- a/packages/client/src/scripts/gen-search-query.ts +++ b/packages/client/src/scripts/gen-search-query.ts @@ -25,6 +25,6 @@ export async function genSearchQuery(v: any, q: string) { return { query: q.split(' ').filter(x => !x.startsWith('/') && !x.startsWith('@')).join(' '), host: host, - userId: userId + userId: userId, }; } diff --git a/packages/client/src/scripts/get-static-image-url.ts b/packages/client/src/scripts/get-static-image-url.ts index e9a3e87cc..79dbcf932 100644 --- a/packages/client/src/scripts/get-static-image-url.ts +++ b/packages/client/src/scripts/get-static-image-url.ts @@ -11,6 +11,6 @@ export function getStaticImageUrl(baseUrl: string): string { const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので return `${instanceUrl}/proxy/${dummy}?${url.query({ url: u.href, - static: '1' + static: '1', })}`; } diff --git a/packages/client/src/scripts/hotkey.ts b/packages/client/src/scripts/hotkey.ts index bd8c3b6ca..4a0ded637 100644 --- a/packages/client/src/scripts/hotkey.ts +++ b/packages/client/src/scripts/hotkey.ts @@ -21,7 +21,7 @@ const parseKeymap = (keymap: Keymap) => Object.entries(keymap).map(([patterns, c const result = { patterns: [], callback, - allowRepeat: true + allowRepeat: true, } as Action; if (patterns.match(/^\(.*\)$/) !== null) { @@ -34,7 +34,7 @@ const parseKeymap = (keymap: Keymap) => Object.entries(keymap).map(([patterns, c which: [], ctrl: false, alt: false, - shift: false + shift: false, } as Pattern; const keys = part.trim().split('+').map(x => x.trim().toLowerCase()); @@ -61,7 +61,7 @@ function match(ev: KeyboardEvent, patterns: Action['patterns']): boolean { pattern.ctrl === ev.ctrlKey && pattern.shift === ev.shiftKey && pattern.alt === ev.altKey && - !ev.metaKey + !ev.metaKey, ); } diff --git a/packages/client/src/scripts/hpml/evaluator.ts b/packages/client/src/scripts/hpml/evaluator.ts index 10023edff..196b3142a 100644 --- a/packages/client/src/scripts/hpml/evaluator.ts +++ b/packages/client/src/scripts/hpml/evaluator.ts @@ -35,7 +35,7 @@ export class Hpml { if (this.opts.enableAiScript) { this.aiscript = markRaw(new AiScript({ ...createAiScriptEnv({ - storageKey: 'pages:' + this.page.id + storageKey: 'pages:' + this.page.id, }), ...initAiLib(this) }, { in: (q) => { return new Promise(ok => { @@ -75,7 +75,7 @@ export class Hpml { SEED: opts.randomSeed ? opts.randomSeed : '', YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`, AISCRIPT_DISABLED: !this.opts.enableAiScript, - NULL: null + NULL: null, }; this.eval(); @@ -198,7 +198,7 @@ export class Hpml { slots: expr.value.slots.map(x => x.name), exec: (slotArg: Record) => { return this.evaluate(expr.value.expression, scope.createChildScope(slotArg, expr.id)); - } + }, } as Fn; } return; diff --git a/packages/client/src/scripts/hpml/index.ts b/packages/client/src/scripts/hpml/index.ts index 4e5aadfbd..9a55a5c28 100644 --- a/packages/client/src/scripts/hpml/index.ts +++ b/packages/client/src/scripts/hpml/index.ts @@ -14,22 +14,22 @@ export type Fn = { export type Type = 'string' | 'number' | 'boolean' | 'stringArray' | null; export const literalDefs: Record = { - text: { out: 'string', category: 'value', icon: 'ti ti-quote', }, - multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left', }, - textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list', }, - number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up', }, - ref: { out: null, category: 'value', icon: 'fas fa-magic', }, - aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic', }, - fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt', }, + text: { out: 'string', category: 'value', icon: 'ti ti-quote' }, + multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left' }, + textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list' }, + number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up' }, + ref: { out: null, category: 'value', icon: 'fas fa-magic' }, + aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic' }, + fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt' }, }; export const blockDefs = [ ...Object.entries(literalDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon + type: k, out: v.out, category: v.category, icon: v.icon, })), ...Object.entries(funcDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon - })) + type: k, out: v.out, category: v.category, icon: v.icon, + })), ]; export type PageVar = { name: string; value: any; type: Type; }; @@ -82,7 +82,7 @@ export class HpmlScope { throw new HpmlError( `No such variable '${name}' in scope '${this.name}'`, { - scope: this.layerdStates + scope: this.layerdStates, }); } } diff --git a/packages/client/src/scripts/lookup-user.ts b/packages/client/src/scripts/lookup-user.ts index 2d00e5162..3ab9d5530 100644 --- a/packages/client/src/scripts/lookup-user.ts +++ b/packages/client/src/scripts/lookup-user.ts @@ -19,7 +19,7 @@ export async function lookupUser() { if (_notFound) { os.alert({ type: 'error', - text: i18n.ts.noSuchUser + text: i18n.ts.noSuchUser, }); } else { _notFound = true; diff --git a/packages/client/src/scripts/physics.ts b/packages/client/src/scripts/physics.ts index f0a5b0fdd..efda80f07 100644 --- a/packages/client/src/scripts/physics.ts +++ b/packages/client/src/scripts/physics.ts @@ -29,7 +29,7 @@ export function physics(container: HTMLElement) { height: containerHeight, background: 'transparent', // transparent to hide wireframeBackground: 'transparent', // transparent to hide - } + }, }); // Disable to hide debug @@ -43,7 +43,7 @@ export function physics(container: HTMLElement) { const ground = Matter.Bodies.rectangle(containerCenterX, containerHeight + (groundThickness / 2), containerWidth, groundThickness, { isStatic: true, restitution: 0.1, - friction: 2 + friction: 2, }); //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); @@ -68,8 +68,8 @@ export function physics(container: HTMLElement) { top + (objEl.offsetHeight / 2), Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, { - restitution: 0.5 - } + restitution: 0.5, + }, ); } else { const style = window.getComputedStyle(objEl); @@ -80,8 +80,8 @@ export function physics(container: HTMLElement) { objEl.offsetHeight, { chamfer: { radius: parseInt(style.borderRadius || '0', 10) }, - restitution: 0.5 - } + restitution: 0.5, + }, ); } objEl.id = obj.id.toString(); @@ -98,9 +98,9 @@ export function physics(container: HTMLElement) { constraint: { stiffness: 0.1, render: { - visible: false - } - } + visible: false, + }, + }, }); Matter.World.add(engine.world, mouseConstraint); @@ -147,6 +147,6 @@ export function physics(container: HTMLElement) { stop = true; Matter.Runner.stop(runner); window.clearInterval(intervalId); - } + }, }; } diff --git a/packages/client/src/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts index 3323968f7..b8fb853cc 100644 --- a/packages/client/src/scripts/please-login.ts +++ b/packages/client/src/scripts/please-login.ts @@ -8,7 +8,7 @@ export function pleaseLogin(path?: string) { popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), { autoSet: true, - message: i18n.ts.signinRequired + message: i18n.ts.signinRequired, }, { cancelled: () => { if (path) { diff --git a/packages/client/src/scripts/reaction-picker.ts b/packages/client/src/scripts/reaction-picker.ts index a6d0940a4..fe32e719d 100644 --- a/packages/client/src/scripts/reaction-picker.ts +++ b/packages/client/src/scripts/reaction-picker.ts @@ -15,7 +15,7 @@ class ReactionPicker { await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), { src: this.src, asReactionPicker: true, - manualShowing: this.manualShowing + manualShowing: this.manualShowing, }, { done: reaction => { this.onChosen!(reaction); @@ -26,7 +26,7 @@ class ReactionPicker { closed: () => { this.src.value = null; this.onClosed!(); - } + }, }); } diff --git a/packages/client/src/scripts/show-suspended-dialog.ts b/packages/client/src/scripts/show-suspended-dialog.ts index acfbc60e9..e11569ecd 100644 --- a/packages/client/src/scripts/show-suspended-dialog.ts +++ b/packages/client/src/scripts/show-suspended-dialog.ts @@ -5,6 +5,6 @@ export function showSuspendedDialog() { return os.alert({ type: 'error', title: i18n.ts.yourAccountSuspendedTitle, - text: i18n.ts.yourAccountSuspendedDescription + text: i18n.ts.yourAccountSuspendedDescription, }); } diff --git a/packages/client/src/scripts/theme-editor.ts b/packages/client/src/scripts/theme-editor.ts index 6d88d6856..944875ff1 100644 --- a/packages/client/src/scripts/theme-editor.ts +++ b/packages/client/src/scripts/theme-editor.ts @@ -61,7 +61,7 @@ export const convertToMisskeyTheme = (vm: ThemeViewModel, name: string, desc: st return { id: uuid(), - name, desc, author, props, base + name, desc, author, props, base, }; }; diff --git a/packages/client/src/scripts/use-note-capture.ts b/packages/client/src/scripts/use-note-capture.ts index f1f976693..e6bdb345c 100644 --- a/packages/client/src/scripts/use-note-capture.ts +++ b/packages/client/src/scripts/use-note-capture.ts @@ -60,8 +60,8 @@ export function useNoteCapture(props: { ...choices[choice], votes: choices[choice].votes + 1, ...($i && (body.userId === $i.id) ? { - isVoted: true - } : {}) + isVoted: true, + } : {}), }; note.value.poll.choices = choices; diff --git a/packages/client/src/ui/classic.widgets.vue b/packages/client/src/ui/classic.widgets.vue index ca919b168..163ec982c 100644 --- a/packages/client/src/ui/classic.widgets.vue +++ b/packages/client/src/ui/classic.widgets.vue @@ -14,13 +14,13 @@ import XWidgets from '@/components/MkWidgets.vue'; export default defineComponent({ components: { - XWidgets + XWidgets, }, props: { place: { type: String, - } + }, }, emits: ['mounted'], @@ -57,10 +57,10 @@ export default defineComponent({ updateWidgets(widgets) { this.$store.set('widgets', [ ...this.$store.state.widgets.filter(w => w.place !== this.place), - ...widgets + ...widgets, ]); - } - } + }, + }, }); diff --git a/packages/client/src/ui/deck/direct-column.vue b/packages/client/src/ui/deck/direct-column.vue index c60c5707f..75b018cac 100644 --- a/packages/client/src/ui/deck/direct-column.vue +++ b/packages/client/src/ui/deck/direct-column.vue @@ -25,7 +25,7 @@ const pagination = { endpoint: 'notes/mentions' as const, limit: 10, params: { - visibility: 'specified' + visibility: 'specified', }, }; diff --git a/packages/client/src/widgets/activity.calendar.vue b/packages/client/src/widgets/activity.calendar.vue index 33b95b00d..84f6af1c1 100644 --- a/packages/client/src/widgets/activity.calendar.vue +++ b/packages/client/src/widgets/activity.calendar.vue @@ -47,7 +47,7 @@ props.activity.slice().forEach((d, i) => { year: date.getFullYear(), month: date.getMonth(), day: date.getDate(), - weekday: date.getDay() + weekday: date.getDay(), }; d.v = peak === 0 ? 0 : d.total / (peak / 2); diff --git a/packages/client/src/widgets/server-metric/cpu-mem.vue b/packages/client/src/widgets/server-metric/cpu-mem.vue index 429ccdf3a..80a8e427e 100644 --- a/packages/client/src/widgets/server-metric/cpu-mem.vue +++ b/packages/client/src/widgets/server-metric/cpu-mem.vue @@ -100,7 +100,7 @@ onMounted(() => { props.connection.on('stats', onStats); props.connection.on('statsLog', onStatsLog); props.connection.send('requestLog', { - id: Math.random().toString().substr(2, 8) + id: Math.random().toString().substr(2, 8), }); }); diff --git a/packages/client/src/widgets/server-metric/net.vue b/packages/client/src/widgets/server-metric/net.vue index 82801964f..ab8b0fe47 100644 --- a/packages/client/src/widgets/server-metric/net.vue +++ b/packages/client/src/widgets/server-metric/net.vue @@ -70,7 +70,7 @@ onMounted(() => { props.connection.on('stats', onStats); props.connection.on('statsLog', onStatsLog); props.connection.send('requestLog', { - id: Math.random().toString().substr(2, 8) + id: Math.random().toString().substr(2, 8), }); }); diff --git a/packages/client/src/widgets/timeline.vue b/packages/client/src/widgets/timeline.vue index b22d3e445..e48444d33 100644 --- a/packages/client/src/widgets/timeline.vue +++ b/packages/client/src/widgets/timeline.vue @@ -82,7 +82,7 @@ const choose = async (ev) => { menuOpened.value = true; const [antennas, lists] = await Promise.all([ os.api('antennas/list'), - os.api('users/lists/list') + os.api('users/lists/list'), ]); const antennaItems = antennas.map(antenna => ({ text: antenna.name, @@ -90,7 +90,7 @@ const choose = async (ev) => { action: () => { widgetProps.antenna = antenna; setSrc('antenna'); - } + }, })); const listItems = lists.map(list => ({ text: list.name, @@ -98,24 +98,24 @@ const choose = async (ev) => { action: () => { widgetProps.list = list; setSrc('list'); - } + }, })); os.popupMenu([{ text: i18n.ts._timelines.home, icon: 'ti ti-home', - action: () => { setSrc('home'); } + action: () => { setSrc('home'); }, }, { text: i18n.ts._timelines.local, icon: 'ti ti-messages', - action: () => { setSrc('local'); } + action: () => { setSrc('local'); }, }, { text: i18n.ts._timelines.social, icon: 'ti ti-share', - action: () => { setSrc('social'); } + action: () => { setSrc('social'); }, }, { text: i18n.ts._timelines.global, icon: 'ti ti-world', - action: () => { setSrc('global'); } + action: () => { setSrc('global'); }, }, antennaItems.length > 0 ? null : undefined, ...antennaItems, listItems.length > 0 ? null : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => { menuOpened.value = false; });