diff --git a/.gitignore b/.gitignore index 5dd72c88fa..bdd900040b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ packages/sw/.yarn/cache cypress/screenshots cypress/videos +# Coverage +coverage + # config /.config/* !/.config/example.yml diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 243aea68c4..10257b841f 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -146,7 +146,7 @@ export async function openAccountMenu(opts: { onChoose?: (account: misskey.entities.UserDetailed) => void; }, ev: MouseEvent) { function showSigninDialog() { - popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {}, { + popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {}, { done: res => { addAccount(res.id, res.i); success(); @@ -155,7 +155,7 @@ export async function openAccountMenu(opts: { } function createAccount() { - popup(defineAsyncComponent(() => import('@/components/signup-dialog.vue')), {}, { + popup(defineAsyncComponent(() => import('@/components/MkSignupDialog.vue')), {}, { done: res => { addAccount(res.id, res.i); switchAccountWithToken(res.i); diff --git a/packages/client/src/components/abuse-report.vue b/packages/client/src/components/MkAbuseReport.vue similarity index 98% rename from packages/client/src/components/abuse-report.vue rename to packages/client/src/components/MkAbuseReport.vue index 8c25df1107..42bd1af3fb 100644 --- a/packages/client/src/components/abuse-report.vue +++ b/packages/client/src/components/MkAbuseReport.vue @@ -38,7 +38,7 @@ diff --git a/packages/client/src/components/cropper-dialog.vue b/packages/client/src/components/MkCropperDialog.vue similarity index 100% rename from packages/client/src/components/cropper-dialog.vue rename to packages/client/src/components/MkCropperDialog.vue diff --git a/packages/client/src/components/cw-button.vue b/packages/client/src/components/MkCwButton.vue similarity index 100% rename from packages/client/src/components/cw-button.vue rename to packages/client/src/components/MkCwButton.vue diff --git a/packages/client/src/components/date-separated-list.vue b/packages/client/src/components/MkDateSeparatedList.vue similarity index 86% rename from packages/client/src/components/date-separated-list.vue rename to packages/client/src/components/MkDateSeparatedList.vue index 085ef871e0..f63d9782b6 100644 --- a/packages/client/src/components/date-separated-list.vue +++ b/packages/client/src/components/MkDateSeparatedList.vue @@ -1,6 +1,6 @@ diff --git a/packages/client/src/components/dialog.vue b/packages/client/src/components/MkDialog.vue similarity index 100% rename from packages/client/src/components/dialog.vue rename to packages/client/src/components/MkDialog.vue diff --git a/packages/client/src/components/digital-clock.vue b/packages/client/src/components/MkDigitalClock.vue similarity index 100% rename from packages/client/src/components/digital-clock.vue rename to packages/client/src/components/MkDigitalClock.vue diff --git a/packages/client/src/components/drive.file.vue b/packages/client/src/components/MkDrive.file.vue similarity index 92% rename from packages/client/src/components/drive.file.vue rename to packages/client/src/components/MkDrive.file.vue index aaf7ca3ca3..22916d5680 100644 --- a/packages/client/src/components/drive.file.vue +++ b/packages/client/src/components/MkDrive.file.vue @@ -1,5 +1,6 @@ - diff --git a/packages/client/src/components/index.ts b/packages/client/src/components/index.ts index aa8a591e51..8639257003 100644 --- a/packages/client/src/components/index.ts +++ b/packages/client/src/components/index.ts @@ -1,22 +1,22 @@ import { App } from 'vue'; -import Mfm from './global/misskey-flavored-markdown.vue'; -import MkA from './global/a.vue'; -import MkAcct from './global/acct.vue'; -import MkAvatar from './global/avatar.vue'; -import MkEmoji from './global/emoji.vue'; -import MkUserName from './global/user-name.vue'; -import MkEllipsis from './global/ellipsis.vue'; -import MkTime from './global/time.vue'; -import MkUrl from './global/url.vue'; +import Mfm from './global/MkMisskeyFlavoredMarkdown.vue'; +import MkA from './global/MkA.vue'; +import MkAcct from './global/MkAcct.vue'; +import MkAvatar from './global/MkAvatar.vue'; +import MkEmoji from './global/MkEmoji.vue'; +import MkUserName from './global/MkUserName.vue'; +import MkEllipsis from './global/MkEllipsis.vue'; +import MkTime from './global/MkTime.vue'; +import MkUrl from './global/MkUrl.vue'; import I18n from './global/i18n'; -import RouterView from './global/router-view.vue'; -import MkLoading from './global/loading.vue'; -import MkError from './global/error.vue'; -import MkAd from './global/ad.vue'; -import MkPageHeader from './global/page-header.vue'; -import MkSpacer from './global/spacer.vue'; -import MkStickyContainer from './global/sticky-container.vue'; +import RouterView from './global/RouterView.vue'; +import MkLoading from './global/MkLoading.vue'; +import MkError from './global/MkError.vue'; +import MkAd from './global/MkAd.vue'; +import MkPageHeader from './global/MkPageHeader.vue'; +import MkSpacer from './global/MkSpacer.vue'; +import MkStickyContainer from './global/MkStickyContainer.vue'; export default function(app: App) { app.component('I18n', I18n); diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index a6fef39a21..5b1e6839c9 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -1,15 +1,15 @@ import { VNode, defineComponent, h } from 'vue'; import * as mfm from 'mfm-js'; -import MkUrl from '@/components/global/url.vue'; -import MkLink from '@/components/link.vue'; -import MkMention from '@/components/mention.vue'; -import MkEmoji from '@/components/global/emoji.vue'; +import MkUrl from '@/components/global/MkUrl.vue'; +import MkLink from '@/components/MkLink.vue'; +import MkMention from '@/components/MkMention.vue'; +import MkEmoji from '@/components/global/MkEmoji.vue'; import { concat } from '@/scripts/array'; -import MkFormula from '@/components/formula.vue'; -import MkCode from '@/components/code.vue'; -import MkGoogle from '@/components/google.vue'; -import MkSparkle from '@/components/sparkle.vue'; -import MkA from '@/components/global/a.vue'; +import MkFormula from '@/components/MkFormula.vue'; +import MkCode from '@/components/MkCode.vue'; +import MkGoogle from '@/components/MkGoogle.vue'; +import MkSparkle from '@/components/MkSparkle.vue'; +import MkA from '@/components/global/MkA.vue'; import { host } from '@/config'; import { MFM_TAGS } from '@/scripts/mfm-tags'; diff --git a/packages/client/src/components/page/page.image.vue b/packages/client/src/components/page/page.image.vue index 6e38a9f424..8ba70c5855 100644 --- a/packages/client/src/components/page/page.image.vue +++ b/packages/client/src/components/page/page.image.vue @@ -6,7 +6,7 @@ - + diff --git a/packages/client/src/components/renote-button.vue b/packages/client/src/components/renote-button.vue deleted file mode 100644 index a067b884f3..0000000000 --- a/packages/client/src/components/renote-button.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - diff --git a/packages/client/src/components/ui/hr.vue b/packages/client/src/components/ui/hr.vue deleted file mode 100644 index 0cb5b48875..0000000000 --- a/packages/client/src/components/ui/hr.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/packages/client/src/directives/ripple.ts b/packages/client/src/directives/ripple.ts index f1d41ddb0e..5329d021fb 100644 --- a/packages/client/src/directives/ripple.ts +++ b/packages/client/src/directives/ripple.ts @@ -1,4 +1,4 @@ -import Ripple from '@/components/ripple.vue'; +import Ripple from '@/components/MkRipple.vue'; import { popup } from '@/os'; export default { diff --git a/packages/client/src/directives/user-preview.ts b/packages/client/src/directives/user-preview.ts index 9d18a69877..c461676624 100644 --- a/packages/client/src/directives/user-preview.ts +++ b/packages/client/src/directives/user-preview.ts @@ -24,7 +24,7 @@ export class UserPreview { const showing = ref(true); - popup(defineAsyncComponent(() => import('@/components/user-preview.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkUserPreview.vue')), { showing, q: this.user, source: this.el diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index 1a7a81b7cb..cb8eb5310f 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -242,7 +242,7 @@ import { getAccountFromId } from '@/scripts/get-account-from-id'; if (lastVersion != null && compareVersions(version, lastVersion) === 1 && defaultStore.state.showUpdates) { // ログインしてる場合だけ if ($i) { - popup(defineAsyncComponent(() => import('@/components/updated.vue')), {}, {}, 'closed'); + popup(defineAsyncComponent(() => import('@/components/MkUpdated.vue')), {}, {}, 'closed'); } } } catch (err) { diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index ecf422a56e..1fd5dbceda 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -5,8 +5,8 @@ import { EventEmitter } from 'eventemitter3'; import insertTextAtCursor from 'insert-text-at-cursor'; import * as Misskey from 'misskey-js'; import { apiUrl, url } from '@/config'; -import MkPostFormDialog from '@/components/post-form-dialog.vue'; -import MkWaitingDialog from '@/components/waiting-dialog.vue'; +import MkPostFormDialog from '@/components/MkPostFormDialog.vue'; +import MkWaitingDialog from '@/components/MkWaitingDialog.vue'; import { MenuItem } from '@/types/menu'; import { $i } from '@/account'; @@ -190,19 +190,19 @@ export async function popup(component: Component, props: Record, ev } export function pageWindow(path: string) { - popup(defineAsyncComponent(() => import('@/components/page-window.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkPageWindow.vue')), { initialPath: path, }, {}, 'closed'); } export function modalPageWindow(path: string) { - popup(defineAsyncComponent(() => import('@/components/modal-page-window.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkModalPageWindow.vue')), { initialPath: path, }, {}, 'closed'); } export function toast(message: string) { - popup(defineAsyncComponent(() => import('@/components/toast.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkToast.vue')), { message, }, {}, 'closed'); } @@ -213,7 +213,7 @@ export function alert(props: { text?: string | null; }): Promise { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), props, { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), props, { done: result => { resolve(); }, @@ -227,7 +227,7 @@ export function confirm(props: { text?: string | null; }): Promise<{ canceled: boolean }> { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), { ...props, showCancelButton: true, }, { @@ -248,7 +248,7 @@ export function inputText(props: { canceled: false; result: string; }> { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), { title: props.title, text: props.text, input: { @@ -273,7 +273,7 @@ export function inputNumber(props: { canceled: false; result: number; }> { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), { title: props.title, text: props.text, input: { @@ -298,7 +298,7 @@ export function inputDate(props: { canceled: false; result: Date; }> { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), { title: props.title, text: props.text, input: { @@ -335,7 +335,7 @@ export function select(props: { canceled: false; result: C; }> { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDialog.vue')), { title: props.title, text: props.text, select: { @@ -357,7 +357,7 @@ export function success() { window.setTimeout(() => { showing.value = false; }, 1000); - popup(defineAsyncComponent(() => import('@/components/waiting-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkWaitingDialog.vue')), { success: true, showing: showing, }, { @@ -369,7 +369,7 @@ export function success() { export function waiting() { return new Promise((resolve, reject) => { const showing = ref(true); - popup(defineAsyncComponent(() => import('@/components/waiting-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkWaitingDialog.vue')), { success: false, showing: showing, }, { @@ -380,7 +380,7 @@ export function waiting() { export function form(title, form) { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/form-dialog.vue')), { title, form }, { + popup(defineAsyncComponent(() => import('@/components/MkFormDialog.vue')), { title, form }, { done: result => { resolve(result); }, @@ -390,7 +390,7 @@ export function form(title, form) { export async function selectUser() { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/user-select-dialog.vue')), {}, { + popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {}, { ok: user => { resolve(user); }, @@ -400,7 +400,7 @@ export async function selectUser() { export async function selectDriveFile(multiple: boolean) { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/drive-select-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), { type: 'file', multiple, }, { @@ -415,7 +415,7 @@ export async function selectDriveFile(multiple: boolean) { export async function selectDriveFolder(multiple: boolean) { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/drive-select-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), { type: 'folder', multiple, }, { @@ -430,7 +430,7 @@ export async function selectDriveFolder(multiple: boolean) { export async function pickEmoji(src: HTMLElement | null, opts) { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/emoji-picker-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), { src, ...opts, }, { @@ -445,7 +445,7 @@ export async function cropImage(image: Misskey.entities.DriveFile, options: { aspectRatio: number; }): Promise { return new Promise((resolve, reject) => { - popup(defineAsyncComponent(() => import('@/components/cropper-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkCropperDialog.vue')), { file: image, aspectRatio: options.aspectRatio, }, { @@ -495,7 +495,7 @@ export async function openEmojiPicker(src?: HTMLElement, opts, initialTextarea: characterData: false, }); - openingEmojiPicker = await popup(defineAsyncComponent(() => import('@/components/emoji-picker-window.vue')), { + openingEmojiPicker = await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerWindow.vue')), { src, ...opts, }, { diff --git a/packages/client/src/pages/about-misskey.vue b/packages/client/src/pages/about-misskey.vue index f30b2d7ceb..173cc0eb4d 100644 --- a/packages/client/src/pages/about-misskey.vue +++ b/packages/client/src/pages/about-misskey.vue @@ -52,7 +52,7 @@ import { version } from '@/config'; import FormLink from '@/components/form/link.vue'; import FormSection from '@/components/form/section.vue'; import MkButton from '@/components/ui/button.vue'; -import MkLink from '@/components/link.vue'; +import MkLink from '@/components/MkLink.vue'; import { physics } from '@/scripts/physics'; import { i18n } from '@/i18n'; import { defaultStore } from '@/store'; diff --git a/packages/client/src/pages/about.emojis.vue b/packages/client/src/pages/about.emojis.vue index 6d915c5843..8049975da3 100644 --- a/packages/client/src/pages/about.emojis.vue +++ b/packages/client/src/pages/about.emojis.vue @@ -34,7 +34,7 @@ import MkButton from '@/components/ui/button.vue'; import MkInput from '@/components/form/input.vue'; import MkSelect from '@/components/form/select.vue'; import MkFolder from '@/components/ui/folder.vue'; -import MkTab from '@/components/tab.vue'; +import MkTab from '@/components/MkTab.vue'; import * as os from '@/os'; import { emojiCategories, emojiTags } from '@/instance'; import XEmoji from './emojis.emoji.vue'; diff --git a/packages/client/src/pages/about.federation.vue b/packages/client/src/pages/about.federation.vue index 8d93908725..51a49ba59f 100644 --- a/packages/client/src/pages/about.federation.vue +++ b/packages/client/src/pages/about.federation.vue @@ -52,7 +52,7 @@ import MkButton from '@/components/ui/button.vue'; import MkInput from '@/components/form/input.vue'; import MkSelect from '@/components/form/select.vue'; import MkPagination from '@/components/ui/pagination.vue'; -import MkInstanceCardMini from '@/components/instance-card-mini.vue'; +import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue'; import FormSplit from '@/components/form/split.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index 0a067d7b78..fc2337727e 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -88,8 +88,8 @@ import FormLink from '@/components/form/link.vue'; import FormSection from '@/components/form/section.vue'; import FormSuspense from '@/components/form/suspense.vue'; import FormSplit from '@/components/form/split.vue'; -import MkKeyValue from '@/components/key-value.vue'; -import MkInstanceStats from '@/components/instance-stats.vue'; +import MkKeyValue from '@/components/MkKeyValue.vue'; +import MkInstanceStats from '@/components/MkInstanceStats.vue'; import * as os from '@/os'; import number from '@/filters/number'; import { i18n } from '@/i18n'; diff --git a/packages/client/src/pages/admin-file.vue b/packages/client/src/pages/admin-file.vue index f96a41a7ea..dfdbb1f0da 100644 --- a/packages/client/src/pages/admin-file.vue +++ b/packages/client/src/pages/admin-file.vue @@ -65,11 +65,11 @@ import { computed } from 'vue'; import MkButton from '@/components/ui/button.vue'; import MkSwitch from '@/components/form/switch.vue'; -import MkObjectView from '@/components/object-view.vue'; -import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue'; -import MkKeyValue from '@/components/key-value.vue'; +import MkObjectView from '@/components/MkObjectView.vue'; +import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue'; +import MkKeyValue from '@/components/MkKeyValue.vue'; import FormSection from '@/components/form/section.vue'; -import MkUserCardMini from '@/components/user-card-mini.vue'; +import MkUserCardMini from '@/components/MkUserCardMini.vue'; import MkInfo from '@/components/ui/info.vue'; import bytes from '@/filters/bytes'; import * as os from '@/os'; diff --git a/packages/client/src/pages/admin/abuses.vue b/packages/client/src/pages/admin/abuses.vue index 9c718ab9e4..25fd8bcb6d 100644 --- a/packages/client/src/pages/admin/abuses.vue +++ b/packages/client/src/pages/admin/abuses.vue @@ -53,7 +53,7 @@ import XHeader from './_header_.vue'; import MkInput from '@/components/form/input.vue'; import MkSelect from '@/components/form/select.vue'; import MkPagination from '@/components/ui/pagination.vue'; -import XAbuseReport from '@/components/abuse-report.vue'; +import XAbuseReport from '@/components/MkAbuseReport.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; diff --git a/packages/client/src/pages/admin/bot-protection.vue b/packages/client/src/pages/admin/bot-protection.vue index cf2cdea92b..2c404380af 100644 --- a/packages/client/src/pages/admin/bot-protection.vue +++ b/packages/client/src/pages/admin/bot-protection.vue @@ -54,7 +54,7 @@ import * as os from '@/os'; import { fetchInstance } from '@/instance'; import { i18n } from '@/i18n'; -const MkCaptcha = defineAsyncComponent(() => import('@/components/captcha.vue')); +const MkCaptcha = defineAsyncComponent(() => import('@/components/MkCaptcha.vue')); let provider = $ref(null); let hcaptchaSiteKey: string | null = $ref(null); diff --git a/packages/client/src/pages/admin/database.vue b/packages/client/src/pages/admin/database.vue index ca8718ef63..1c2656b8f5 100644 --- a/packages/client/src/pages/admin/database.vue +++ b/packages/client/src/pages/admin/database.vue @@ -13,7 +13,7 @@ diff --git a/packages/client/src/pages/gallery/index.vue b/packages/client/src/pages/gallery/index.vue index fba8b96bda..1dfedb4a67 100644 --- a/packages/client/src/pages/gallery/index.vue +++ b/packages/client/src/pages/gallery/index.vue @@ -43,13 +43,13 @@