From 9409c9b2e7c123b46a0d3c50bbcfc13708273ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A3=E6=B8=A3120?= Date: Thu, 7 Mar 2024 14:03:17 +0800 Subject: [PATCH] feat(*): update --- package.json | 1 + pnpm-lock.yaml | 60 ++++++---- src/app.vue | 87 +-------------- src/assets/{ => images}/ranks/a.png | Bin src/assets/{ => images}/ranks/am.png | Bin src/assets/{ => images}/ranks/ap.png | Bin src/assets/{ => images}/ranks/b.png | Bin src/assets/{ => images}/ranks/bm.png | Bin src/assets/{ => images}/ranks/bp.png | Bin src/assets/{ => images}/ranks/c.png | Bin src/assets/{ => images}/ranks/cm.png | Bin src/assets/{ => images}/ranks/cp.png | Bin src/assets/{ => images}/ranks/d.png | Bin src/assets/{ => images}/ranks/dp.png | Bin src/assets/{ => images}/ranks/s.png | Bin src/assets/{ => images}/ranks/sm.png | Bin src/assets/{ => images}/ranks/sp.png | Bin src/assets/{ => images}/ranks/ss.png | Bin src/assets/{ => images}/ranks/u.png | Bin src/assets/{ => images}/ranks/x.png | Bin src/assets/images/ranks/z.png | Bin 0 -> 1807 bytes src/components/app/menus/left.vue | 27 ----- src/components/app/menus/right.vue | 49 --------- src/components/chart.vue | 64 ++++++----- src/components/tetrio/me/bound.vue | 2 +- src/composables/error.ts | 8 ++ src/composables/menu.ts | 4 +- src/composables/supabase.ts | 10 -- src/layouts/default.vue | 130 ++++++++++++++++++++++ src/models/TetrioRank.ts | 4 +- src/pages/auth/confirm.vue | 31 ++++-- src/pages/index.vue | 4 - src/pages/tetrio/me.vue | 159 +++++++++++++++++++++++++++ src/pages/tetrio/me/index.vue | 157 -------------------------- src/pages/tetrio/ranks/[rank].vue | 5 +- src/styles/index.scss | 13 +++ unocss.config.ts | 1 + 37 files changed, 421 insertions(+), 395 deletions(-) rename src/assets/{ => images}/ranks/a.png (100%) rename src/assets/{ => images}/ranks/am.png (100%) rename src/assets/{ => images}/ranks/ap.png (100%) rename src/assets/{ => images}/ranks/b.png (100%) rename src/assets/{ => images}/ranks/bm.png (100%) rename src/assets/{ => images}/ranks/bp.png (100%) rename src/assets/{ => images}/ranks/c.png (100%) rename src/assets/{ => images}/ranks/cm.png (100%) rename src/assets/{ => images}/ranks/cp.png (100%) rename src/assets/{ => images}/ranks/d.png (100%) rename src/assets/{ => images}/ranks/dp.png (100%) rename src/assets/{ => images}/ranks/s.png (100%) rename src/assets/{ => images}/ranks/sm.png (100%) rename src/assets/{ => images}/ranks/sp.png (100%) rename src/assets/{ => images}/ranks/ss.png (100%) rename src/assets/{ => images}/ranks/u.png (100%) rename src/assets/{ => images}/ranks/x.png (100%) create mode 100644 src/assets/images/ranks/z.png delete mode 100644 src/components/app/menus/left.vue delete mode 100644 src/components/app/menus/right.vue create mode 100644 src/composables/error.ts create mode 100644 src/layouts/default.vue create mode 100644 src/pages/tetrio/me.vue delete mode 100644 src/pages/tetrio/me/index.vue create mode 100644 src/styles/index.scss diff --git a/package.json b/package.json index 3ee2fbd..e44e6cf 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "naive-ui": "^2.38.1", "nuxt": "^3.10.3", "remeda": "^1.44.1", + "sass": "^1.71.1", "tetrio.js": "^1.1.0", "type-fest": "^4.10.3", "unocss": "^0.58.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16c1ee6..b052077 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,10 +37,13 @@ devDependencies: version: 2.38.1(vue@3.4.20) nuxt: specifier: ^3.10.3 - version: 3.10.3(vite@5.1.4) + version: 3.10.3(sass@1.71.1)(vite@5.1.4) remeda: specifier: ^1.44.1 version: 1.44.1 + sass: + specifier: ^1.71.1 + version: 1.71.1 tetrio.js: specifier: ^1.1.0 version: 1.1.0 @@ -1149,8 +1152,8 @@ packages: '@nuxt/kit': 3.10.3 '@nuxt/schema': 3.10.3 execa: 7.2.0 - nuxt: 3.10.3(vite@5.1.4) - vite: 5.1.4 + nuxt: 3.10.3(sass@1.71.1)(vite@5.1.4) + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - rollup - supports-color @@ -1197,7 +1200,7 @@ packages: launch-editor: 2.6.1 local-pkg: 0.5.0 magicast: 0.3.3 - nuxt: 3.10.3(vite@5.1.4) + nuxt: 3.10.3(sass@1.71.1)(vite@5.1.4) nypm: 0.3.6 ohash: 1.1.3 pacote: 17.0.6 @@ -1210,7 +1213,7 @@ packages: simple-git: 3.22.0 sirv: 2.0.4 unimport: 3.7.1(rollup@4.12.0) - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) vite-plugin-inspect: 0.8.3(@nuxt/kit@3.10.3)(vite@5.1.4) vite-plugin-vue-inspector: 4.0.2(vite@5.1.4) which: 3.0.1 @@ -1300,7 +1303,7 @@ packages: resolution: {integrity: sha512-5gc02Pu1HycOVUWJ8aYsWeeXcSTPe8iX8+KIrhyEtEoOSkY0eMBuo0ssljB8wALuEmepv31DlYe5gpiRwkjESA==} dev: true - /@nuxt/vite-builder@3.10.3(vue@3.4.20): + /@nuxt/vite-builder@3.10.3(sass@1.71.1)(vue@3.4.20): resolution: {integrity: sha512-BqkbrYkEk1AVUJleofbqTRV+ltf2p1CDjGDK78zENPCgrSABlj4F4oK8rze8vmRY5qoH7kMZxgMa2dXVXCp6OA==} engines: {node: ^14.18.0 || >=16.10.0} peerDependencies: @@ -1336,8 +1339,8 @@ packages: ufo: 1.4.0 unenv: 1.9.0 unplugin: 1.7.1 - vite: 5.1.4 - vite-node: 1.3.1 + vite: 5.1.4(sass@1.71.1) + vite-node: 1.3.1(sass@1.71.1) vite-plugin-checker: 0.6.4(vite@5.1.4) vue: 3.4.20 vue-bundle-renderer: 2.0.0 @@ -2044,7 +2047,7 @@ packages: '@unocss/core': 0.58.5 '@unocss/reset': 0.58.5 '@unocss/vite': 0.58.5(vite@5.1.4) - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - rollup dev: true @@ -2267,7 +2270,7 @@ packages: chokidar: 3.6.0 fast-glob: 3.3.2 magic-string: 0.30.7 - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - rollup dev: true @@ -2326,7 +2329,7 @@ packages: '@babel/core': 7.23.9 '@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.9) '@vue/babel-plugin-jsx': 1.2.1(@babel/core@7.23.9) - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) vue: 3.4.20 transitivePeerDependencies: - supports-color @@ -2339,7 +2342,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) vue: 3.4.20 dev: true @@ -4177,6 +4180,10 @@ packages: resolution: {integrity: sha512-ZBGjl0ZMEMeOC3Ns0wUF/5UdUmr3qQhBSCniT0LxOgGGIRHiNFOkMtIHB7EOznRU47V2AxPgiVP+s+0/UCU0Hg==} dev: true + /immutable@4.3.5: + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + dev: true + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -5157,7 +5164,7 @@ packages: fsevents: 2.3.3 dev: true - /nuxt@3.10.3(vite@5.1.4): + /nuxt@3.10.3(sass@1.71.1)(vite@5.1.4): resolution: {integrity: sha512-NchGNiiz9g/ErJAb462W/lpX2NqcXYb9hugySKWvLXNdrjeAPiJ2/7mhgwUSiZA9MpjuQg3saiEajr1zlRIOCg==} engines: {node: ^14.18.0 || >=16.10.0} hasBin: true @@ -5176,7 +5183,7 @@ packages: '@nuxt/schema': 3.10.3 '@nuxt/telemetry': 2.5.3 '@nuxt/ui-templates': 1.3.1 - '@nuxt/vite-builder': 3.10.3(vue@3.4.20) + '@nuxt/vite-builder': 3.10.3(sass@1.71.1)(vue@3.4.20) '@unhead/dom': 1.8.10 '@unhead/ssr': 1.8.10 '@unhead/vue': 1.8.10(vue@3.4.20) @@ -6044,6 +6051,16 @@ packages: dev: true optional: true + /sass@1.71.1: + resolution: {integrity: sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + chokidar: 3.6.0 + immutable: 4.3.5 + source-map-js: 1.0.2 + dev: true + /schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} @@ -6700,7 +6717,7 @@ packages: '@unocss/transformer-variant-group': 0.58.5 '@unocss/vite': 0.58.5(vite@5.1.4) '@unocss/webpack': 0.58.5(webpack@5.90.3) - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - postcss - rollup @@ -6930,7 +6947,7 @@ packages: vue: 3.4.20 dev: true - /vite-node@1.3.1: + /vite-node@1.3.1(sass@1.71.1): resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -6939,7 +6956,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - '@types/node' - less @@ -6993,7 +7010,7 @@ packages: semver: 7.6.0 strip-ansi: 6.0.1 tiny-invariant: 1.3.3 - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.11 @@ -7020,7 +7037,7 @@ packages: perfect-debounce: 1.0.0 picocolors: 1.0.0 sirv: 2.0.4 - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - rollup - supports-color @@ -7040,12 +7057,12 @@ packages: '@vue/compiler-dom': 3.4.20 kolorist: 1.8.0 magic-string: 0.30.7 - vite: 5.1.4 + vite: 5.1.4(sass@1.71.1) transitivePeerDependencies: - supports-color dev: true - /vite@5.1.4: + /vite@5.1.4(sass@1.71.1): resolution: {integrity: sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7076,6 +7093,7 @@ packages: esbuild: 0.19.12 postcss: 8.4.35 rollup: 4.12.0 + sass: 1.71.1 optionalDependencies: fsevents: 2.3.3 dev: true diff --git a/src/app.vue b/src/app.vue index 71900cd..020eba1 100644 --- a/src/app.vue +++ b/src/app.vue @@ -1,88 +1,11 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/assets/ranks/a.png b/src/assets/images/ranks/a.png similarity index 100% rename from src/assets/ranks/a.png rename to src/assets/images/ranks/a.png diff --git a/src/assets/ranks/am.png b/src/assets/images/ranks/am.png similarity index 100% rename from src/assets/ranks/am.png rename to src/assets/images/ranks/am.png diff --git a/src/assets/ranks/ap.png b/src/assets/images/ranks/ap.png similarity index 100% rename from src/assets/ranks/ap.png rename to src/assets/images/ranks/ap.png diff --git a/src/assets/ranks/b.png b/src/assets/images/ranks/b.png similarity index 100% rename from src/assets/ranks/b.png rename to src/assets/images/ranks/b.png diff --git a/src/assets/ranks/bm.png b/src/assets/images/ranks/bm.png similarity index 100% rename from src/assets/ranks/bm.png rename to src/assets/images/ranks/bm.png diff --git a/src/assets/ranks/bp.png b/src/assets/images/ranks/bp.png similarity index 100% rename from src/assets/ranks/bp.png rename to src/assets/images/ranks/bp.png diff --git a/src/assets/ranks/c.png b/src/assets/images/ranks/c.png similarity index 100% rename from src/assets/ranks/c.png rename to src/assets/images/ranks/c.png diff --git a/src/assets/ranks/cm.png b/src/assets/images/ranks/cm.png similarity index 100% rename from src/assets/ranks/cm.png rename to src/assets/images/ranks/cm.png diff --git a/src/assets/ranks/cp.png b/src/assets/images/ranks/cp.png similarity index 100% rename from src/assets/ranks/cp.png rename to src/assets/images/ranks/cp.png diff --git a/src/assets/ranks/d.png b/src/assets/images/ranks/d.png similarity index 100% rename from src/assets/ranks/d.png rename to src/assets/images/ranks/d.png diff --git a/src/assets/ranks/dp.png b/src/assets/images/ranks/dp.png similarity index 100% rename from src/assets/ranks/dp.png rename to src/assets/images/ranks/dp.png diff --git a/src/assets/ranks/s.png b/src/assets/images/ranks/s.png similarity index 100% rename from src/assets/ranks/s.png rename to src/assets/images/ranks/s.png diff --git a/src/assets/ranks/sm.png b/src/assets/images/ranks/sm.png similarity index 100% rename from src/assets/ranks/sm.png rename to src/assets/images/ranks/sm.png diff --git a/src/assets/ranks/sp.png b/src/assets/images/ranks/sp.png similarity index 100% rename from src/assets/ranks/sp.png rename to src/assets/images/ranks/sp.png diff --git a/src/assets/ranks/ss.png b/src/assets/images/ranks/ss.png similarity index 100% rename from src/assets/ranks/ss.png rename to src/assets/images/ranks/ss.png diff --git a/src/assets/ranks/u.png b/src/assets/images/ranks/u.png similarity index 100% rename from src/assets/ranks/u.png rename to src/assets/images/ranks/u.png diff --git a/src/assets/ranks/x.png b/src/assets/images/ranks/x.png similarity index 100% rename from src/assets/ranks/x.png rename to src/assets/images/ranks/x.png diff --git a/src/assets/images/ranks/z.png b/src/assets/images/ranks/z.png new file mode 100644 index 0000000000000000000000000000000000000000..f96ae2d15f7e8e13b0f90e3eac413da23f8fe55d GIT binary patch literal 1807 zcma))X*iqd8pq#6v?=W{n4-p%nQ5!7b54s`Dw-ga5+W!nDt2m*EvV!b)KW`JgVd7L z(%9NqYpEqDsckUKjM9p>Gh>)qW?IxlV&0w)J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>`8?aay!v#1VX*pjgFC$rx4v^qIPc7=F>@BF>r zDpyDHVP_8&3X3h4I~R`TrytDSC(W_Q=_PFb|=re4mP%M#(Sofh<3d2yoeUpIFI*qcrBa-6> zGhW);y?e6{${?nCg>-<{@T<6|`?Ls!k*eD`#ijS{1LGv2MEmzq+SVkvDjEq|t;-_w($IJWc+iwasIz-t1^EQOW3eX zAOAe)yOo-rMBM&*_d7z1$+W84^W*lQ<*m*iREuo41q$SaUq}9-c0f^0fZI<03VZm+ zIOE+p^rGCS{g-bj8(N$13E18oDX1Dd6_ut=a{aPgC1+OJ(BTEIa(Xo;2_`ucrq@L^ zcL#SpC6d0znE>9)R&h$!Kk*?4IjKzPrF@0q@T{-FW`LwXb3O{2l_tMHd=9{}2G5$7 z!ja@%1q~7$NjRmvcs!Laf+5KwG4Qd03xqL{9BrTogchI}BORfL1N>kr`vw_~d@4x! z_&g7ZWNG4? Wm#-VM -import { HomeOutlined, UserOutlined } from '@vicons/antd' -import { type MenuOption } from 'naive-ui' -import { isDefined, merge } from 'remeda' - -const user = useSupabaseUser() - -const menus = computed(() => { - return [ - createRouteMenu('主页', 'index', HomeOutlined), - merge(createMenuWithImageIcon('TETR.IO', 'https://txt.osk.sh/branding/tetrio-color.svg'), { - children: [ - createRouteMenuWithClassIcon('段位', 'tetrio-ranks', 'i-ic:outline-leaderboard'), - merge(createRouteMenu('您', 'tetrio-me', UserOutlined), { - disabled: !isDefined(user.value) - }) - ] - }) - ] -}) - - - \ No newline at end of file diff --git a/src/components/app/menus/right.vue b/src/components/app/menus/right.vue deleted file mode 100644 index 1f189ab..0000000 --- a/src/components/app/menus/right.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/chart.vue b/src/components/chart.vue index 39f9679..713761a 100644 --- a/src/components/chart.vue +++ b/src/components/chart.vue @@ -1,5 +1,5 @@