From 2e8086321e219cf94348857c9cab173272570f8f Mon Sep 17 00:00:00 2001 From: Tigercrl Date: Sun, 12 Jan 2025 14:08:49 +0800 Subject: [PATCH] fix: bugs & lint: code --- apps/app/.prettier.js | 4 +- apps/app/eslint.config.js | 4 +- apps/app/pnpm-lock.yaml | 2 +- apps/app/src-tauri/capabilities/default.json | 6 +- apps/app/src/App.vue | 16 +- apps/app/src/components/WindowButton.vue | 29 +- apps/app/src/main.ts | 68 +-- apps/app/src/router.ts | 120 ++--- apps/app/tsconfig.json | 4 +- apps/web/.prettier.js | 4 +- apps/web/README.md | 2 +- apps/web/app.config.ts | 12 +- apps/web/app.vue | 35 +- apps/web/crowdin.yml | 4 +- apps/web/eslint.config.js | 13 +- apps/web/i18n.config.ts | 16 +- apps/web/layouts/auth.vue | 408 ++++++++-------- apps/web/layouts/default.vue | 10 +- apps/web/layouts/empty.vue | 18 +- apps/web/middleware/auth.global.ts | 47 +- apps/web/nuxt.config.ts | 71 ++- apps/web/package.json | 1 + apps/web/pages/auth/login.vue | 205 ++++---- apps/web/pages/auth/register.vue | 237 +++++---- apps/web/pages/connect.vue | 4 +- apps/web/pages/debug.vue | 8 +- apps/web/pages/index.vue | 8 +- apps/web/pages/instances.vue | 4 +- apps/web/pages/news.vue | 8 +- apps/web/pages/welcome/done.vue | 9 +- apps/web/pages/welcome/eula.vue | 10 +- apps/web/pages/welcome/welcome.vue | 8 +- apps/web/server/api/auth/hasAdmin.get.ts | 28 +- .../web/server/api/auth/hasPermission.post.ts | 41 +- apps/web/server/api/auth/login.post.ts | 40 +- .../web/server/api/auth/registerAdmin.post.ts | 36 +- apps/web/server/api/auth/verifyToken.post.ts | 32 +- apps/web/server/api/daemon/addDaemon.post.ts | 30 +- .../server/api/daemon/getDaemonList.post.ts | 55 ++- .../server/api/daemon/removeDaemon.post.ts | 28 +- apps/web/server/api/getMeta.get.ts | 16 +- apps/web/server/api/update/check.post.ts | 36 +- apps/web/server/api/update/update.post.ts | 36 +- apps/web/server/tsconfig.json | 2 +- apps/web/server/utils/api.ts | 33 +- apps/web/server/utils/auth.ts | 211 ++++---- apps/web/server/utils/config.ts | 166 +++---- apps/web/server/utils/daemon.ts | 38 +- apps/web/server/utils/storage.ts | 122 +++-- apps/web/server/utils/update.ts | 90 ++-- apps/web/tsconfig.json | 4 +- apps/web/utils/auth.ts | 227 +++++---- packages/commons/src/assets/css/style.css | 3 +- .../src/components/sidebar/Sidebar.vue | 2 +- packages/commons/src/pages/Debug.vue | 52 +- packages/commons/src/pages/News.vue | 336 +++++++------ packages/commons/src/pages/welcome/Done.vue | 11 +- packages/commons/src/pages/welcome/Eula.vue | 70 +-- .../commons/src/pages/welcome/Welcome.vue | 110 ++--- packages/commons/src/utils/globals.ts | 16 +- packages/commons/src/utils/loader.ts | 120 ++--- packages/commons/src/utils/uses.ts | 450 +++++++++--------- pnpm-lock.yaml | 142 +++--- turbo.json | 3 + 64 files changed, 1972 insertions(+), 2009 deletions(-) diff --git a/apps/app/.prettier.js b/apps/app/.prettier.js index 9a15f37e..cf53826d 100644 --- a/apps/app/.prettier.js +++ b/apps/app/.prettier.js @@ -1,3 +1,3 @@ -import config from '@repo/configs/prettier/base' +import config from "@repo/configs/prettier/base"; -export default config; \ No newline at end of file +export default config; diff --git a/apps/app/eslint.config.js b/apps/app/eslint.config.js index c04c7777..d532c833 100644 --- a/apps/app/eslint.config.js +++ b/apps/app/eslint.config.js @@ -1,3 +1,3 @@ -import vueConfig from '@repo/configs/eslint/vue.js' +import vueConfig from "@repo/configs/eslint/vue.js"; -export default vueConfig +export default vueConfig; diff --git a/apps/app/pnpm-lock.yaml b/apps/app/pnpm-lock.yaml index 6b34460b..6e99d7d5 100644 --- a/apps/app/pnpm-lock.yaml +++ b/apps/app/pnpm-lock.yaml @@ -1 +1 @@ -# This is a fake lock file to make tauri use pnpm \ No newline at end of file +# This is a fake lock file to make tauri use pnpm diff --git a/apps/app/src-tauri/capabilities/default.json b/apps/app/src-tauri/capabilities/default.json index ee6a270f..cdf9723c 100644 --- a/apps/app/src-tauri/capabilities/default.json +++ b/apps/app/src-tauri/capabilities/default.json @@ -2,9 +2,7 @@ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", - "windows": [ - "main" - ], + "windows": ["main"], "permissions": [ "core:default", "opener:default", @@ -14,4 +12,4 @@ "core:window:allow-unmaximize", "core:window:allow-minimize" ] -} \ No newline at end of file +} diff --git a/apps/app/src/App.vue b/apps/app/src/App.vue index 323f3fa9..5e603f5f 100644 --- a/apps/app/src/App.vue +++ b/apps/app/src/App.vue @@ -1,26 +1,26 @@