From 1eda9d52b6d90ce6a649282d197c59f24124c786 Mon Sep 17 00:00:00 2001 From: ourongxing Date: Wed, 13 Aug 2025 00:33:14 +0800 Subject: [PATCH] feat: horizontal scrolling on mobile devices closed #215 --- package.json | 1 + pnpm-lock.yaml | 254 +++++++++++++++++++++++++--------- shared/pinyin.json | 8 +- shared/pre-sources.ts | 8 +- shared/sources.json | 12 +- src/components/column/dnd.tsx | 108 +++++++++------ src/routes/__root.tsx | 13 +- 7 files changed, 276 insertions(+), 128 deletions(-) diff --git a/package.json b/package.json index a076241..478ccd3 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "overlayscrollbars": "^2.11.1", "pnpm": "^10.5.2", "react": "^19.0.0", + "react-device-detect": "^2.2.3", "react-dom": "^19.0.0", "react-use": "^17.6.0", "uncrypto": "^0.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6da6ce4..03b8ef1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,7 +75,7 @@ importers: version: 1.11.13(patch_hash=ab3d460b598ef9569bd8b88d40864d7b0e942a6d8b2e646643076a5c0477cc4d) db0: specifier: ^0.3.1 - version: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0) + version: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3) defu: specifier: ^6.1.4 version: 6.1.4 @@ -100,6 +100,9 @@ importers: md5: specifier: ^2.3.0 version: 2.3.0 + mysql2: + specifier: ^3.11.4 + version: 3.14.3 ofetch: specifier: ^1.4.1 version: 1.4.1 @@ -112,6 +115,9 @@ importers: react: specifier: ^19 version: 19.1.0 + react-device-detect: + specifier: ^2.2.3 + version: 2.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0) react-dom: specifier: ^19.0.0 version: 19.1.0(react@19.1.0) @@ -232,7 +238,7 @@ importers: version: 0.21.2(vite@6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1))(workbox-build@7.3.0(@types/babel__core@7.20.5))(workbox-window@7.3.0) vite-plugin-with-nitro: specifier: 0.0.3 - version: 0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(vite@6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1)) + version: 0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3)(vite@6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1)) vitest: specifier: ^3.0.7 version: 3.1.3(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1) @@ -1310,79 +1316,67 @@ packages: resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-arm@1.0.5': resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-s390x@1.0.4': resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-x64@1.0.4': resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.0.4': resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.0.4': resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-linux-arm64@0.33.5': resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-linux-arm@0.33.5': resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-linux-s390x@0.33.5': resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-linux-x64@0.33.5': resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-linuxmusl-arm64@0.33.5': resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-linuxmusl-x64@0.33.5': resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-wasm32@0.33.5': resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} @@ -1442,6 +1436,16 @@ packages: '@libsql/core@0.15.4': resolution: {integrity: sha512-NMvh6xnn3vrcd7DNehj0HiJcRWB2a8hHhJUTkOBej3Pf3KB21HOmdOUjXxJ5pGbjWXh4ezQBmHtF5ozFhocXaA==} + '@libsql/darwin-arm64@0.5.9': + resolution: {integrity: sha512-gxvDYfp54CmsjfJ6o3XFyRS+FEikrDMiPwTD0eKUJHdwfMlO//C/TTr5gcLB7LHAaknaxS8w4XEMrL/MP2UQ7A==} + cpu: [arm64] + os: [darwin] + + '@libsql/darwin-x64@0.5.9': + resolution: {integrity: sha512-bOy7R9xVlSsvEfNLGXnqu0TcFiO/r9c1+7jw1asZCtstf01H+LDyi4p9MsGIuiwZXwFiO5zd8N4r6QQjZmq+Jg==} + cpu: [x64] + os: [darwin] + '@libsql/hrana-client@0.7.0': resolution: {integrity: sha512-OF8fFQSkbL7vJY9rfuegK1R7sPgQ6kFMkDamiEccNUvieQ+3urzfDFI616oPl8V7T9zRmnTkSjMOImYCAVRVuw==} @@ -1462,6 +1466,31 @@ packages: cpu: [arm] os: [linux] + '@libsql/linux-arm64-gnu@0.5.9': + resolution: {integrity: sha512-l8GhvzCXL23yLa7TfEz9Q5Pvjf/hxVosntEp2kzdhEfZ5ikmCf9C/Qrelv55LHIuFlJqv3cFkJoo5q+0DG1PYg==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-arm64-musl@0.5.9': + resolution: {integrity: sha512-DlMU/yuahOc8digrZgsKHqf4DxpCaX8Ri+PO/wC+CVZ6OsXEnvr11oamDokMDTMcajixf79c4b3/P0tK3xaxLw==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-x64-gnu@0.5.9': + resolution: {integrity: sha512-RG7c8qCmTSVjbsiRSfEVVk2vstsw65Q8Sjtsbet5W5ORe2fmCYnrXfaDxEIm824bhTFeQDiTNdBSKTRtjWnAVw==} + cpu: [x64] + os: [linux] + + '@libsql/linux-x64-musl@0.5.9': + resolution: {integrity: sha512-omyqxkFA7m9lhiYkWWiZSpMcR0Fnb5xJH3TsYH7PeFrTzl85DgiGlvUBbpzZw/R6WKE4iCywWlnSr4q0W6NsJg==} + cpu: [x64] + os: [linux] + + '@libsql/win32-x64-msvc@0.5.9': + resolution: {integrity: sha512-wQniH0FbqlLAFKlgTG4ThD6v49S08VApLMTZxXr4a1vELgaiVI/nFwPm5LrSHkoMSXU9nxOZZA+momso9pgZtg==} + cpu: [x64] + os: [win32] + '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true @@ -1516,28 +1545,24 @@ packages: engines: {node: '>= 10.0'} cpu: [arm64] os: [linux] - libc: [glibc] '@napi-rs/pinyin-linux-arm64-musl@1.7.5': resolution: {integrity: sha512-aK2VLMjde8/1AkoH+BqQ94r3w8YVdTCl5hJLI05GhhrNSz62ScrgPAsKNJmD9+8dcfexTdl/ORedAnenodnPzA==} engines: {node: '>= 10.0'} cpu: [arm64] os: [linux] - libc: [musl] '@napi-rs/pinyin-linux-x64-gnu@1.7.5': resolution: {integrity: sha512-duTEnMo2m9H8AyQY32bM0OrLvZ14na6AH1DAD7/e3HX/TGow9p3LF1v4b8IlGeLZFZRyTdkWX6olHkolQ9fQkA==} engines: {node: '>= 10.0'} cpu: [x64] os: [linux] - libc: [glibc] '@napi-rs/pinyin-linux-x64-musl@1.7.5': resolution: {integrity: sha512-aZhzqTZh3VFwy5rs0LFEtpyqKwWZMWxrRYJk5awbwJg+nu4rSrFtv/9QbmfFhY5vJT2rc4ICabyxmSHngiNKog==} engines: {node: '>= 10.0'} cpu: [x64] os: [linux] - libc: [musl] '@napi-rs/pinyin-win32-arm64-msvc@1.7.5': resolution: {integrity: sha512-qMlqDnRXM/dzt3KQKntZ53ea3E0vVXMWOp8EmyQaXhppkaPUBurCKsEYVNu4tO3R9LWFv6crT02bs7uTu1eUHw==} @@ -1692,42 +1717,36 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.1': resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] - libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [musl] '@parcel/watcher-wasm@2.5.1': resolution: {integrity: sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw==} @@ -2091,67 +2110,56 @@ packages: resolution: {integrity: sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.40.2': resolution: {integrity: sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.40.2': resolution: {integrity: sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.40.2': resolution: {integrity: sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.40.2': resolution: {integrity: sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.40.2': resolution: {integrity: sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.40.2': resolution: {integrity: sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.40.2': resolution: {integrity: sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.40.2': resolution: {integrity: sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.40.2': resolution: {integrity: sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.40.2': resolution: {integrity: sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.40.2': resolution: {integrity: sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==} @@ -2218,28 +2226,24 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [glibc] '@swc/core-linux-arm64-musl@1.11.24': resolution: {integrity: sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [musl] '@swc/core-linux-x64-gnu@1.11.24': resolution: {integrity: sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [glibc] '@swc/core-linux-x64-musl@1.11.24': resolution: {integrity: sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@swc/core-win32-arm64-msvc@1.11.24': resolution: {integrity: sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ==} @@ -2629,49 +2633,41 @@ packages: resolution: {integrity: sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==} cpu: [arm64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.7.2': resolution: {integrity: sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==} cpu: [arm64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.7.2': resolution: {integrity: sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.7.2': resolution: {integrity: sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==} cpu: [riscv64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.7.2': resolution: {integrity: sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==} cpu: [riscv64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.7.2': resolution: {integrity: sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==} cpu: [s390x] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.7.2': resolution: {integrity: sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==} cpu: [x64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.7.2': resolution: {integrity: sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==} cpu: [x64] os: [linux] - libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.7.2': resolution: {integrity: sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==} @@ -2978,6 +2974,10 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + aws-ssl-profiles@1.1.2: + resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} + engines: {node: '>= 6.0.0'} + b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} @@ -3377,6 +3377,9 @@ packages: crossws@0.3.4: resolution: {integrity: sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==} + crossws@0.3.5: + resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} + crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} @@ -4271,6 +4274,9 @@ packages: engines: {node: '>=10'} deprecated: This package is no longer supported. + generate-function@2.3.1: + resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -4418,8 +4424,8 @@ packages: resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - h3-nightly@1.15.2-20250418-133010-0c9b276: - resolution: {integrity: sha512-s7CE2w7A7EqAdC/0WIAbNDAuvZB3afNCLXyv3Yvflcih3uKki4mRXMuw1Mq4bvykh0uJfAPZTF1GpOeca4xQ6A==} + h3-nightly@1.15.4-20250730-094032-325a62b: + resolution: {integrity: sha512-t4KAYi8qaq0urEq0YW/rSa1rcfLsi4hs+d5cQKvQ0IiXDbZwE5lvgRoYjlK3J87bXllQAjEO5+7hlA6Td915+w==} h3@1.15.3: resolution: {integrity: sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ==} @@ -4710,6 +4716,9 @@ packages: is-promise@4.0.0: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} @@ -4953,6 +4962,7 @@ packages: libsql@0.5.9: resolution: {integrity: sha512-FzhiExE9uiMAOa8kmiUzsIOsIwv+YiMzaEFXEq26OSpdSJREOEa13XT/N2NzJkMFOROKN+z4IBkNrcp1oQAjpQ==} + cpu: [x64, arm64, wasm32, arm] os: [darwin, linux, win32] lilconfig@3.1.3: @@ -5036,6 +5046,9 @@ packages: resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} engines: {node: '>= 12.0.0'} + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + loupe@3.1.3: resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} @@ -5045,6 +5058,14 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + lru.min@1.1.2: + resolution: {integrity: sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} + luxon@3.6.1: resolution: {integrity: sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==} engines: {node: '>=12'} @@ -5228,6 +5249,14 @@ packages: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true + mysql2@3.14.3: + resolution: {integrity: sha512-fD6MLV8XJ1KiNFIF0bS7Msl8eZyhlTDCDl75ajU5SJtpdx9ZPEACulJcqJWr1Y8OYyxsFc4j3+nflpmhxCU5aQ==} + engines: {node: '>= 8.0'} + + named-placeholders@1.1.3: + resolution: {integrity: sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==} + engines: {node: '>=12.0.0'} + nano-css@5.6.2: resolution: {integrity: sha512-+6bHaC8dSDGALM1HJjOHVXpuastdu2xFoZlC77Jh4cg+33Zcgm+Gxd+1xsnpZK14eyHObSp82+ll5y3SX75liw==} peerDependencies: @@ -5318,6 +5347,9 @@ packages: node-mock-http@1.0.0: resolution: {integrity: sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==} + node-mock-http@1.0.2: + resolution: {integrity: sha512-zWaamgDUdo9SSLw47we78+zYw/bDr5gH8pH7oRRs8V3KmBtu8GLgGIbV2p/gRPd3LWpEOpjQj7X1FOU3VFMJ8g==} + node-releases@2.0.19: resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} @@ -5731,6 +5763,12 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true + react-device-detect@2.2.3: + resolution: {integrity: sha512-buYY3qrCnQVlIFHrC5UcUoAj7iANs/+srdkwsnNjI7anr3Tt7UY6MqNxtMLlr0tMBied0O49UZVK8XKs3ZIiPw==} + peerDependencies: + react: ^19 + react-dom: '>= 0.14.0' + react-dom@19.1.0: resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} peerDependencies: @@ -6015,6 +6053,9 @@ packages: resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} engines: {node: '>= 18'} + seq-queue@0.0.5: + resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} + serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -6183,6 +6224,10 @@ packages: spdx-license-ids@3.0.21: resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} + sqlstring@2.3.3: + resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} + engines: {node: '>= 0.6'} + stable-hash@0.0.5: resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==} @@ -6538,6 +6583,10 @@ packages: engines: {node: '>=14.17'} hasBin: true + ua-parser-js@1.0.40: + resolution: {integrity: sha512-z6PJ8Lml+v3ichVojCiB8toQJBuwR42ySM4ezjXIqXK3M0HczmKQ3LF4rhU55PfD99KEEXQG6yb7iOMyvYuHew==} + hasBin: true + ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} @@ -8371,6 +8420,12 @@ snapshots: js-base64: 3.7.7 optional: true + '@libsql/darwin-arm64@0.5.9': + optional: true + + '@libsql/darwin-x64@0.5.9': + optional: true + '@libsql/hrana-client@0.7.0': dependencies: '@libsql/isomorphic-fetch': 0.3.1 @@ -8400,6 +8455,21 @@ snapshots: '@libsql/linux-arm-musleabihf@0.5.9': optional: true + '@libsql/linux-arm64-gnu@0.5.9': + optional: true + + '@libsql/linux-arm64-musl@0.5.9': + optional: true + + '@libsql/linux-x64-gnu@0.5.9': + optional: true + + '@libsql/linux-x64-musl@0.5.9': + optional: true + + '@libsql/win32-x64-msvc@0.5.9': + optional: true + '@mapbox/node-pre-gyp@1.0.11': dependencies: detect-libc: 2.0.4 @@ -10023,6 +10093,8 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 + aws-ssl-profiles@1.1.2: {} + b4a@1.6.7: {} babel-dead-code-elimination@1.0.10: @@ -10470,6 +10542,10 @@ snapshots: dependencies: uncrypto: 0.1.3 + crossws@0.3.5: + dependencies: + uncrypto: 0.1.3 + crypt@0.0.2: {} crypto-random-string@2.0.0: {} @@ -10526,10 +10602,11 @@ snapshots: dayjs@1.11.13(patch_hash=ab3d460b598ef9569bd8b88d40864d7b0e942a6d8b2e646643076a5c0477cc4d): {} - db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0): + db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3): optionalDependencies: '@libsql/client': 0.15.4 better-sqlite3: 11.10.0 + mysql2: 3.14.3 debug@3.2.7: dependencies: @@ -11600,6 +11677,10 @@ snapshots: strip-ansi: 6.0.1 wide-align: 1.1.5 + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + gensync@1.0.0-beta.2: {} get-amd-module-type@5.0.1: @@ -11765,14 +11846,14 @@ snapshots: dependencies: duplexer: 0.1.2 - h3-nightly@1.15.2-20250418-133010-0c9b276: + h3-nightly@1.15.4-20250730-094032-325a62b: dependencies: cookie-es: 1.2.2 - crossws: 0.3.4 + crossws: 0.3.5 defu: 6.1.4 destr: 2.0.5 iron-webcrypto: 1.2.1 - node-mock-http: 1.0.0 + node-mock-http: 1.0.2 radix3: 1.1.2 ufo: 1.6.1 uncrypto: 0.1.3 @@ -12053,6 +12134,8 @@ snapshots: is-promise@4.0.0: {} + is-property@1.0.2: {} + is-reference@1.2.1: dependencies: '@types/estree': 1.0.7 @@ -12251,8 +12334,15 @@ snapshots: '@neon-rs/load': 0.0.4 detect-libc: 2.0.2 optionalDependencies: + '@libsql/darwin-arm64': 0.5.9 + '@libsql/darwin-x64': 0.5.9 '@libsql/linux-arm-gnueabihf': 0.5.9 '@libsql/linux-arm-musleabihf': 0.5.9 + '@libsql/linux-arm64-gnu': 0.5.9 + '@libsql/linux-arm64-musl': 0.5.9 + '@libsql/linux-x64-gnu': 0.5.9 + '@libsql/linux-x64-musl': 0.5.9 + '@libsql/win32-x64-msvc': 0.5.9 optional: true lilconfig@3.1.3: {} @@ -12281,7 +12371,7 @@ snapshots: citty: 0.1.6 clipboardy: 4.0.0 consola: 3.4.2 - crossws: 0.3.4 + crossws: 0.3.5 defu: 6.1.4 get-port-please: 3.1.2 h3: 1.15.3 @@ -12366,6 +12456,8 @@ snapshots: safe-stable-stringify: 2.5.0 triple-beam: 1.4.1 + long@5.3.2: {} + loupe@3.1.3: {} lru-cache@10.4.3: {} @@ -12374,6 +12466,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@7.18.3: {} + + lru.min@1.1.2: {} + luxon@3.6.1: {} magic-string@0.25.9: @@ -12546,6 +12642,22 @@ snapshots: mustache@4.2.0: {} + mysql2@3.14.3: + dependencies: + aws-ssl-profiles: 1.1.2 + denque: 2.1.0 + generate-function: 2.3.1 + iconv-lite: 0.6.3 + long: 5.3.2 + lru.min: 1.1.2 + named-placeholders: 1.1.3 + seq-queue: 0.0.5 + sqlstring: 2.3.3 + + named-placeholders@1.1.3: + dependencies: + lru-cache: 7.18.3 + nano-css@5.6.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -12584,7 +12696,7 @@ snapshots: p-wait-for: 5.0.2 qs: 6.14.0 - nitro-go@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0): + nitro-go@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3): dependencies: '@cloudflare/kv-asset-handler': 0.4.0 '@netlify/functions': 3.1.8(rollup@4.40.2) @@ -12605,8 +12717,8 @@ snapshots: consola: 3.4.2 cookie-es: 2.0.0 croner: 9.0.0 - crossws: 0.3.4 - db0: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0) + crossws: 0.3.5 + db0: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3) defu: 6.1.4 destr: 2.0.5 dot-prop: 9.0.0 @@ -12629,7 +12741,7 @@ snapshots: mime: 4.0.7 mlly: 1.7.4 node-fetch-native: 1.6.6 - node-mock-http: 1.0.0 + node-mock-http: 1.0.2 ofetch: 1.4.1 ohash: 2.0.11 pathe: 2.0.3 @@ -12652,7 +12764,7 @@ snapshots: unenv: 2.0.0-rc.15 unimport: 5.0.1 unplugin-utils: 0.2.4 - unstorage: 1.16.0(db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0))(ioredis@5.6.1) + unstorage: 1.16.0(db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3))(ioredis@5.6.1) untyped: 2.0.0 unwasm: 0.3.9 youch: 4.1.0-beta.7 @@ -12710,6 +12822,8 @@ snapshots: node-mock-http@1.0.0: {} + node-mock-http@1.0.2: {} + node-releases@2.0.19: {} node-source-walk@6.0.2: @@ -13137,6 +13251,12 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 + react-device-detect@2.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + dependencies: + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + ua-parser-js: 1.0.40 + react-dom@19.1.0(react@19.1.0): dependencies: react: 19.1.0 @@ -13479,6 +13599,8 @@ snapshots: transitivePeerDependencies: - supports-color + seq-queue@0.0.5: {} + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 @@ -13681,6 +13803,8 @@ snapshots: spdx-license-ids@3.0.21: {} + sqlstring@2.3.3: {} + stable-hash@0.0.5: {} stack-generator@2.0.10: @@ -14058,6 +14182,8 @@ snapshots: typescript@5.8.3: {} + ua-parser-js@1.0.40: {} + ufo@1.6.1: {} ultrahtml@1.6.0: {} @@ -14233,7 +14359,7 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.7.2 '@unrs/resolver-binding-win32-x64-msvc': 1.7.2 - unstorage@1.16.0(db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0))(ioredis@5.6.1): + unstorage@1.16.0(db0@0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3))(ioredis@5.6.1): dependencies: anymatch: 3.1.3 chokidar: 4.0.3 @@ -14244,7 +14370,7 @@ snapshots: ofetch: 1.4.1 ufo: 1.6.1 optionalDependencies: - db0: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0) + db0: 0.3.2(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3) ioredis: 5.6.1 untun@0.1.3: @@ -14350,12 +14476,12 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-with-nitro@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(vite@6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1)): + vite-plugin-with-nitro@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3)(vite@6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1)): dependencies: consola: 3.4.2 defu: 6.1.4 - h3: h3-nightly@1.15.2-20250418-133010-0c9b276 - nitropack: nitro-go@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0) + h3: h3-nightly@1.15.4-20250730-094032-325a62b + nitropack: nitro-go@0.0.3(@libsql/client@0.15.4)(better-sqlite3@11.10.0)(mysql2@3.14.3) vite: 6.3.5(@types/node@22.15.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1) transitivePeerDependencies: - '@azure/app-configuration' diff --git a/shared/pinyin.json b/shared/pinyin.json index 36b472c..4d0de50 100644 --- a/shared/pinyin.json +++ b/shared/pinyin.json @@ -5,9 +5,9 @@ "zaobao": "lianhezaobao", "coolapk": "kuan-jinrizuire", "mktnews-flash": "MKTNews-kuaixun", - "wallstreetcn-quick": "huaerjiejianwen-shishikuaixun", - "wallstreetcn-news": "huaerjiejianwen-zuixinzixun", - "wallstreetcn-hot": "huaerjiejianwen-zuirewenzhang", + "wallstreetcn-quick": "huaerjiejianwen-kuaixun", + "wallstreetcn-news": "huaerjiejianwen-zuixin", + "wallstreetcn-hot": "huaerjiejianwen-zuire", "36kr-quick": "36ke-kuaixun", "douyin": "douyin", "hupu": "hupu-zhugandaoretie", @@ -17,7 +17,7 @@ "thepaper": "pengpaixinwen-rebang", "sputniknewscn": "weixingtongxunshe", "cankaoxiaoxi": "cankaoxiaoxi", - "pcbeta-windows11": "yuanjingluntan-Windows 11", + "pcbeta-windows11": "yuanjingluntan-Win11", "cls-telegraph": "cailianshe-dianbao", "cls-depth": "cailianshe-shendu", "cls-hot": "cailianshe-remen", diff --git a/shared/pre-sources.ts b/shared/pre-sources.ts index cf50665..24229c2 100644 --- a/shared/pre-sources.ts +++ b/shared/pre-sources.ts @@ -78,14 +78,14 @@ export const originSources = { quick: { type: "realtime", interval: Time.Fast, - title: "实时快讯", + title: "快讯", }, news: { - title: "最新资讯", + title: "最新", interval: Time.Common, }, hot: { - title: "最热文章", + title: "最热", type: "hottest", interval: Time.Common, }, @@ -171,7 +171,7 @@ export const originSources = { home: "https://bbs.pcbeta.com", sub: { windows11: { - title: "Windows 11", + title: "Win11", type: "realtime", interval: Time.Fast, }, diff --git a/shared/sources.json b/shared/sources.json index d34fb31..41e1a71 100644 --- a/shared/sources.json +++ b/shared/sources.json @@ -76,7 +76,7 @@ "home": "https://wallstreetcn.com/", "color": "blue", "interval": 300000, - "title": "实时快讯" + "title": "快讯" }, "wallstreetcn-quick": { "name": "华尔街见闻", @@ -85,7 +85,7 @@ "home": "https://wallstreetcn.com/", "color": "blue", "interval": 300000, - "title": "实时快讯" + "title": "快讯" }, "wallstreetcn-news": { "name": "华尔街见闻", @@ -93,7 +93,7 @@ "home": "https://wallstreetcn.com/", "color": "blue", "interval": 1800000, - "title": "最新资讯" + "title": "最新" }, "wallstreetcn-hot": { "name": "华尔街见闻", @@ -102,7 +102,7 @@ "home": "https://wallstreetcn.com/", "color": "blue", "interval": 1800000, - "title": "最热文章" + "title": "最热" }, "36kr": { "redirect": "36kr-quick", @@ -198,7 +198,7 @@ "home": "https://bbs.pcbeta.com", "color": "blue", "interval": 300000, - "title": "Windows 11" + "title": "Win11" }, "pcbeta-windows11": { "name": "远景论坛", @@ -207,7 +207,7 @@ "home": "https://bbs.pcbeta.com", "color": "blue", "interval": 300000, - "title": "Windows 11" + "title": "Win11" }, "cls": { "redirect": "cls-telegraph", diff --git a/src/components/column/dnd.tsx b/src/components/column/dnd.tsx index d12f777..563f1f3 100644 --- a/src/components/column/dnd.tsx +++ b/src/components/column/dnd.tsx @@ -8,8 +8,10 @@ import { useThrottleFn } from "ahooks" import { useAutoAnimate } from "@formkit/auto-animate/react" import { motion } from "framer-motion" import { useWindowSize } from "react-use" +import { isMobile } from "react-device-detect" import { DndContext } from "../common/dnd" import { useSortable } from "../common/dnd/useSortable" +import { OverlayScrollbar } from "../common/overlay-scrollbar" import type { ItemsProps } from "./card" import { CardWrapper } from "./card" import { currentSourcesAtom } from "~/atoms" @@ -26,58 +28,74 @@ export function Dnd() { return Math.min(width - 32, WIDTH) }, [width]) + if (!items.length) return null + return ( - - + + - {items.map(id => ( - - - - ))} - + }, + }} + > + {items.map((id, index) => ( + WIDTH ? WIDTH : width - 16}px` } : undefined} + transition={{ + type: "tween", + duration: AnimationDuration / 1000, + }} + variants={{ + hidden: { + y: 20, + opacity: 0, + }, + visible: { + y: 0, + opacity: 1, + }, + }} + > + + + ))} + + +
+ 左右滑动查看更多 +
) } -function DndWrapper({ items, setItems, children }: PropsWithChildren<{ +function DndWrapper({ items, setItems, isSingleColumn, children }: PropsWithChildren<{ items: SourceID[] setItems: (items: SourceID[]) => void + isSingleColumn: boolean }>) { const onDropTargetChange = useCallback(({ location, source }: BaseEventPayload) => { const traget = location.current.dropTargets[0] @@ -91,10 +109,10 @@ function DndWrapper({ items, setItems, children }: PropsWithChildren<{ startIndex: fromIndex, indexOfTarget: toIndex, closestEdgeOfTarget, - axis: "vertical", + axis: isSingleColumn ? "horizontal" : "vertical", }) setItems(update) - }, [items, setItems]) + }, [items, setItems, isSingleColumn]) // 避免动画干扰 const { run } = useThrottleFn(onDropTargetChange, { leading: true, diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index f228857..280f21c 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -4,6 +4,7 @@ import { Outlet, createRootRouteWithContext } from "@tanstack/react-router" import { TanStackRouterDevtools } from "@tanstack/router-devtools" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import type { QueryClient } from "@tanstack/react-query" +import { isMobile } from "react-device-detect" import { Header } from "~/components/header" import { GlobalOverlayScrollbar } from "~/components/common/overlay-scrollbar" import { Footer } from "~/components/footer" @@ -30,11 +31,13 @@ function RootComponent() { usePWA() return ( <> -