From 5489b2757bc5ccdc9268c758bf46463616c2863b Mon Sep 17 00:00:00 2001 From: Tigercrl Date: Sat, 19 Oct 2024 22:01:08 +0800 Subject: [PATCH] feat: dark mode, version sort --- package.json | 3 +- pnpm-lock.yaml | 51 +++++++++++ src/App.vue | 47 ++++++++++- src/components/Back.vue | 6 +- src/style.css | 43 +++++++--- src/utils/darkmode.ts | 173 ++++++++++++++++++++++++++++++++++++++ src/utils/util.ts | 111 +++++++++++++++++++++++- src/views/Cores.vue | 31 +++++-- src/views/NodeList.vue | 25 ++++-- src/views/VersionInfo.vue | 57 +++++++++---- src/views/VersionList.vue | 33 +++++--- 11 files changed, 511 insertions(+), 69 deletions(-) create mode 100644 src/utils/darkmode.ts diff --git a/package.json b/package.json index b639d78..3b9f577 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "GPL-3.0-only", "author": "MCSLTeam", "private": true, - "version": "1.0.0", + "version": "1.0.1", "type": "module", "scripts": { "dev": "vite", @@ -12,6 +12,7 @@ "preview": "vite preview" }, "dependencies": { + "@vueuse/core": "^11.1.0", "axios": "^1.6.8", "js-cookie": "^3.0.5", "pinyin": "4.0.0-alpha.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1939449..6ca5fbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@vueuse/core': + specifier: ^11.1.0 + version: 11.1.0(vue@3.4.27(typescript@5.4.5)) axios: specifier: ^1.6.8 version: 1.6.8 @@ -332,6 +335,9 @@ packages: '@types/pinyin@2.10.2': resolution: {integrity: sha512-jLzlRkaLRLg+lgYPjOuP3HX2cozUkhXls5GTXopsKuKJ9lDGlIAb88OoIztH6TbNUsoJnl/7e/kjaumA5IKKJg==} + '@types/web-bluetooth@0.0.20': + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + '@vitejs/plugin-vue@5.0.4': resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -388,6 +394,15 @@ packages: '@vue/shared@3.4.27': resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==} + '@vueuse/core@11.1.0': + resolution: {integrity: sha512-P6dk79QYA6sKQnghrUz/1tHi0n9mrb/iO1WTMk/ElLmTyNqgDeSZ3wcDf6fRBGzRJbeG1dxzEOvLENMjr+E3fg==} + + '@vueuse/metadata@11.1.0': + resolution: {integrity: sha512-l9Q502TBTaPYGanl1G+hPgd3QX5s4CGnpXriVBR5fEZ/goI6fvDaVmIl3Td8oKFurOxTmbXvBPSsgrd6eu6HYg==} + + '@vueuse/shared@11.1.0': + resolution: {integrity: sha512-YUtIpY122q7osj+zsNMFAfMTubGz0sn5QzE5gPzAIiCmtt2ha3uQUY1+JPyL4gRCTsLPX82Y9brNbo/aqlA91w==} + ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -681,6 +696,17 @@ packages: terser: optional: true + vue-demi@0.14.10: + resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} + engines: {node: '>=12'} + hasBin: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue-i18n@9.13.1: resolution: {integrity: sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==} engines: {node: '>= 16'} @@ -889,6 +915,8 @@ snapshots: '@types/pinyin@2.10.2': {} + '@types/web-bluetooth@0.0.20': {} + '@vitejs/plugin-vue@5.0.4(vite@5.2.11)(vue@3.4.27(typescript@5.4.5))': dependencies: vite: 5.2.11 @@ -974,6 +1002,25 @@ snapshots: '@vue/shared@3.4.27': {} + '@vueuse/core@11.1.0(vue@3.4.27(typescript@5.4.5))': + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 11.1.0 + '@vueuse/shared': 11.1.0(vue@3.4.27(typescript@5.4.5)) + vue-demi: 0.14.10(vue@3.4.27(typescript@5.4.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/metadata@11.1.0': {} + + '@vueuse/shared@11.1.0(vue@3.4.27(typescript@5.4.5))': + dependencies: + vue-demi: 0.14.10(vue@3.4.27(typescript@5.4.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 @@ -1272,6 +1319,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + vue-demi@0.14.10(vue@3.4.27(typescript@5.4.5)): + dependencies: + vue: 3.4.27(typescript@5.4.5) + vue-i18n@9.13.1(vue@3.4.27(typescript@5.4.5)): dependencies: '@intlify/core-base': 9.13.1 diff --git a/src/App.vue b/src/App.vue index 30c38a0..b616479 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,30 @@ \ No newline at end of file