From 6abf6544f4223e905d7125a2a163527ef6bc1102 Mon Sep 17 00:00:00 2001 From: Yue-plus Date: Fri, 30 Aug 2024 15:49:58 +0800 Subject: [PATCH] perf(OwnerInfo): use arknights.config.tsx --- arknights.config.tsx | 8 + package.json | 4 +- pnpm-lock.yaml | 318 ++++++++++++++-------------------- src/_types/ArknightsConfig.ts | 11 ++ src/components/OwnerInfo.tsx | 85 +++++---- src/layouts/InfoLayout.astro | 2 +- src/pages/index.astro | 2 + 7 files changed, 208 insertions(+), 222 deletions(-) diff --git a/arknights.config.tsx b/arknights.config.tsx index 23b9ddf..d52e916 100644 --- a/arknights.config.tsx +++ b/arknights.config.tsx @@ -35,6 +35,14 @@ export default { TapTap: "https://www.taptap.cn/", GitHub: "https://github.com/Yue-plus/astro-arknights", }, + ownerInfo: { + name: "Yue_plus", + slogan: "一切不如意终将远去,未来风景独好。", + footerLinks: [ + {label: "GitHub", url: "https://github.com/Yue-plus"}, + {label: "Bilibili", url: "https://space.bilibili.com/28606851"}, + ] + } }, pageTracker: { microInfo: "ARKNIGHTS", diff --git a/package.json b/package.json index 9b27824..7404f90 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ "@nanostores/react": "^0.7.3", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", - "astro": "^4.14.6", + "astro": "^4.15.1", "nanostores": "^0.11.3", "react": "^18.3.1", "react-dom": "^18.3.1", "sass": "^1.77.8", - "swiper": "^11.1.10", + "swiper": "^11.1.11", "tailwindcss": "^3.4.10", "typescript": "^5.5.4" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca0230c..80cb915 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 3.6.2(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.4.2(sass@1.77.8)) '@astrojs/tailwind': specifier: ^5.1.0 - version: 5.1.0(astro@4.14.6(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4))(tailwindcss@3.4.10) + version: 5.1.0(astro@4.15.1(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4))(tailwindcss@3.4.10) '@nanostores/react': specifier: ^0.7.3 version: 0.7.3(nanostores@0.11.3)(react@18.3.1) @@ -27,8 +27,8 @@ importers: specifier: ^18.3.0 version: 18.3.0 astro: - specifier: ^4.14.6 - version: 4.14.6(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4) + specifier: ^4.15.1 + version: 4.15.1(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4) nanostores: specifier: ^0.11.3 version: 0.11.3 @@ -42,8 +42,8 @@ importers: specifier: ^1.77.8 version: 1.77.8 swiper: - specifier: ^11.1.10 - version: 11.1.10 + specifier: ^11.1.11 + version: 11.1.11 tailwindcss: specifier: ^3.4.10 version: 3.4.10 @@ -126,8 +126,8 @@ packages: resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.5': - resolution: {integrity: sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w==} + '@babel/generator@7.25.6': + resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.24.7': @@ -168,16 +168,16 @@ packages: resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.0': - resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} + '@babel/helpers@7.25.6': + resolution: {integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.4': - resolution: {integrity: sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==} + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} hasBin: true @@ -209,12 +209,12 @@ packages: resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.4': - resolution: {integrity: sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg==} + '@babel/traverse@7.25.6': + resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.4': - resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} '@emmetio/abbreviation@2.3.3': @@ -699,25 +699,25 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 - '@volar/kit@2.4.0': - resolution: {integrity: sha512-uqwtPKhrbnP+3f8hs+ltDYXLZ6Wdbs54IzkaPocasI4aBhqWLht5qXctE1MqpZU52wbH359E0u9nhxEFmyon+w==} + '@volar/kit@2.4.1': + resolution: {integrity: sha512-XCHjrxcvjh/GEBiJt2e1KfsP8aQ+z7ZXRKR/5BA2/SFVzM+pKpL9iHZZJN7QGMsqTOt8FgN8XQhTp8qqURn+cw==} peerDependencies: typescript: '*' - '@volar/language-core@2.4.0': - resolution: {integrity: sha512-FTla+khE+sYK0qJP+6hwPAAUwiNHVMph4RUXpxf/FIPKUP61NFrVZorml4mjFShnueR2y9/j8/vnh09YwVdH7A==} + '@volar/language-core@2.4.1': + resolution: {integrity: sha512-9AKhC7Qn2mQYxj7Dz3bVxeOk7gGJladhWixUYKef/o0o7Bm4an+A3XvmcTHVqZ8stE6lBVH++g050tBtJ4TZPQ==} - '@volar/language-server@2.4.0': - resolution: {integrity: sha512-rmGIjAxWekWQiGH97Mosb4juiD/hfFYNQKV5Py9r7vDOLSkbIwRhITbwHm88NJKs8P6TNc6w/PfBXN6yjKadJg==} + '@volar/language-server@2.4.1': + resolution: {integrity: sha512-aVaUjuQEPFJZckNwziCqrmiirsVnV3LK9Kbl1Hq5C4G6RTyof2xSdYKwyL2Azv41DkgkW85lJ2F6zVX3cpQfzw==} - '@volar/language-service@2.4.0': - resolution: {integrity: sha512-4P3yeQXIL68mLfS3n6P3m02IRg3GnLHUU9k/1PCHEfm5FG9bySkDOc72dbBn2vAa2BxOqm18bmmZXrsWuQ5AOw==} + '@volar/language-service@2.4.1': + resolution: {integrity: sha512-Q3NVjZTAz0Vnco70Rgcryq2eDPWkFBdpzr84aYqOGvVC4SBjq1Wsx0d9NyA4seQHfHWwbZyzyviKRm+htyRlKg==} - '@volar/source-map@2.4.0': - resolution: {integrity: sha512-2ceY8/NEZvN6F44TXw2qRP6AQsvCYhV2bxaBPWxV9HqIfkbRydSksTFObCF1DBDNBfKiZTS8G/4vqV6cvjdOIQ==} + '@volar/source-map@2.4.1': + resolution: {integrity: sha512-Xq6ep3OZg9xUqN90jEgB9ztX5SsTz1yiV8wiQbcYNjWkek+Ie3dc8l7AVt3EhDm9mSIR58oWczHkzM2H6HIsmQ==} - '@volar/typescript@2.4.0': - resolution: {integrity: sha512-9zx3lQWgHmVd+JRRAHUSRiEhe4TlzL7U7e6ulWXOxHH/WNYxzKwCvZD7WYWEZFdw4dHfTD9vUR0yPQO6GilCaQ==} + '@volar/typescript@2.4.1': + resolution: {integrity: sha512-UoRzC0PXcwajFQTu8XxKSYNsWNBtVja6Y9gC8eLv7kYm+UEKJCcZ8g7dialsOYA0HKs3Vpg57MeCsawFLC6m9Q==} '@vscode/emmet-helper@2.9.3': resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} @@ -778,8 +778,8 @@ packages: array-iterate@2.0.1: resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} - astro@4.14.6: - resolution: {integrity: sha512-MIDyNhtu3L4uakHvlTprh21eQPehYOtZSuSLtd+r6xZcl3lB+mlBz/hs1W3iHEQAORyJnKArWSY/aVOBKUyflA==} + astro@4.15.1: + resolution: {integrity: sha512-XvKZ2GaDbCsMfcJess4o+4D4cCKja45GJ/9o6EJ6n96xaen8HZMRoJn3YKL9TOjIrL2NuU4mBFMG2JivPJ0foA==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -1005,8 +1005,8 @@ packages: engines: {node: '>=12'} hasBin: true - escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} escape-string-regexp@1.0.5: @@ -1031,10 +1031,6 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} - extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -1101,10 +1097,6 @@ packages: resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} engines: {node: '>=18'} - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} - github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} @@ -1178,10 +1170,6 @@ packages: http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} - immutable@4.3.7: resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} @@ -1237,10 +1225,6 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} @@ -1347,6 +1331,9 @@ packages: magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magicast@0.3.5: + resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} + markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} @@ -1389,9 +1376,6 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1484,10 +1468,6 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - mimic-function@5.0.1: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} @@ -1540,10 +1520,6 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -1552,10 +1528,6 @@ packages: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - onetime@7.0.0: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} @@ -1608,10 +1580,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -1894,10 +1862,6 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -1911,8 +1875,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - swiper@11.1.10: - resolution: {integrity: sha512-pAVM6vCb6bumj2B9aSh67l3wP1j5YR8dPQM1YhQKMpnBc33vs+RpyVz6NZYZl/ZopCBSYbbWK5nvESwbmU0QXQ==} + swiper@11.1.11: + resolution: {integrity: sha512-077Aw3OrlZpkkBRf/6+44bGh/HZY/vsLEyate2db2KkJgYUIR5TvDgvvhcJtW/puXzw79w5KBc30DauEX6GZYQ==} engines: {node: '>= 4.7.0'} tailwindcss@3.4.10: @@ -1927,6 +1891,9 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -2281,20 +2248,20 @@ snapshots: '@astrojs/compiler': 2.10.3 '@astrojs/yaml2ts': 0.2.1 '@jridgewell/sourcemap-codec': 1.5.0 - '@volar/kit': 2.4.0(typescript@5.5.4) - '@volar/language-core': 2.4.0 - '@volar/language-server': 2.4.0 - '@volar/language-service': 2.4.0 - '@volar/typescript': 2.4.0 + '@volar/kit': 2.4.1(typescript@5.5.4) + '@volar/language-core': 2.4.1 + '@volar/language-server': 2.4.1 + '@volar/language-service': 2.4.1 + '@volar/typescript': 2.4.1 fast-glob: 3.3.2 muggle-string: 0.4.1 - volar-service-css: 0.0.61(@volar/language-service@2.4.0) - volar-service-emmet: 0.0.61(@volar/language-service@2.4.0) - volar-service-html: 0.0.61(@volar/language-service@2.4.0) - volar-service-prettier: 0.0.61(@volar/language-service@2.4.0) - volar-service-typescript: 0.0.61(@volar/language-service@2.4.0) - volar-service-typescript-twoslash-queries: 0.0.61(@volar/language-service@2.4.0) - volar-service-yaml: 0.0.61(@volar/language-service@2.4.0) + volar-service-css: 0.0.61(@volar/language-service@2.4.1) + volar-service-emmet: 0.0.61(@volar/language-service@2.4.1) + volar-service-html: 0.0.61(@volar/language-service@2.4.1) + volar-service-prettier: 0.0.61(@volar/language-service@2.4.1) + volar-service-typescript: 0.0.61(@volar/language-service@2.4.1) + volar-service-typescript-twoslash-queries: 0.0.61(@volar/language-service@2.4.1) + volar-service-yaml: 0.0.61(@volar/language-service@2.4.1) vscode-html-languageservice: 5.3.1 vscode-uri: 3.0.8 transitivePeerDependencies: @@ -2339,9 +2306,9 @@ snapshots: - supports-color - vite - '@astrojs/tailwind@5.1.0(astro@4.14.6(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4))(tailwindcss@3.4.10)': + '@astrojs/tailwind@5.1.0(astro@4.15.1(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4))(tailwindcss@3.4.10)': dependencies: - astro: 4.14.6(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4) + astro: 4.15.1(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4) autoprefixer: 10.4.20(postcss@8.4.41) postcss: 8.4.41 postcss-load-config: 4.0.2(postcss@8.4.41) @@ -2376,14 +2343,14 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.5 + '@babel/generator': 7.25.6 '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helpers': 7.25.0 - '@babel/parser': 7.25.4 + '@babel/helpers': 7.25.6 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 convert-source-map: 2.0.0 debug: 4.3.6 gensync: 1.0.0-beta.2 @@ -2392,16 +2359,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.25.5': + '@babel/generator@7.25.6': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/helper-compilation-targets@7.25.2': dependencies: @@ -2413,8 +2380,8 @@ snapshots: '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -2424,7 +2391,7 @@ snapshots: '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.4 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color @@ -2432,8 +2399,8 @@ snapshots: '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -2443,10 +2410,10 @@ snapshots: '@babel/helper-validator-option@7.24.8': {} - '@babel/helpers@7.25.0': + '@babel/helpers@7.25.6': dependencies: '@babel/template': 7.25.0 - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/highlight@7.24.7': dependencies: @@ -2455,9 +2422,9 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.25.4': + '@babel/parser@7.25.6': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: @@ -2481,29 +2448,29 @@ snapshots: '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.4 - '@babel/types': 7.25.4 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 - '@babel/traverse@7.25.4': + '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.5 - '@babel/parser': 7.25.4 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.25.4': + '@babel/types@7.25.6': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 @@ -2791,24 +2758,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.25.4 - '@babel/types': 7.25.4 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.25.4 - '@babel/types': 7.25.4 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@types/cookie@0.6.0': {} @@ -2858,24 +2825,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@volar/kit@2.4.0(typescript@5.5.4)': + '@volar/kit@2.4.1(typescript@5.5.4)': dependencies: - '@volar/language-service': 2.4.0 - '@volar/typescript': 2.4.0 + '@volar/language-service': 2.4.1 + '@volar/typescript': 2.4.1 typesafe-path: 0.2.2 typescript: 5.5.4 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - '@volar/language-core@2.4.0': + '@volar/language-core@2.4.1': dependencies: - '@volar/source-map': 2.4.0 + '@volar/source-map': 2.4.1 - '@volar/language-server@2.4.0': + '@volar/language-server@2.4.1': dependencies: - '@volar/language-core': 2.4.0 - '@volar/language-service': 2.4.0 - '@volar/typescript': 2.4.0 + '@volar/language-core': 2.4.1 + '@volar/language-service': 2.4.1 + '@volar/typescript': 2.4.1 path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -2883,18 +2850,18 @@ snapshots: vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - '@volar/language-service@2.4.0': + '@volar/language-service@2.4.1': dependencies: - '@volar/language-core': 2.4.0 + '@volar/language-core': 2.4.1 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - '@volar/source-map@2.4.0': {} + '@volar/source-map@2.4.1': {} - '@volar/typescript@2.4.0': + '@volar/typescript@2.4.1': dependencies: - '@volar/language-core': 2.4.0 + '@volar/language-core': 2.4.1 path-browserify: 1.0.1 vscode-uri: 3.0.8 @@ -2956,18 +2923,15 @@ snapshots: array-iterate@2.0.1: {} - astro@4.14.6(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4): + astro@4.15.1(rollup@4.21.1)(sass@1.77.8)(typescript@5.5.4): dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 '@astrojs/markdown-remark': 5.2.0 '@astrojs/telemetry': 3.1.0 '@babel/core': 7.25.2 - '@babel/generator': 7.25.5 - '@babel/parser': 7.25.4 '@babel/plugin-transform-react-jsx': 7.25.2(@babel/core@7.25.2) - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@oslojs/encoding': 0.4.1 '@rollup/pluginutils': 5.1.0(rollup@4.21.1) '@types/babel__core': 7.20.5 @@ -2990,8 +2954,8 @@ snapshots: es-module-lexer: 1.5.4 esbuild: 0.21.5 estree-walker: 3.0.3 - execa: 8.0.1 fast-glob: 3.3.2 + fastq: 1.17.1 flattie: 1.1.1 github-slugger: 2.0.0 gray-matter: 4.0.3 @@ -3000,6 +2964,7 @@ snapshots: js-yaml: 4.1.0 kleur: 4.1.5 magic-string: 0.30.11 + magicast: 0.3.5 micromatch: 4.0.8 mrmime: 2.0.0 neotraverse: 0.6.18 @@ -3014,6 +2979,7 @@ snapshots: shiki: 1.14.1 string-width: 7.2.0 strip-ansi: 7.1.0 + tinyexec: 0.3.0 tsconfck: 3.1.1(typescript@5.5.4) unist-util-visit: 5.0.0 vfile: 6.0.3 @@ -3258,7 +3224,7 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - escalade@3.1.2: {} + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -3274,18 +3240,6 @@ snapshots: eventemitter3@5.0.1: {} - execa@8.0.1: - dependencies: - cross-spawn: 7.0.3 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.3.0 - onetime: 6.0.0 - signal-exit: 4.1.0 - strip-final-newline: 3.0.0 - extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -3344,8 +3298,6 @@ snapshots: get-east-asian-width@1.2.0: {} - get-stream@8.0.1: {} - github-slugger@2.0.0: {} glob-parent@5.1.2: @@ -3475,8 +3427,6 @@ snapshots: http-cache-semantics@4.1.1: {} - human-signals@5.0.0: {} - immutable@4.3.7: {} import-meta-resolve@4.1.0: {} @@ -3514,8 +3464,6 @@ snapshots: is-plain-obj@4.1.0: {} - is-stream@3.0.0: {} - is-unicode-supported@1.3.0: {} is-unicode-supported@2.0.0: {} @@ -3601,6 +3549,12 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + magicast@0.3.5: + dependencies: + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 + source-map-js: 1.2.0 + markdown-table@3.0.3: {} mdast-util-definitions@6.0.0: @@ -3722,8 +3676,6 @@ snapshots: dependencies: '@types/mdast': 4.0.4 - merge-stream@2.0.0: {} - merge2@1.4.1: {} micromark-core-commonmark@2.0.1: @@ -3922,8 +3874,6 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 - mimic-fn@4.0.0: {} - mimic-function@5.0.1: {} minimatch@9.0.5: @@ -3960,18 +3910,10 @@ snapshots: normalize-range@0.1.2: {} - npm-run-path@5.3.0: - dependencies: - path-key: 4.0.0 - object-assign@4.1.1: {} object-hash@3.0.0: {} - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - onetime@7.0.0: dependencies: mimic-function: 5.0.1 @@ -4030,8 +3972,6 @@ snapshots: path-key@3.1.1: {} - path-key@4.0.0: {} - path-parse@1.0.7: {} path-scurry@1.11.1: @@ -4379,8 +4319,6 @@ snapshots: strip-bom@3.0.0: {} - strip-final-newline@3.0.0: {} - sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -4397,7 +4335,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - swiper@11.1.10: {} + swiper@11.1.11: {} tailwindcss@3.4.10: dependencies: @@ -4434,6 +4372,8 @@ snapshots: dependencies: any-promise: 1.3.0 + tinyexec@0.3.0: {} + to-fast-properties@2.0.0: {} to-regex-range@5.0.1: @@ -4520,7 +4460,7 @@ snapshots: update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: browserslist: 4.23.3 - escalade: 3.1.2 + escalade: 3.2.0 picocolors: 1.0.1 util-deprecate@1.0.2: {} @@ -4553,44 +4493,44 @@ snapshots: optionalDependencies: vite: 5.4.2(sass@1.77.8) - volar-service-css@0.0.61(@volar/language-service@2.4.0): + volar-service-css@0.0.61(@volar/language-service@2.4.1): dependencies: vscode-css-languageservice: 6.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-emmet@0.0.61(@volar/language-service@2.4.0): + volar-service-emmet@0.0.61(@volar/language-service@2.4.1): dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-html@0.0.61(@volar/language-service@2.4.0): + volar-service-html@0.0.61(@volar/language-service@2.4.1): dependencies: vscode-html-languageservice: 5.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-prettier@0.0.61(@volar/language-service@2.4.0): + volar-service-prettier@0.0.61(@volar/language-service@2.4.1): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@2.4.0): + volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@2.4.1): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-typescript@0.0.61(@volar/language-service@2.4.0): + volar-service-typescript@0.0.61(@volar/language-service@2.4.1): dependencies: path-browserify: 1.0.1 semver: 7.6.3 @@ -4599,14 +4539,14 @@ snapshots: vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 - volar-service-yaml@0.0.61(@volar/language-service@2.4.0): + volar-service-yaml@0.0.61(@volar/language-service@2.4.1): dependencies: vscode-uri: 3.0.8 yaml-language-server: 1.15.0 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': 2.4.1 vscode-css-languageservice@6.3.1: dependencies: @@ -4722,7 +4662,7 @@ snapshots: yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/src/_types/ArknightsConfig.ts b/src/_types/ArknightsConfig.ts index 2afd97f..d9e396c 100644 --- a/src/_types/ArknightsConfig.ts +++ b/src/_types/ArknightsConfig.ts @@ -8,6 +8,12 @@ export type NavbarItem = { href: string } +export type OwnerInfoFooterLink = { + label: string, + url: string, + portraitHidden?: boolean +} + export type ArknightsConfig = { title: string description: string @@ -30,6 +36,11 @@ export type ArknightsConfig = { TapTap?: string GitHub?: string } + ownerInfo: { + name?: string + slogan?: string + footerLinks?: OwnerInfoFooterLink[] + } } pageTracker: { microInfo: string diff --git a/src/components/OwnerInfo.tsx b/src/components/OwnerInfo.tsx index 736cee2..03932ee 100644 --- a/src/components/OwnerInfo.tsx +++ b/src/components/OwnerInfo.tsx @@ -1,16 +1,18 @@ -import React from "react"; -import arknightsConfig from "../../arknights.config.tsx"; +import React from "react" +import type {OwnerInfoFooterLink} from "../_types/ArknightsConfig.ts" +import arknightsConfig from "../../arknights.config.tsx" import { IconArrow, - IconBiliBili, IconGitHub, + IconBiliBili, + IconGitHub, IconSkland, IconTapTap, IconWechat, IconWeibo, - LogoRhodesIsland -} from "./SvgIcons"; -import {isOwnerInfoOpen} from "./store/rootLayoutStore.ts"; -import {useStore} from "@nanostores/react"; + LogoRhodesIsland, +} from "./SvgIcons" +import {isOwnerInfoOpen} from "./store/rootLayoutStore.ts" +import {useStore} from "@nanostores/react" function Divider({children, portraitHidden}: { @@ -26,22 +28,44 @@ function Divider({children, portraitHidden}: { } function Welcome() { + const name = arknightsConfig?.navbar?.ownerInfo?.name + ?
+ 通行证 +
+
+ {arknightsConfig.navbar.ownerInfo.name} +
+
+
+ : 无账号信息 + + const slogan = arknightsConfig?.navbar?.ownerInfo?.slogan + ?
+ {/* TODO: 换个字体 */} + {arknightsConfig.navbar.ownerInfo.slogan} +
+ : Rhodes Island + return <> WELCOME
- 无账号信息 - Rhodes Island -
Please login. -
-
请先登入您的账号。 -
+ {name} + {slogan} + {/* +
Please login.
+
请先登入您的账号。
+ */}
@@ -89,17 +113,10 @@ function ToolBox() { } -function BoxButton({label, url, portraitHidden}: { - label: string - url: string - portraitHidden?: boolean -}) { - return - {label} +function FooterLink({label, url, portraitHidden}: OwnerInfoFooterLink) { + return + {label} } @@ -139,9 +156,17 @@ export default function OwnerInfo(): React.JSX.Element {
+ { + // TODO: 感觉有点和上面 功能重复 + arknightsConfig?.navbar?.ownerInfo?.footerLinks?.map((item, index) => + ) ?? null + } + + {/* + */}
diff --git a/src/layouts/InfoLayout.astro b/src/layouts/InfoLayout.astro index 94756f9..925c5b6 100644 --- a/src/layouts/InfoLayout.astro +++ b/src/layouts/InfoLayout.astro @@ -79,7 +79,7 @@ const subNavigationItems = Astro.props.subNavigationItems } - +