From e633c3b84b96fb1eb0e6cc864c391a00adc20bd8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 9 Jan 2023 09:41:25 +0900 Subject: [PATCH] refactor --- packages/frontend/src/components/MkAsUi.vue | 6 +- .../src/components/MkFoldableSection.vue | 154 ++++++++++ packages/frontend/src/components/MkFolder.vue | 270 ++++++++++-------- .../src/components/MkInstanceStats.vue | 18 +- .../frontend/src/components/form/folder.vue | 175 ------------ packages/frontend/src/pages/about.emojis.vue | 12 +- .../frontend/src/pages/admin/integrations.vue | 14 +- .../frontend/src/pages/admin/overview.vue | 46 +-- .../frontend/src/pages/admin/security.vue | 22 +- packages/frontend/src/pages/explore.users.vue | 40 +-- packages/frontend/src/pages/explore.vue | 4 +- packages/frontend/src/pages/flash/flash.vue | 6 +- packages/frontend/src/pages/gallery/index.vue | 10 +- .../src/pages/settings/import-export.vue | 42 +-- .../frontend/src/pages/settings/privacy.vue | 6 +- .../frontend/src/pages/settings/profile.vue | 10 +- .../frontend/src/pages/settings/sounds.vue | 6 +- .../frontend/src/pages/settings/statusbar.vue | 6 +- packages/frontend/src/pages/theme-editor.vue | 22 +- packages/frontend/src/pages/user-info.vue | 14 +- packages/frontend/src/pages/user/activity.vue | 18 +- packages/frontend/src/pages/user/home.vue | 2 +- 22 files changed, 453 insertions(+), 450 deletions(-) create mode 100644 packages/frontend/src/components/MkFoldableSection.vue delete mode 100644 packages/frontend/src/components/form/folder.vue diff --git a/packages/frontend/src/components/MkAsUi.vue b/packages/frontend/src/components/MkAsUi.vue index b6b49725d..5844a1863 100644 --- a/packages/frontend/src/components/MkAsUi.vue +++ b/packages/frontend/src/components/MkAsUi.vue @@ -33,12 +33,12 @@ {{ c.text }} - + - +
@@ -34,7 +34,7 @@ import XEmoji from './emojis.emoji.vue'; import MkButton from '@/components/MkButton.vue'; import MkInput from '@/components/MkInput.vue'; import MkSelect from '@/components/MkSelect.vue'; -import MkFolder from '@/components/MkFolder.vue'; +import MkFoldableSection from '@/components/MkFoldableSection.vue'; import MkTab from '@/components/MkTab.vue'; import * as os from '@/os'; import { emojiCategories, emojiTags } from '@/instance'; @@ -44,7 +44,7 @@ export default defineComponent({ MkButton, MkInput, MkSelect, - MkFolder, + MkFoldableSection, MkTab, XEmoji, }, diff --git a/packages/frontend/src/pages/admin/integrations.vue b/packages/frontend/src/pages/admin/integrations.vue index e319d4861..6888a492f 100644 --- a/packages/frontend/src/pages/admin/integrations.vue +++ b/packages/frontend/src/pages/admin/integrations.vue @@ -4,24 +4,24 @@
- + - - + + - - + + - +
@@ -34,7 +34,7 @@ import XTwitter from './integrations.twitter.vue'; import XGithub from './integrations.github.vue'; import XDiscord from './integrations.discord.vue'; import FormSuspense from '@/components/form/suspense.vue'; -import FormFolder from '@/components/form/folder.vue'; +import MkFolder from '@/components/MkFolder.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; diff --git a/packages/frontend/src/pages/admin/overview.vue b/packages/frontend/src/pages/admin/overview.vue index 2e0b49c5a..0166724e0 100644 --- a/packages/frontend/src/pages/admin/overview.vue +++ b/packages/frontend/src/pages/admin/overview.vue @@ -1,60 +1,60 @@ @@ -79,7 +79,7 @@ import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; import { defaultStore } from '@/store'; import MkFileListForAdmin from '@/components/MkFileListForAdmin.vue'; -import MkFolder from '@/components/MkFolder.vue'; +import MkFoldableSection from '@/components/MkFoldableSection.vue'; const rootEl = $shallowRef(); let serverInfo: any = $ref(null); diff --git a/packages/frontend/src/pages/admin/security.vue b/packages/frontend/src/pages/admin/security.vue index b510f5522..191da506e 100644 --- a/packages/frontend/src/pages/admin/security.vue +++ b/packages/frontend/src/pages/admin/security.vue @@ -4,7 +4,7 @@
- + @@ -13,9 +13,9 @@ - + - + @@ -56,9 +56,9 @@ {{ i18n.ts.save }}
- + - + @@ -69,9 +69,9 @@
- + - + @@ -81,9 +81,9 @@ - + - +
@@ -94,7 +94,7 @@ {{ i18n.ts.save }}
-
+ @@ -105,7 +105,7 @@ import { } from 'vue'; import XBotProtection from './bot-protection.vue'; import XHeader from './_header_.vue'; -import FormFolder from '@/components/form/folder.vue'; +import MkFolder from '@/components/MkFolder.vue'; import MkRadios from '@/components/MkRadios.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import FormInfo from '@/components/MkInfo.vue'; diff --git a/packages/frontend/src/pages/explore.users.vue b/packages/frontend/src/pages/explore.users.vue index f1bb0cc62..3a74e8518 100644 --- a/packages/frontend/src/pages/explore.users.vue +++ b/packages/frontend/src/pages/explore.users.vue @@ -6,52 +6,52 @@
- +
{{ tag.tag }} {{ tag.tag }}
-
+ - + - +
@@ -60,7 +60,7 @@