diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1bbfc9e..805c77b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,7 +58,7 @@ version: 4.0.6(mobx@6.12.0)(react-dom@18.2.0)(react@18.2.0) next: specifier: ^14.1.3 - version: 14.1.3(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + version: 14.1.3(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) next-intl: specifier: ^3.9.5 version: 3.9.5(next@14.1.3)(react@18.2.0) @@ -83,9 +83,6 @@ sharp: specifier: ^0.33.2 version: 0.33.2 - sprintf-js: - specifier: ^1.1.3 - version: 1.1.3 sweetalert2: specifier: ^11.10.6 version: 11.10.6 @@ -114,9 +111,6 @@ '@types/react-router-dom': specifier: ^5.3.3 version: 5.3.3 - '@types/sprintf-js': - specifier: ^1.1.4 - version: 1.1.4 eslint-config-next: specifier: ^14.1.3 version: 14.1.3(eslint@8.57.0)(typescript@5.4.2) @@ -141,15 +135,21 @@ dompurify: specifier: ^3.0.9 version: 3.0.9 - i18next: - specifier: ^23.10.1 - version: 23.10.1 + isomorphic-dompurify: + specifier: ^2.4.0 + version: 2.4.0 mobx: specifier: ^6.12.0 version: 6.12.0 mobx-react-lite: specifier: ^4.0.6 version: 4.0.6(mobx@6.12.0)(react-dom@18.2.0)(react@18.2.0) + next: + specifier: ^14.1.3 + version: 14.1.3(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + next-intl: + specifier: ^3.9.5 + version: 3.9.5(next@14.1.3)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -162,15 +162,9 @@ react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) - react-i18next: - specifier: ^14.1.0 - version: 14.1.0(i18next@23.10.1)(react-dom@18.2.0)(react@18.2.0) react-infinite-scroll-component: specifier: ^6.1.0 version: 6.1.0(react@18.2.0) - react-router-dom: - specifier: ^6.22.3 - version: 6.22.3(react-dom@18.2.0)(react@18.2.0) react-scripts: specifier: 5.0.1 version: 5.0.1(@babel/plugin-syntax-flow@7.23.3)(@babel/plugin-transform-react-jsx@7.23.4)(eslint@8.57.0)(react@18.2.0)(sass@1.72.0)(typescript@5.4.2) @@ -217,9 +211,9 @@ '@types/sprintf-js': specifier: ^1.1.4 version: 1.1.4 - http-proxy-middleware: - specifier: ^2.0.6 - version: 2.0.6(@types/express@4.17.17) + eslint-config-next: + specifier: ^14.1.3 + version: 14.1.3(eslint@8.57.0)(typescript@5.4.2) typescript: specifier: ^5.4.2 version: 5.4.2 @@ -243,7 +237,7 @@ version: 14.1.3(eslint@8.57.0)(typescript@5.4.2) next: specifier: ^14.1.3 - version: 14.1.3(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + version: 14.1.3(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) next-intl: specifier: ^3.9.5 version: 3.9.5(next@14.1.3)(react@18.2.0) @@ -335,7 +329,6 @@ dependencies: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 - dev: false /@apideck/better-ajv-errors@0.3.6(ajv@8.12.0): resolution: {integrity: sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==} @@ -358,7 +351,6 @@ /@babel/compat-data@7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} - dev: false /@babel/core@7.22.9: resolution: {integrity: sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==} @@ -381,7 +373,6 @@ semver: 6.3.1 transitivePeerDependencies: - supports-color - dev: false /@babel/eslint-parser@7.22.9(@babel/core@7.22.9)(eslint@8.57.0): resolution: {integrity: sha512-xdMkt39/nviO/4vpVdrEYPwXCsYIXSSAr6mC7WQsNIlGnuxKyKE7GZjalcnbSWiC4OXGNNN3UQPeHfjSC6sTDA==} @@ -405,7 +396,6 @@ '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 jsesc: 2.5.2 - dev: false /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} @@ -433,7 +423,6 @@ browserslist: 4.21.9 lru-cache: 5.1.1 semver: 6.3.1 - dev: false /@babel/helper-create-class-features-plugin@7.22.9(@babel/core@7.22.9): resolution: {integrity: sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ==} @@ -483,7 +472,6 @@ /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-function-name@7.22.5: resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} @@ -491,14 +479,12 @@ dependencies: '@babel/template': 7.22.5 '@babel/types': 7.22.5 - dev: false /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-member-expression-to-functions@7.22.5: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} @@ -519,7 +505,6 @@ engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} @@ -533,7 +518,6 @@ '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.5 - dev: false /@babel/helper-optimise-call-expression@7.22.5: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} @@ -576,7 +560,6 @@ engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} @@ -590,12 +573,10 @@ engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-string-parser@7.23.4: resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} @@ -614,7 +595,6 @@ /@babel/helper-validator-option@7.22.5: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-wrap-function@7.22.9: resolution: {integrity: sha512-sZ+QzfauuUEfxSEjKFmi3qDSHgLsTPK/pEpoD/qonZKOtTPTLbf59oabPQ4rKekt9lFcj/hTZaOhWwFYrgjk+Q==} @@ -634,7 +614,6 @@ '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color - dev: false /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} @@ -650,7 +629,6 @@ hasBin: true dependencies: '@babel/types': 7.22.5 - dev: false /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.9): resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} @@ -1821,7 +1799,6 @@ '@babel/code-frame': 7.22.5 '@babel/parser': 7.22.7 '@babel/types': 7.22.5 - dev: false /@babel/traverse@7.22.8: resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} @@ -1839,7 +1816,6 @@ globals: 11.12.0 transitivePeerDependencies: - supports-color - dev: false /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} @@ -1848,7 +1824,6 @@ '@babel/helper-string-parser': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 to-fast-properties: 2.0.0 - dev: false /@babel/types@7.23.9: resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==} @@ -2829,17 +2804,14 @@ '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/trace-mapping': 0.3.18 - dev: false /@jridgewell/resolve-uri@3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} - dev: false /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} - dev: false /@jridgewell/source-map@0.3.5: resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} @@ -2850,18 +2822,15 @@ /@jridgewell/sourcemap-codec@1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: false /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: false /@jridgewell/trace-mapping@0.3.18: resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 - dev: false /@kurkle/color@0.3.2: resolution: {integrity: sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==} @@ -3032,11 +3001,6 @@ resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false - /@remix-run/router@1.15.3: - resolution: {integrity: sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==} - engines: {node: '>=14.0.0'} - dev: false - /@rollup/plugin-babel@5.3.1(@babel/core@7.22.9)(rollup@2.79.1): resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -3564,6 +3528,7 @@ resolution: {integrity: sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==} dependencies: '@types/node': 20.11.27 + dev: false /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} @@ -4738,7 +4703,6 @@ electron-to-chromium: 1.4.461 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.9) - dev: false /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -4832,7 +4796,6 @@ /caniuse-lite@1.0.30001516: resolution: {integrity: sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==} - dev: false /caniuse-lite@1.0.30001597: resolution: {integrity: sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==} @@ -5130,7 +5093,6 @@ /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - dev: false /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} @@ -5804,7 +5766,6 @@ /electron-to-chromium@1.4.461: resolution: {integrity: sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ==} - dev: false /emittery@0.10.2: resolution: {integrity: sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==} @@ -6102,8 +6063,8 @@ '@rushstack/eslint-patch': 1.7.2 '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.57.0) eslint-plugin-react: 7.34.0(eslint@8.57.0) @@ -6157,6 +6118,7 @@ resolve: 1.22.2 transitivePeerDependencies: - supports-color + dev: false /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -6178,6 +6140,29 @@ enhanced-resolve: 5.15.0 eslint: 8.57.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.3 + is-core-module: 2.12.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + dev: false + + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '*' + eslint-plugin-import: '*' + dependencies: + debug: 4.3.4(supports-color@5.5.0) + enhanced-resolve: 5.15.0 + eslint: 8.57.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.3 @@ -6217,6 +6202,7 @@ eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color + dev: false /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} @@ -6243,7 +6229,7 @@ debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -6329,6 +6315,40 @@ - eslint-import-resolver-webpack - supports-color + /eslint-plugin-import@2.29.1(eslint@8.57.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + array-includes: 3.1.7 + array.prototype.findlastindex: 1.2.4 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + hasown: 2.0.1 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.7 + object.groupby: 1.0.2 + object.values: 1.1.7 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: false + /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.57.0)(jest@27.5.1)(typescript@5.4.2): resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -6587,6 +6607,7 @@ /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + dev: false /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} @@ -6833,6 +6854,7 @@ peerDependenciesMeta: debug: optional: true + dev: false /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -6982,7 +7004,6 @@ /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} - dev: false /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} @@ -7108,7 +7129,6 @@ /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - dev: false /globals@13.20.0: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} @@ -7285,12 +7305,6 @@ terser: 5.19.0 dev: false - /html-parse-stringify@3.0.1: - resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==} - dependencies: - void-elements: 3.1.0 - dev: false - /html-webpack-plugin@5.5.3(webpack@5.88.1): resolution: {integrity: sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==} engines: {node: '>=10.13.0'} @@ -7409,6 +7423,7 @@ micromatch: 4.0.5 transitivePeerDependencies: - debug + dev: false /http-proxy@1.18.1: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} @@ -7419,6 +7434,7 @@ requires-port: 1.0.0 transitivePeerDependencies: - debug + dev: false /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} @@ -7445,12 +7461,6 @@ engines: {node: '>=10.17.0'} dev: false - /i18next@23.10.1: - resolution: {integrity: sha512-NDiIzFbcs3O9PXpfhkjyf7WdqFn5Vq6mhzhtkXzj51aOcNuPNcTwuYNuXCpHsanZGHlHKL35G7huoFeVic1hng==} - dependencies: - '@babel/runtime': 7.23.9 - dev: false - /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -7719,6 +7729,7 @@ /is-plain-obj@3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} + dev: false /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -8626,7 +8637,6 @@ resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true - dev: false /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -8656,7 +8666,6 @@ resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - dev: false /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -8909,7 +8918,6 @@ resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 - dev: false /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -9143,11 +9151,11 @@ dependencies: '@formatjs/intl-localematcher': 0.2.32 negotiator: 0.6.3 - next: 14.1.3(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) + next: 14.1.3(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0) react: 18.2.0 use-intl: 3.9.5(react@18.2.0) - /next@14.1.3(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0): + /next@14.1.3(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0): resolution: {integrity: sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==} engines: {node: '>=18.17.0'} hasBin: true @@ -9171,7 +9179,7 @@ react: 18.2.0 react-dom: 18.2.0(react@18.2.0) sass: 1.72.0 - styled-jsx: 5.1.1(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.22.9)(react@18.2.0) optionalDependencies: '@next/swc-darwin-arm64': 14.1.3 '@next/swc-darwin-x64': 14.1.3 @@ -9204,7 +9212,6 @@ /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} - dev: false /nodemon@3.1.0: resolution: {integrity: sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==} @@ -10661,26 +10668,6 @@ resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} dev: false - /react-i18next@14.1.0(i18next@23.10.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-3KwX6LHpbvGQ+sBEntjV4sYW3Zovjjl3fpoHbUwSgFHf0uRBcbeCBLR5al6ikncI5+W0EFb71QXZmfop+J6NrQ==} - peerDependencies: - i18next: '>= 23.2.3' - react: '>= 16.8.0' - react-dom: '*' - react-native: '*' - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - dependencies: - '@babel/runtime': 7.23.9 - html-parse-stringify: 3.0.1 - i18next: 23.10.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /react-infinite-scroll-component@6.1.0(react@18.2.0): resolution: {integrity: sha512-SQu5nCqy8DxQWpnUVLx7V7b7LcA37aM7tvoWjTLZp1dk6EJibM5/4EJKzOnl07/BsM1Y40sKLuqjCwwH/xV0TQ==} peerDependencies: @@ -10719,29 +10706,6 @@ engines: {node: '>=0.10.0'} dev: false - /react-router-dom@6.22.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==} - engines: {node: '>=14.0.0'} - peerDependencies: - react: '>=16.8' - react-dom: '>=16.8' - dependencies: - '@remix-run/router': 1.15.3 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-router: 6.22.3(react@18.2.0) - dev: false - - /react-router@6.22.3(react@18.2.0): - resolution: {integrity: sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - react: '>=16.8' - dependencies: - '@remix-run/router': 1.15.3 - react: 18.2.0 - dev: false - /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.23.3)(@babel/plugin-transform-react-jsx@7.23.4)(eslint@8.57.0)(react@18.2.0)(sass@1.72.0)(typescript@5.4.2): resolution: {integrity: sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==} engines: {node: '>=14.0.0'} @@ -11053,6 +11017,7 @@ /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: false /resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} @@ -11858,7 +11823,7 @@ webpack: 5.88.1 dev: false - /styled-jsx@5.1.1(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.22.9)(react@18.2.0): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -11871,6 +11836,7 @@ babel-plugin-macros: optional: true dependencies: + '@babel/core': 7.22.9 client-only: 0.0.1 react: 18.2.0 @@ -12123,7 +12089,6 @@ /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} - dev: false /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} @@ -12424,7 +12389,6 @@ browserslist: 4.21.9 escalade: 3.1.1 picocolors: 1.0.0 - dev: false /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -12542,11 +12506,6 @@ engines: {node: '>= 0.8'} dev: false - /void-elements@3.1.0: - resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==} - engines: {node: '>=0.10.0'} - dev: false - /w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. @@ -13176,7 +13135,6 @@ /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: false /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} diff --git a/qwilight-fe/package.json b/qwilight-fe/package.json index 4f908a7..448ed13 100644 --- a/qwilight-fe/package.json +++ b/qwilight-fe/package.json @@ -29,7 +29,6 @@ "react-toastify": "^10.0.4", "reactstrap": "^9.2.2", "sharp": "^0.33.2", - "sprintf-js": "^1.1.3", "sweetalert2": "^11.10.6", "taehui-ts": "workspace:^" }, @@ -41,7 +40,6 @@ "@types/react": "^18.2.65", "@types/react-dom": "^18.2.22", "@types/react-router-dom": "^5.3.3", - "@types/sprintf-js": "^1.1.4", "eslint-config-next": "^14.1.3", "typescript": "^5.4.2" } diff --git a/qwilight-fe/qwilight-fe.cmd b/qwilight-fe/qwilight-fe.cmd index 2bf4708..d120004 100644 --- a/qwilight-fe/qwilight-fe.cmd +++ b/qwilight-fe/qwilight-fe.cmd @@ -1,6 +1,6 @@ @ECHO OFF -Robocopy build \\taehui\taehui\qwilight-fe /MIR -wsl ssh taehui@taehui sudo rm -r /var/www/html/qwilight/static -wsl ssh taehui@taehui sudo cp -R qwilight-fe/* /var/www/html/qwilight +Robocopy . \\taehui\taehui\qwilight-fe /MIR +wsl ssh taehui@taehui sudo rm -r /var/qwilight-fe +wsl ssh taehui@taehui sudo cp -R qwilight-fe/* /var/qwilight-fe wsl ssh taehui@taehui rm -r qwilight-fe diff --git "a/qwilight-fe/src/app/\133language\135/avatar/\133\133...want\135\135/page.tsx" "b/qwilight-fe/src/app/\133language\135/avatar/\133\133...want\135\135/page.tsx" new file mode 100644 index 0000000..a10f5ed --- /dev/null +++ "b/qwilight-fe/src/app/\133language\135/avatar/\133\133...want\135\135/page.tsx" @@ -0,0 +1,292 @@ +"use client"; + +import Loading from "@/app/[language]/avatar/loading"; +import AbilitiesView from "@/avatar/AbilitiesView"; +import DateView from "@/avatar/DateView"; +import FavoritesView from "@/avatar/FavoritesView"; +import IntroView from "@/avatar/IntroView"; +import LastsView from "@/avatar/LastsView"; +import QuitStatusValues from "@/avatar/QuitStatusValues"; +import useGetAvatar from "@/avatar/useGetAvatar"; +import WwwLevelsView from "@/avatar/WwwLevelsView"; +import AvatarDrawing from "@/AvatarDrawing"; +import AvatarTitle from "@/AvatarTitle"; +import { useAvatarStore, useSiteStore } from "@/Stores"; +import { getDefaultAvatarID } from "@/Utility"; +import { wwwAPI } from "@/Www"; +import { observer } from "mobx-react-lite"; +import { useTranslations } from "next-intl"; +import Image from "next/image"; +import { useEffect } from "react"; +import { + Button, + Col, + Input, + ListGroup, + ListGroupItem, + Nav, + NavItem, + NavLink, + Progress, + Row, + TabContent, + TabPane, +} from "reactstrap"; +import { useWant } from "taehui-ts/fe-utility"; + +export default observer(() => { + const { input, setInput, tabPosition, setTabPosition } = useAvatarStore(); + const { siteAvatarID, isSignedIn, setSignInOpened } = useSiteStore(); + + const { want, setWant } = useWant("/avatar"); + + const t = useTranslations(); + + useEffect(() => { + setInput(want); + }, [want, setInput]); + + const { isFetched: isAvatarLoaded, data: avatar } = useGetAvatar(); + + const onWant = () => { + setWant(input); + }; + + const getProperties = (i: number) => ({ + className: tabPosition === i ? "active route" : "route", + onClick: () => { + setTabPosition(i); + }, + }); + + return ( + <> + + + + + + { + setInput(value); + }} + onKeyDown={({ key }) => { + if (key === "Enter") { + onWant(); + } + }} + placeholder={t("wantAvatarAssist")} + /> + + + + + + + + + {want && !isAvatarLoaded && } + {isAvatarLoaded && + (Array.isArray(avatar) ? ( + + {avatar.map(({ avatarID, avatarName, avatarIntro }) => { + return ( + + { + setWant(`${encodeURIComponent("#")}${avatarID}`); + }} + > + + + + + + + {avatarName} ({avatarID}) + +
+ {avatarIntro} + +
+
+ ); + })} +
+ ) : ( + <> + + + + + + + + {avatar.avatarName} ({avatar.avatarID}) + +
+ + {t("totalCountText", { totalCount: avatar.totalCount })} + +
+ {avatar.totalLength} +
+ + {t("highestCountText", { highestCount: avatar.highestCount })} + +
+ {t("avatarDate", { date: avatar.date })} +
+ LV. {avatar.avatarLevels[0]} + +
+ + + + {avatar.avatarAbility5KPlace > 0 && ( + <> +
+ + #{avatar.avatarAbility5KPlaceText} + + /{avatar.avatarAbility5KCountText} +
+ {avatar.avatarAbility5KText} Point + + )} + + + + {avatar.avatarAbility7KPlace > 0 && ( + <> +
+ + #{avatar.avatarAbility7KPlace} + + /{avatar.avatarAbility7KCountText} +
+ {avatar.avatarAbility7KText} Point + + )} + + + + {avatar.avatarAbility9KPlace > 0 && ( + <> +
+ + #{avatar.avatarAbility9KPlace} + + /{avatar.avatarAbility9KCountText} +
+ {avatar.avatarAbility9KText} Point + + )} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + ))} + + ); +}); diff --git "a/qwilight-fe/src/app/\133language\135/avatar/page.module.scss" "b/qwilight-fe/src/app/\133language\135/avatar/page.module.scss" deleted file mode 100644 index 1073444..0000000 --- "a/qwilight-fe/src/app/\133language\135/avatar/page.module.scss" +++ /dev/null @@ -1,5 +0,0 @@ -img { - &.abilityClass { - height: 6rem; - } -} diff --git "a/qwilight-fe/src/app/\133language\135/avatar/page.tsx" "b/qwilight-fe/src/app/\133language\135/avatar/page.tsx" deleted file mode 100644 index 1fecd3b..0000000 --- "a/qwilight-fe/src/app/\133language\135/avatar/page.tsx" +++ /dev/null @@ -1,293 +0,0 @@ -"use client"; - -import Loading from "@/app/[language]/avatar/loading"; -import scss from "@/app/[language]/avatar/page.module.scss"; -import AbilitiesView from "@/avatar/AbilitiesView"; -import DateView from "@/avatar/DateView"; -import FavoritesView from "@/avatar/FavoritesView"; -import IntroView from "@/avatar/IntroView"; -import LastsView from "@/avatar/LastsView"; -import QuitStatusValues from "@/avatar/QuitStatusValues"; -import useGetAvatar from "@/avatar/useGetAvatar"; -import WwwLevelsView from "@/avatar/WwwLevelsView"; -import AvatarDrawing from "@/AvatarDrawing"; -import AvatarTitle from "@/AvatarTitle"; -import { useAvatarStore, useSiteStore } from "@/Stores"; -import { getDefaultAvatarID } from "@/Utility"; -import { wwwAPI } from "@/Www"; -import { observer } from "mobx-react-lite"; -import { useTranslations } from "next-intl"; -import Image from "next/image"; -import { useEffect } from "react"; -import { - Button, - Col, - Input, - ListGroup, - ListGroupItem, - Nav, - NavItem, - NavLink, - Progress, - Row, - TabContent, - TabPane, -} from "reactstrap"; -import { sprintf } from "sprintf-js"; -import { useWant } from "taehui-ts/fe-utility"; - -export default observer(() => { - const { input, setInput, tabPosition, setTabPosition } = useAvatarStore(); - const { siteAvatarID, isSignedIn, setSignInOpened } = useSiteStore(); - - const { want, setWant } = useWant("/avatar"); - - const t = useTranslations(); - - useEffect(() => { - setInput(want); - }, [want, setInput]); - - const { isFetched: isAvatarLoaded, data: avatar } = useGetAvatar(); - - const onWant = () => { - setWant(input); - }; - - const getProperties = (i: number) => ({ - className: tabPosition === i ? "active route" : "route", - onClick: () => { - setTabPosition(i); - }, - }); - - return ( - <> - - - - - - { - setInput(value); - }} - onKeyDown={({ key }) => { - if (key === "Enter") { - onWant(); - } - }} - placeholder={t("wantAvatarAssist")} - /> - - - - - - - - - {want && !isAvatarLoaded && } - {isAvatarLoaded && - (Array.isArray(avatar) ? ( - - {avatar.map(({ avatarID, avatarName, avatarIntro }) => { - return ( - - { - setWant(`${encodeURIComponent("#")}${avatarID}`); - }} - > - - - - - - - {avatarName} ({avatarID}) - -
- {avatarIntro} - -
-
- ); - })} -
- ) : ( - <> - - - - - - - - {avatar.avatarName} ({avatar.avatarID}) - -
- {sprintf(t("totalCountText"), avatar.totalCount)} -
- {avatar.totalLength} -
- - {sprintf(t("highestCountText"), avatar.highestCount)} - -
- {sprintf(t("avatarDate"), avatar.date)} -
- LV. {avatar.avatarLevels[0]} - -
- - - - {avatar.avatarAbility5KPlace > 0 && ( - <> -
- - #{avatar.avatarAbility5KPlaceText} - - /{avatar.avatarAbility5KCountText} -
- {avatar.avatarAbility5KText} Point - - )} - - - - {avatar.avatarAbility7KPlace > 0 && ( - <> -
- - #{avatar.avatarAbility7KPlace} - - /{avatar.avatarAbility7KCountText} -
- {avatar.avatarAbility7KText} Point - - )} - - - - {avatar.avatarAbility9KPlace > 0 && ( - <> -
- - #{avatar.avatarAbility9KPlace} - - /{avatar.avatarAbility9KCountText} -
- {avatar.avatarAbility9KText} Point - - )} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - ))} - - ); -}); diff --git "a/qwilight-fe/src/app/\133language\135/note/\133\133...want\135\135/page.tsx" "b/qwilight-fe/src/app/\133language\135/note/\133\133...want\135\135/page.tsx" index 89c940a..61579c2 100644 --- "a/qwilight-fe/src/app/\133language\135/note/\133\133...want\135\135/page.tsx" +++ "b/qwilight-fe/src/app/\133language\135/note/\133\133...want\135\135/page.tsx" @@ -13,7 +13,6 @@ import { useTranslations } from "next-intl"; import { useEffect } from "react"; import { Button, Col, Row } from "reactstrap"; -import { sprintf } from "sprintf-js"; import { useIntParam, useWant } from "taehui-ts/fe-utility"; export default observer(() => { @@ -103,10 +102,14 @@ - {sprintf(t("highestCountText"), formatText(highestCount))} + {t("highestCountText", { + highestCount: formatText(highestCount), + })}
- {sprintf(t("totalCountText"), formatText(totalCount))} + + {t("totalCountText", { totalCount: formatText(totalCount) })} +
)} @@ -115,10 +118,7 @@ taehui@taehui.ddns.net', - ), + __html: t.raw("bannedNoteFile"), }} /> diff --git "a/qwilight-fe/src/app/\133language\135/site/page.tsx" "b/qwilight-fe/src/app/\133language\135/site/page.tsx" index b61cefe..ad68086 100644 --- "a/qwilight-fe/src/app/\133language\135/site/page.tsx" +++ "b/qwilight-fe/src/app/\133language\135/site/page.tsx" @@ -28,7 +28,6 @@ OffcanvasHeader, Row, } from "reactstrap"; -import { sprintf } from "sprintf-js"; import Swal from "sweetalert2"; import { useTo } from "taehui-ts/fe-utility"; @@ -270,7 +269,7 @@ toggle={() => setAvatarsOpened(false)} > setAvatarsOpened(false)}> - {sprintf(t("avatarCountText"), avatars.length)} + {t("avatarCountText", { avatarCount: avatars.length })} If you find illegal BMS/BMSON note file, please let us know via %s and delete it.", + "bannedNoteFile": "Illegal BMS and BMSON note files are filtered by themselves by checking the number of key notes.
If you find illegal BMS/BMSON note file, please let us know via taehui@taehui.ddns.net and delete it.", "commentSiteName": "Performance notification room", "defaultSiteName": "General chat room", "enterSite": "Enter", @@ -34,7 +34,7 @@ "etcTotalNoteFiles": "Popular Songs TOP 10 for this month", "etcTotalTitles": "Titles TOP 10", "exileAvatar": "Kick", - "highestCountText": "Record count: %s", + "highestCountText": "Record count: {highestCount}", "hofAbilityText": "Rating", "hofAtText": "Month", "hofBand": "Combo", @@ -45,7 +45,7 @@ "hofTotalText": "All", "inputNewSite": "Create Chat Room", "notAvatarViewFault": "Non-member profiles are not available.", - "notSignedInText": "Thank you, %s.", + "notSignedInText": "Thank you, {avatarName}.", "notSignIn": "Sign out", "onAvatars": "User list.", "onClose": "Clear", @@ -61,7 +61,7 @@ "setSiteHand": "Delegation of the Director", "setSiteName": "Modify Room Name", "setSiteNameText": "Please enter a name to modify", - "signedInText": "Welcome, %s.", + "signedInText": "Welcome, {avatarName}.", "signIn": "Login", "signInCipher": "Password", "signInID": "ID", @@ -75,17 +75,17 @@ "siteSaveTraffic": "Data saving mode.", "siteWindowNew": "Create Chat Room", "siteYellEnter": "Entered", - "siteYellInvite": "Click to play multiple games with me on %s.", + "siteYellInvite": "Click to play multiple games with me on {siteName}.", "siteYellNewNetSite": "Create a new game room", "siteYellNewSite": "Create a new chat room", "siteYellQuit": "Exited", "siteYellTaehui": "Developer", - "siteYellTV": "Click to watch Qwilight broadcast %s", + "siteYellTV": "Click to watch Qwilight broadcast {title}", "stand": "Score", - "textBand": "%s combo", - "textCount": "%s", - "textHandled": "%s times", - "textStand": "%s point", + "textBand": "{value} combo", + "textCount": "{value}", + "textHandled": "{value} times", + "textStand": "{value} point", "toAvatar": "Online Profile", "toEtc": "Statistics", "toFit0": "Sequence of records", @@ -105,11 +105,11 @@ "toSrc1": "As a nickname", "toSrc2": "As an artist", "toSrc3": "As a genre", - "totalCountText": "Number of plays: %s.", - "totalLengthText": "Playtime: %d hours %d minutes %d seconds", + "totalCountText": "Number of plays: {totalCount}.", + "totalLengthText": "Playtime: {h} hours {m} minutes {s} seconds", "viewAvatarView": "View Profiles", "wantAvatarAssist": "Enter nickname to search", "wipedSiteYell": "Deleted message.", "wwwLevel": "Challenges", - "wwwLevelClearText": "Challenge %s cleared! Congratulations." + "wwwLevelClearText": "Challenge {title} cleared! Congratulations." } diff --git a/qwilight-fe/src/assets/language/ko.json b/qwilight-fe/src/assets/language/ko.json index c375615..b4247d9 100644 --- a/qwilight-fe/src/assets/language/ko.json +++ b/qwilight-fe/src/assets/language/ko.json @@ -1,16 +1,16 @@ { - "abilityFittedText": "%s 점 (+ %s Point)", + "abilityFittedText": "{stand} 점 (+ {ability} Point)", "audioMultiplier": "음악 속도", "autoSignIn": "자동 로그인", "avatarAbilitiesText": "성과 TOP 50", - "avatarCountText": "%d 명", - "avatarDate": "마지막 접속일: %s", + "avatarCountText": "{avatarCount} 명", + "avatarDate": "마지막 접속일: {date}", "avatarDateText": "활동 추세", "avatarFavoritesText": "가장 많이 플레이 TOP 50", "avatarIntroText": "자기소개", "avatarLastsText": "마지막 플레이 TOP 50", "avatarQuitStatusText": "랭크", - "bannedNoteFile": "불법 BMS, BMSON 노트 파일은 키음 개수를 확인하여 자체적으로 걸러집니다.
만약 불법 BMS/BMSON 노트 파일을 발견하시면 %s로 알려주시면 삭제합니다.", + "bannedNoteFile": "불법 BMS, BMSON 노트 파일은 키음 개수를 확인하여 자체적으로 걸러집니다.
만약 불법 BMS/BMSON 노트 파일을 발견하시면 taehui@taehui.ddns.net로 알려주시면 삭제합니다.", "commentSiteName": "성과 알림방", "defaultSiteName": "일반 대화방", "enterSite": "입장하기", @@ -34,7 +34,7 @@ "etcTotalNoteFiles": "이번 달 인기곡 TOP 10", "etcTotalTitles": "호칭 TOP 10", "exileAvatar": "추방", - "highestCountText": "기록 개수: %s 개", + "highestCountText": "기록 개수: {highestCount} 개", "hofAbilityText": "레이팅", "hofAtText": "이번 달", "hofBand": "콤보", @@ -45,7 +45,7 @@ "hofTotalText": "전체", "inputNewSite": "대화방 만들기", "notAvatarViewFault": "비회원의 프로필은 제공되지 않습니다.", - "notSignedInText": "%s님 감사합니다.", + "notSignedInText": "{avatarName}님 감사합니다.", "notSignIn": "로그아웃", "onAvatars": "사용자 목록", "onClose": "지우기", @@ -61,7 +61,7 @@ "setSiteHand": "방장 위임", "setSiteName": "방 이름 수정", "setSiteNameText": "수정할 이름을 입력하세요", - "signedInText": "%s님 환영합니다.", + "signedInText": "{avatarName}님 환영합니다.", "signIn": "로그인", "signInCipher": "비밀번호", "signInID": "아이디", @@ -75,17 +75,17 @@ "siteSaveTraffic": "데이터 절약 모드", "siteWindowNew": "대화방 만들기", "siteYellEnter": "입장함", - "siteYellInvite": "저랑 같이 %s 에서 멀티 플레이 하려면 클릭하세요", + "siteYellInvite": "저랑 같이 {siteName} 에서 멀티 플레이 하려면 클릭하세요", "siteYellNewNetSite": "새 게임방을 만듦", "siteYellNewSite": "새 대화방을 만듦", "siteYellQuit": "퇴장함", "siteYellTaehui": "개발자", - "siteYellTV": "Qwilight 방송 %s을 보려면 클릭하세요", + "siteYellTV": "Qwilight 방송 {title}을 보려면 클릭하세요", "stand": "점수", - "textBand": "%s 콤보", - "textCount": "%s 개", - "textHandled": "%s 회", - "textStand": "%s 점", + "textBand": "{value} 콤보", + "textCount": "{value} 개", + "textHandled": "{value} 회", + "textStand": "{value} 점", "toAvatar": "온라인 프로필", "toEtc": "통계", "toFit0": "기록 개수순", @@ -105,11 +105,11 @@ "toSrc1": "닉네임으로", "toSrc2": "아티스트로", "toSrc3": "장르로", - "totalCountText": "플레이 횟수: %s 회", - "totalLengthText": "플레이 시간: %d 시간 %d 분 %d 초", + "totalCountText": "플레이 횟수: {totalCount} 회", + "totalLengthText": "플레이 시간: {h} 시간 {m} 분 {s} 초", "viewAvatarView": "프로필 보기", "wantAvatarAssist": "검색할 닉네임을 입력하세요", "wipedSiteYell": "삭제된 메시지입니다.", "wwwLevel": "도전 과제", - "wwwLevelClearText": "도전 과제 %s 클리어! 축하합니다." + "wwwLevelClearText": "도전 과제 {title} 클리어! 축하합니다." } diff --git a/qwilight-fe/src/avatar/useGetAvatar.ts b/qwilight-fe/src/avatar/useGetAvatar.ts index 5e60d98..3adc068 100644 --- a/qwilight-fe/src/avatar/useGetAvatar.ts +++ b/qwilight-fe/src/avatar/useGetAvatar.ts @@ -4,7 +4,6 @@ import { AvatarAPIAvatar, AvatarAPIWantAvatar } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath, useWant } from "taehui-ts/fe-utility"; export type GetAvatar = { @@ -50,9 +49,9 @@ const { data } = await wwwAXIOS.get< AvatarAPIWantAvatar[] | AvatarAPIAvatar >("/avatar", { - params: want.startsWith("#") + params: want.startsWith("!") ? { - avatarID: want.substring(want.indexOf("#") + 1), + avatarID: want.substring(want.indexOf("!") + 1), } : { avatarName: want, @@ -65,12 +64,11 @@ return { ...data, totalCount: formatText(data.totalCount), - totalLength: sprintf( - t("totalLengthText"), - Math.floor(data.totalLength / 1000 / 60 / 60), - Math.floor((data.totalLength / 1000 / 60) % 60), - Math.floor((data.totalLength / 1000) % 60), - ), + totalLength: t("totalLengthText", { + h: Math.floor(data.totalLength / 1000 / 60 / 60), + m: Math.floor((data.totalLength / 1000 / 60) % 60), + s: Math.floor((data.totalLength / 1000) % 60), + }), highestCount: formatText(data.highestCount), date: toDate(data.date), avatarAbility5KText: formatText(data.avatarAbility5K), diff --git a/qwilight-fe/src/avatar/useGetAvatarAbility.ts b/qwilight-fe/src/avatar/useGetAvatarAbility.ts index 99d7ba6..2292bcc 100644 --- a/qwilight-fe/src/avatar/useGetAvatarAbility.ts +++ b/qwilight-fe/src/avatar/useGetAvatarAbility.ts @@ -4,7 +4,6 @@ import { GetAvatarAbilitiesAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAvatarAbility( @@ -27,11 +26,10 @@ ); return data.map((data) => ({ ...data, - fittedText: sprintf( - t("abilityFittedText"), - formatText(data.stand), - formatText(data.ability), - ), + fittedText: t("abilityFittedText", { + stand: formatText(data.stand), + ability: formatText(data.ability), + }), })); }, initialData: [], diff --git a/qwilight-fe/src/avatar/useGetAvatarFavorites.ts b/qwilight-fe/src/avatar/useGetAvatarFavorites.ts index 3cd0131..f6cc5d0 100644 --- a/qwilight-fe/src/avatar/useGetAvatarFavorites.ts +++ b/qwilight-fe/src/avatar/useGetAvatarFavorites.ts @@ -4,7 +4,6 @@ import { GetAvatarFavoritesAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAvatarFavorites( @@ -27,7 +26,7 @@ ); return data.map((data) => ({ ...data, - fittedText: sprintf(t("textHandled"), formatText(data.totalCount)), + fittedText: t("textHandled", { value: formatText(data.totalCount) }), })); }, initialData: [], diff --git a/qwilight-fe/src/etc/ModeItem.tsx b/qwilight-fe/src/etc/ModeItem.tsx index e869215..8526c89 100644 --- a/qwilight-fe/src/etc/ModeItem.tsx +++ b/qwilight-fe/src/etc/ModeItem.tsx @@ -5,7 +5,6 @@ import { useTranslations } from "next-intl"; import Image, { StaticImageData } from "next/image"; import { Badge, Col, ListGroup, ListGroupItem, Row } from "reactstrap"; -import { sprintf } from "sprintf-js"; export default function ModeItem({ title, @@ -30,7 +29,7 @@ - {sprintf(t("textHandled"), formatText(value))} + {t("textHandled", { value: formatText(value) })} diff --git a/qwilight-fe/src/etc/TotalEdgesView.tsx b/qwilight-fe/src/etc/TotalEdgesView.tsx index 74c4029..09141ef 100644 --- a/qwilight-fe/src/etc/TotalEdgesView.tsx +++ b/qwilight-fe/src/etc/TotalEdgesView.tsx @@ -2,7 +2,6 @@ import { EtcAPIEdge } from "@/wwwAPI"; import { useTranslations } from "next-intl"; import { Badge, ListGroup } from "reactstrap"; -import { sprintf } from "sprintf-js"; export default function TotalEdgesView({ totalEdges, @@ -18,7 +17,7 @@ ))} diff --git a/qwilight-fe/src/etc/TotalNoteFilesView.tsx b/qwilight-fe/src/etc/TotalNoteFilesView.tsx index be85899..235cb9a 100644 --- a/qwilight-fe/src/etc/TotalNoteFilesView.tsx +++ b/qwilight-fe/src/etc/TotalNoteFilesView.tsx @@ -2,7 +2,6 @@ import { EtcAPINoteFile } from "@/wwwAPI"; import { useTranslations } from "next-intl"; import { Badge, ListGroup } from "reactstrap"; -import { sprintf } from "sprintf-js"; export default function TotalNoteFilesView({ totalNoteFiles, @@ -24,7 +23,7 @@ genre={genre} levelText={levelText} level={level} - fittedText={sprintf(t("textHandled"), value)} + fittedText={t("textHandled", { value })} /> ), )} diff --git a/qwilight-fe/src/etc/TotalTitlesView.tsx b/qwilight-fe/src/etc/TotalTitlesView.tsx index 726f7af..1129ceb 100644 --- a/qwilight-fe/src/etc/TotalTitlesView.tsx +++ b/qwilight-fe/src/etc/TotalTitlesView.tsx @@ -2,7 +2,6 @@ import { EtcAPITitle } from "@/wwwAPI"; import { useTranslations } from "next-intl"; import { Badge, ListGroup } from "reactstrap"; -import { sprintf } from "sprintf-js"; export default function TotalTitlesView({ totalTitles, @@ -19,7 +18,7 @@ key={title} title={title} titleColor={titleColor} - text={sprintf(t("avatarCountText"), value)} + text={t("avatarCountText", { avatarCount: value })} /> ))} diff --git a/qwilight-fe/src/hof/useGetAbility5KHOF.ts b/qwilight-fe/src/hof/useGetAbility5KHOF.ts index dd76137..794ebbd 100644 --- a/qwilight-fe/src/hof/useGetAbility5KHOF.ts +++ b/qwilight-fe/src/hof/useGetAbility5KHOF.ts @@ -4,7 +4,6 @@ import { wwwAXIOS } from "@/Www"; import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAbility5KHOF() { @@ -25,7 +24,7 @@ const { data } = await wwwAXIOS.get("/hof/ability/5K"); return data.map((hof) => ({ ...hof, - text: sprintf(sprintf("%s Point", formatText(hof.value))), + text: `${formatText(hof.value)} Point`, })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAbility7KHOF.ts b/qwilight-fe/src/hof/useGetAbility7KHOF.ts index a367a1d..00621d9 100644 --- a/qwilight-fe/src/hof/useGetAbility7KHOF.ts +++ b/qwilight-fe/src/hof/useGetAbility7KHOF.ts @@ -4,7 +4,6 @@ import { wwwAXIOS } from "@/Www"; import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAbility7KHOF() { @@ -25,7 +24,7 @@ const { data } = await wwwAXIOS.get("/hof/ability/7K"); return data.map((hof) => ({ ...hof, - text: sprintf(sprintf("%s Point", formatText(hof.value))), + text: `${formatText(hof.value)} Point`, })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAbility9KHOF.ts b/qwilight-fe/src/hof/useGetAbility9KHOF.ts index 26db8ad..b446b86 100644 --- a/qwilight-fe/src/hof/useGetAbility9KHOF.ts +++ b/qwilight-fe/src/hof/useGetAbility9KHOF.ts @@ -4,7 +4,6 @@ import { wwwAXIOS } from "@/Www"; import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAbility9KHOF() { @@ -25,7 +24,7 @@ const { data } = await wwwAXIOS.get("/hof/ability/9K"); return data.map((hof) => ({ ...hof, - text: sprintf(sprintf("%s Point", formatText(hof.value))), + text: `${formatText(hof.value)} Point`, })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAtBandHOF.ts b/qwilight-fe/src/hof/useGetAtBandHOF.ts index 49a75f7..fcfa876 100644 --- a/qwilight-fe/src/hof/useGetAtBandHOF.ts +++ b/qwilight-fe/src/hof/useGetAtBandHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAtBandHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/atBand"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textBand"), formatText(hof.value)), + text: t("textBand", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAtHighestHOF.ts b/qwilight-fe/src/hof/useGetAtHighestHOF.ts index 98ba593..aa0cafd 100644 --- a/qwilight-fe/src/hof/useGetAtHighestHOF.ts +++ b/qwilight-fe/src/hof/useGetAtHighestHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAtHighestHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/atHighest"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textCount"), formatText(hof.value)), + text: t("textCount", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAtStandHOF.ts b/qwilight-fe/src/hof/useGetAtStandHOF.ts index d6980d5..aecdb6b 100644 --- a/qwilight-fe/src/hof/useGetAtStandHOF.ts +++ b/qwilight-fe/src/hof/useGetAtStandHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAtStandHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/atStand"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textStand"), formatText(hof.value)), + text: t("textStand", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetAtTotalHOF.ts b/qwilight-fe/src/hof/useGetAtTotalHOF.ts index 436be69..f759586 100644 --- a/qwilight-fe/src/hof/useGetAtTotalHOF.ts +++ b/qwilight-fe/src/hof/useGetAtTotalHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetAtTotalHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/atTotal"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textHandled"), formatText(hof.value)), + text: t("textHandled", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetLevelHOF.ts b/qwilight-fe/src/hof/useGetLevelHOF.ts index 39fa087..cc9b2ae 100644 --- a/qwilight-fe/src/hof/useGetLevelHOF.ts +++ b/qwilight-fe/src/hof/useGetLevelHOF.ts @@ -4,7 +4,6 @@ import { wwwAXIOS } from "@/Www"; import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetLevelHOF() { @@ -25,7 +24,7 @@ const { data } = await wwwAXIOS.get("/hof/level"); return data.map((hof) => ({ ...hof, - text: sprintf(sprintf("LV. %d", formatText(hof.value))), + text: `LV.${formatText(hof.value)}`, })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetTotalBandHOF.ts b/qwilight-fe/src/hof/useGetTotalBandHOF.ts index 7f80318..8fb6781 100644 --- a/qwilight-fe/src/hof/useGetTotalBandHOF.ts +++ b/qwilight-fe/src/hof/useGetTotalBandHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetTotalBandHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/totalBand"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textBand"), formatText(hof.value)), + text: t("textBand", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetTotalHighestHOF.ts b/qwilight-fe/src/hof/useGetTotalHighestHOF.ts index 9245c78..d037d38 100644 --- a/qwilight-fe/src/hof/useGetTotalHighestHOF.ts +++ b/qwilight-fe/src/hof/useGetTotalHighestHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetTotalHighestHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/totalHighest"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textCount"), formatText(hof.value)), + text: t("textCount", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetTotalStandHOF.ts b/qwilight-fe/src/hof/useGetTotalStandHOF.ts index b3453e5..2b00b4a 100644 --- a/qwilight-fe/src/hof/useGetTotalStandHOF.ts +++ b/qwilight-fe/src/hof/useGetTotalStandHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetTotalStandHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/totalStand"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textStand"), formatText(hof.value)), + text: t("textStand", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/hof/useGetTotalTotalHOF.ts b/qwilight-fe/src/hof/useGetTotalTotalHOF.ts index 38c2cea..3949216 100644 --- a/qwilight-fe/src/hof/useGetTotalTotalHOF.ts +++ b/qwilight-fe/src/hof/useGetTotalTotalHOF.ts @@ -5,7 +5,6 @@ import { GetHOFAPI } from "@/wwwAPI"; import { useQuery } from "@tanstack/react-query"; import { useTranslations } from "next-intl"; -import { sprintf } from "sprintf-js"; import { useIsPath } from "taehui-ts/fe-utility"; export default function useGetTotalTotalHOF() { @@ -28,7 +27,7 @@ const { data } = await wwwAXIOS.get("/hof/totalTotal"); return data.map((hof) => ({ ...hof, - text: sprintf(t("textHandled"), formatText(hof.value)), + text: t("textHandled", { value: formatText(hof.value) }), })); }, initialData: [], diff --git a/qwilight-fe/src/note/CommentItem.tsx b/qwilight-fe/src/note/CommentItem.tsx index d851e78..f26e951 100644 --- a/qwilight-fe/src/note/CommentItem.tsx +++ b/qwilight-fe/src/note/CommentItem.tsx @@ -19,7 +19,6 @@ import Image from "next/image"; import { useMemo } from "react"; import { Col, Row } from "reactstrap"; -import { sprintf } from "sprintf-js"; import { useTo } from "taehui-ts/fe-utility"; const ws = [w0, w1, w2, "", w4, w5, w6, w7]; @@ -74,7 +73,7 @@ {toDate(date)}
- {sprintf(t("textStand"), formatText(stand))} + {t("textStand", { value: formatText(stand) })} {" "} { @@ -94,7 +93,7 @@ > {(100 * point).toFixed(2)}% {" "} - {sprintf(t("textBand"), band.toString())} + {t("textBand", { value: band })} {isPaused && " ⏸️"}
{commentary && 💬 {commentary}} diff --git a/qwilight-fe/src/note/NoteItem.tsx b/qwilight-fe/src/note/NoteItem.tsx index af3150d..82163f4 100644 --- a/qwilight-fe/src/note/NoteItem.tsx +++ b/qwilight-fe/src/note/NoteItem.tsx @@ -16,7 +16,6 @@ import { useState } from "react"; import { Item, Menu, useContextMenu } from "react-contexify"; import { Col, Collapse, ListGroupItem, Row, Spinner } from "reactstrap"; -import { sprintf } from "sprintf-js"; import Swal from "sweetalert2"; const ws = [w0, w1, w2, "", w4, w5, w6, w7]; @@ -82,11 +81,13 @@ typeof totalCount === "number" && ( <> - {sprintf(t("highestCountText"), formatText(highestCount))} + {t("highestCountText", { + highestCount: formatText(highestCount), + })}
- {sprintf(t("totalCountText"), formatText(totalCount))} + {t("totalCountText", { totalCount: formatText(totalCount) })} )} diff --git a/qwilight-fe/src/site/SiteWindow.tsx b/qwilight-fe/src/site/SiteWindow.tsx index ad649ca..4da4611 100644 --- a/qwilight-fe/src/site/SiteWindow.tsx +++ b/qwilight-fe/src/site/SiteWindow.tsx @@ -14,7 +14,6 @@ import Image from "next/image"; import { useState } from "react"; import { Button, Col, Modal, Row } from "reactstrap"; -import { sprintf } from "sprintf-js"; const EventPB = require("@/Event_pb"); @@ -70,7 +69,7 @@ } }} > - {siteName} ({sprintf(t("avatarCountText"), avatarCount)}) + {siteName} ({t("avatarCountText", { avatarCount })}) {hasCipher && ( <> {" "} diff --git a/qwilight-fe/src/site/SiteYellItem.tsx b/qwilight-fe/src/site/SiteYellItem.tsx index 8e78997..bab8b94 100644 --- a/qwilight-fe/src/site/SiteYellItem.tsx +++ b/qwilight-fe/src/site/SiteYellItem.tsx @@ -26,7 +26,6 @@ import { useTranslations } from "next-intl"; import Image from "next/image"; import { Col, Row } from "reactstrap"; -import { sprintf } from "sprintf-js"; const EventPB = require("@/Event_pb"); @@ -226,7 +225,7 @@ }); }} > - {sprintf(t("siteYellInvite"), siteName)} + {t("siteYellInvite", { siteName })}
@@ -253,7 +252,7 @@ window.open(href); }} > - {sprintf(t("siteYellTV"), title)} + {t("siteYellTV", { title })} @@ -315,7 +314,7 @@ {getGenreText(genre)}
- {sprintf(t("textStand"), formatText(stand))} + {t("textStand", { value: formatText(stand) })} @@ -367,7 +366,7 @@ {avatarID && } {avatarName} {date}
- {sprintf(t("wwwLevelClearText"), title)} + {t("wwwLevelClearText", { title })}
diff --git a/qwilight-fe/src/site/setSiteStore.ts b/qwilight-fe/src/site/setSiteStore.ts index 6e4376f..22525e9 100644 --- a/qwilight-fe/src/site/setSiteStore.ts +++ b/qwilight-fe/src/site/setSiteStore.ts @@ -14,7 +14,6 @@ import { useTranslations } from "next-intl"; import { RefObject } from "react"; import { toast } from "react-toastify"; -import { sprintf } from "sprintf-js"; const EventPB = require("@/Event_pb"); @@ -256,7 +255,7 @@ this.setSignInOpened(false); const { totem, avatarID, avatarName } = JSON.parse(text); if (totem !== window.sessionStorage.getItem("totem")) { - toast.success(sprintf(t("signedInText"), avatarName)); + toast.success(t("signedInText", { avatarName })); } window.sessionStorage.setItem("totem", totem); this.setSiteAvatar(avatarID, avatarName); @@ -266,7 +265,11 @@ break; case EventPB.Event.EventID.NOT_SIGN_IN: if (text) { - toast.success(sprintf(t("notSignedInText"), this.siteAvatarName)); + toast.success( + t("notSignedInText", { + avatarName: this.siteAvatarName, + }), + ); window.sessionStorage.removeItem("totem"); const { avatarID, avatarName } = JSON.parse(text); this.setSiteAvatar(avatarID, avatarName); @@ -331,7 +334,7 @@ JSON.parse(siteYell); toNotify = `${avatarName} (${ltDate}) ${levelText} ${artist} - ${title} ${getGenreText( genre, - )} ${sprintf(t("textStand"), formatText(stand))}`; + )} ${t("textStand", { value: formatText(stand) })}`; break; } case "@Ability": { @@ -343,7 +346,7 @@ } case "@Level": { const { title } = JSON.parse(siteYell); - toNotify = sprintf(t("wwwLevelClearText"), title); + toNotify = t("wwwLevelClearText", { title }); break; } case "@Enter": { @@ -356,18 +359,16 @@ } case "@Invite": { const { avatarName, siteName } = JSON.parse(siteYell); - toNotify = `${avatarName} (${ltDate}) ${sprintf( - t("siteYellInvite"), + toNotify = `${avatarName} (${ltDate}) ${t("siteYellInvite", { siteName, - )}`; + })}`; break; } case "@TV": { const { title, text } = JSON.parse(siteYell); - toNotify = `${text} (${ltDate}) ${sprintf( - t("siteYellTV"), + toNotify = `${text} (${ltDate}) ${t("siteYellTV", { title, - )}`; + })}`; break; } case "@Wiped": diff --git a/taehui-fe/package.json b/taehui-fe/package.json index 05bb749..0e2bda8 100644 --- a/taehui-fe/package.json +++ b/taehui-fe/package.json @@ -8,16 +8,16 @@ "bootstrap": "^5.3.3", "crypto-js": "^4.2.0", "dompurify": "^3.0.9", - "i18next": "^23.10.1", + "isomorphic-dompurify": "^2.4.0", "mobx": "^6.12.0", "mobx-react-lite": "^4.0.6", + "next": "^14.1.3", + "next-intl": "^3.9.5", "react": "^18.2.0", "react-content-loader": "^7.0.0", "react-contexify": "^6.0.0", "react-dom": "^18.2.0", - "react-i18next": "^14.1.0", "react-infinite-scroll-component": "^6.1.0", - "react-router-dom": "^6.22.3", "react-scripts": "5.0.1", "react-textarea-autosize": "^8.5.3", "react-toastify": "^10.0.4", @@ -35,7 +35,7 @@ "@types/react-dom": "^18.2.22", "@types/showdown": "^2.0.6", "@types/sprintf-js": "^1.1.4", - "http-proxy-middleware": "^2.0.6", + "eslint-config-next": "^14.1.3", "typescript": "^5.4.2" }, "scripts": { diff --git a/taehui-ts/src/fe-utility.ts b/taehui-ts/src/fe-utility.ts index 0bcf9cd..49e9c6a 100644 --- a/taehui-ts/src/fe-utility.ts +++ b/taehui-ts/src/fe-utility.ts @@ -1,13 +1,13 @@ +import { useLocale } from "next-intl"; import { useParams, usePathname, useRouter, useSearchParams, } from "next/navigation"; -import { useCallback, useEffect, useState } from "react"; import { parse, stringify } from "qs"; +import { useCallback, useEffect, useState } from "react"; import urlcat from "urlcat"; -import { useLocale } from "next-intl"; export function useWindowArea() { const [windowLength, setWindowLength] = useState( @@ -79,7 +79,7 @@ const { want = [] } = useParams(); return { - want: Array.isArray(want) ? want[0] : want, + want: want[0] ?? "", setWant: useCallback( (want: string) => { to(route + "/" + want);