From 526e23cb2b9ebff0122c256b2f3c2f2580c49e04 Mon Sep 17 00:00:00 2001 From: NekoCharm01 <34984380+NekoCharm01@users.noreply.github.com> Date: Sat, 4 Apr 2026 12:05:21 +0800 Subject: [PATCH 1/4] chore: housekeeping: clean up code and remove unused files --- .vscode/settings.json | 3 + app/app.vue | 2 +- app/auto-imports.d.ts | 13 - app/components.d.ts | 34 - app/components/Artwork/ArtworkCard.vue | 1 - app/components/Artwork/ArtworkLargeCard.vue | 21 +- app/components/Artwork/ArtworkListByUser.vue | 2 +- app/components/AuthorCard.vue | 9 +- app/components/Comment/Comment.vue | 2 +- app/components/Comment/CommentSubmit.vue | 2 +- app/components/DeferLoad.vue | 3 +- app/components/ErrorPage.vue | 2 +- app/components/FollowUserCard.vue | 2 +- app/components/SideNav/SideNav.vue | 7 +- app/components/SiteHeader.vue | 94 +- app/{stores => composables}/artwork.ts | 3 - app/{stores => composables}/following.ts | 4 +- app/{stores => composables}/home.ts | 3 - app/{stores => composables}/pixiv-client.ts | 2 - app/{stores => composables}/ranking.ts | 3 - app/{stores => composables}/search.ts | 3 - app/{stores => composables}/session.ts | 2 - app/composables/states.ts | 3 - app/{stores => composables}/user-artworks.ts | 3 - app/{stores => composables}/user-profile.ts | 4 - app/composables/userData.ts | 1 - app/pages/artworks/[id].vue | 13 +- app/pages/following/latest.vue | 9 +- app/pages/index.vue | 2 +- app/pages/login.vue | 2 +- app/pages/ranking.vue | 2 +- app/pages/search/[keyword]/[p].vue | 20 +- app/pages/users/[id]/following.vue | 22 +- app/pages/users/[id]/index.vue | 24 +- app/types/Artworks.ts | 207 -- app/types/Comment.ts | 18 - app/types/Users.ts | 111 - app/types/index.ts | 3 - app/utils/UgoiraPlayer.ts | 3 - app/utils/ajax.ts | 2 +- app/utils/constants.ts | 17 - app/utils/index.ts | 2 - app/{api => utils}/pixiv-client.ts | 20 +- app/utils/pximg.ts | 5 +- {app => i18n}/locales/zh-Hans.json | 0 nuxt.config.ts | 51 +- package.json | 16 +- pnpm-lock.yaml | 2938 +++++++----------- server/{routes => }/api/illust/random.ts | 2 - server/{routes => }/api/user.ts | 1 - server/middleware/pixiv-proxy.ts | 1 - server/middleware/pximg-proxy.ts | 1 - tsconfig.json | 8 +- 53 files changed, 1385 insertions(+), 2343 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 app/auto-imports.d.ts delete mode 100644 app/components.d.ts rename app/{stores => composables}/artwork.ts (95%) rename app/{stores => composables}/following.ts (96%) rename app/{stores => composables}/home.ts (92%) rename app/{stores => composables}/pixiv-client.ts (85%) rename app/{stores => composables}/ranking.ts (92%) rename app/{stores => composables}/search.ts (89%) rename app/{stores => composables}/session.ts (95%) delete mode 100644 app/composables/states.ts rename app/{stores => composables}/user-artworks.ts (94%) rename app/{stores => composables}/user-profile.ts (92%) delete mode 100644 app/types/Artworks.ts delete mode 100644 app/types/Comment.ts delete mode 100644 app/types/Users.ts delete mode 100644 app/types/index.ts delete mode 100644 app/utils/constants.ts rename app/{api => utils}/pixiv-client.ts (97%) rename {app => i18n}/locales/zh-Hans.json (100%) rename server/{routes => }/api/illust/random.ts (93%) rename server/{routes => }/api/user.ts (98%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..9e22a673 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "i18n-ally.localesPaths": ["i18n/locales"] +} diff --git a/app/app.vue b/app/app.vue index b7f8983e..815aa678 100644 --- a/app/app.vue +++ b/app/app.vue @@ -23,7 +23,7 @@ import NProgress from '~/components/NProgress.vue' import SiteHeader from '~/components/SiteHeader.vue' import SiteFooter from '~/components/SiteFooter.vue' import { existsSessionId, initUser } from '~/composables/userData' -import { useUserStore } from '~/stores/session' +import { useUserStore } from '~/composables/session' const SideNav = defineAsyncComponent( () => import('~/components/SideNav/SideNav.vue') diff --git a/app/auto-imports.d.ts b/app/auto-imports.d.ts deleted file mode 100644 index fb016070..00000000 --- a/app/auto-imports.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// @ts-nocheck -// noinspection JSUnusedGlobalSymbols -// Generated by unplugin-auto-import -// biome-ignore lint: disable -export {} -declare global { - const useDialog: typeof import('naive-ui').useDialog - const useLoadingBar: typeof import('naive-ui').useLoadingBar - const useMessage: typeof import('naive-ui').useMessage - const useNotification: typeof import('naive-ui').useNotification -} diff --git a/app/components.d.ts b/app/components.d.ts deleted file mode 100644 index 60b034f6..00000000 --- a/app/components.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -// biome-ignore lint: disable -// oxlint-disable -// ------ -// Generated by unplugin-vue-components -// Read more: https://github.com/vuejs/core/pull/3399 - -export {} - -/* prettier-ignore */ -declare module 'vue' { - export interface GlobalComponents { - NAlert: typeof import('naive-ui')['NAlert'] - NButton: typeof import('naive-ui')['NButton'] - NCard: typeof import('naive-ui')['NCard'] - NConfigProvider: typeof import('naive-ui')['NConfigProvider'] - NCountdown: typeof import('naive-ui')['NCountdown'] - NDialogProvider: typeof import('naive-ui')['NDialogProvider'] - NEmpty: typeof import('naive-ui')['NEmpty'] - NFlex: typeof import('naive-ui')['NFlex'] - NLi: typeof import('naive-ui')['NLi'] - NMessageProvider: typeof import('naive-ui')['NMessageProvider'] - NPagination: typeof import('naive-ui')['NPagination'] - NSpace: typeof import('naive-ui')['NSpace'] - NStatistic: typeof import('naive-ui')['NStatistic'] - NTabPane: typeof import('naive-ui')['NTabPane'] - NTabs: typeof import('naive-ui')['NTabs'] - NTag: typeof import('naive-ui')['NTag'] - NUl: typeof import('naive-ui')['NUl'] - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] - } -} diff --git a/app/components/Artwork/ArtworkCard.vue b/app/components/Artwork/ArtworkCard.vue index 046889f3..07088ed5 100644 --- a/app/components/Artwork/ArtworkCard.vue +++ b/app/components/Artwork/ArtworkCard.vue @@ -59,7 +59,6 @@