Compare commits

...
24 Commits
Author SHA1 Message Date
Lncvrt 138275d752 Fix for windows 2026-04-03 13:42:03 -07:00
Lncvrt 1f035882f7 1.9.0 2026-04-03 11:38:28 -07:00
Lncvrt 68cd3c891d Update typescript & node type 2026-04-03 11:37:25 -07:00
Lncvrt 65bd6cfe82 Fix dev mode issues on Windows 2026-04-03 11:32:50 -07:00
Lncvrt d91314112d Should be ready for release now. Will do some testing before. 2026-04-03 10:51:23 -07:00
Lncvrt da27bcb32c Smaller filesize & Close on issue 2026-04-03 10:35:18 -07:00
Lncvrt 6c8dfd1200 Update tokio & remove redundant Windows config 2026-04-03 10:13:45 -07:00
Lncvrt e09d125980 Should fix issues on linux 2026-04-03 07:12:24 -07:00
Lncvrt 35dd842576 I was lied to 2026-04-02 21:10:37 -07:00
Lncvrt 55714c8edb Stupid git 2026-04-02 17:27:05 -07:00
Lncvrt 04d1f2822b Add auto updater to the launcher 2026-04-02 17:11:25 -07:00
Lncvrt dfd99ab12e Use a popup for changelog again 2026-04-01 19:09:24 -07:00
Lncvrt 837c4a8863 Heavily improve codebase 2026-04-01 18:33:06 -07:00
Lncvrt c69060a360 1.8.1 2026-03-27 12:47:27 -07:00
Lncvrt f2b0358605 Big smart 2026-03-27 12:45:58 -07:00
Lncvrt 57441a8872 Close popup & notify on download finish 2026-03-27 12:45:29 -07:00
Lncvrt df522122ac Remove debug logging and fix hashing 2026-03-27 12:40:25 -07:00
Lncvrt f4e16c12e5 Fix overscroll 2026-03-27 12:28:33 -07:00
Lncvrt e2d98307c0 Optimize builds 2026-03-27 12:27:05 -07:00
Lncvrt 387bd54ce2 Rename "unix wine" to "linux wine" 2026-03-24 22:50:09 -07:00
Lncvrt e7a61872b7 Switch to Tauris json store management for settings 2026-03-24 22:45:28 -07:00
Lncvrt ac66c78dbf Fix this not using Rust for sending requests 2026-03-24 21:31:52 -07:00
Lncvrt d9302319fa Fix sorting issue 2026-03-24 20:15:41 -07:00
Lncvrt 5206a7f25d Fix downloads 2026-03-24 19:55:00 -07:00
45 changed files with 1099 additions and 1252 deletions

No files matched your search

+57 -48
View File
@@ -17,8 +17,11 @@
"@tauri-apps/plugin-notification": "2.3.3", "@tauri-apps/plugin-notification": "2.3.3",
"@tauri-apps/plugin-opener": "2.5.3", "@tauri-apps/plugin-opener": "2.5.3",
"@tauri-apps/plugin-os": "2.3.2", "@tauri-apps/plugin-os": "2.3.2",
"@tauri-apps/plugin-store": "2.4.2",
"@tauri-apps/plugin-updater": "2.10.0",
"@tauri-apps/plugin-window-state": "2.4.1", "@tauri-apps/plugin-window-state": "2.4.1",
"next": "16.2.1", "dompurify": "3.3.3",
"next": "16.2.2",
"pretty-bytes": "7.1.0", "pretty-bytes": "7.1.0",
"react": "19.2.4", "react": "19.2.4",
"react-dom": "19.2.4", "react-dom": "19.2.4",
@@ -28,14 +31,14 @@
"@tailwindcss/postcss": "4.2.2", "@tailwindcss/postcss": "4.2.2",
"@tauri-apps/cli": "2.10.1", "@tauri-apps/cli": "2.10.1",
"@types/crypto-js": "4.2.2", "@types/crypto-js": "4.2.2",
"@types/node": "25.5.0", "@types/node": "25.5.2",
"@types/react": "19.2.14", "@types/react": "19.2.14",
"@types/react-dom": "19.2.3", "@types/react-dom": "19.2.3",
"crypto-js": "4.2.0", "crypto-js": "4.2.0",
"eslint": "9.39.4", "eslint": "9.39.4",
"eslint-config-next": "16.2.1", "eslint-config-next": "16.2.2",
"tailwindcss": "4.2.2", "tailwindcss": "4.2.2",
"typescript": "5.9.3", "typescript": "6.0.2",
}, },
}, },
}, },
@@ -74,11 +77,11 @@
"@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], "@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="],
"@emnapi/core": ["@emnapi/core@1.9.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.0", "tslib": "^2.4.0" } }, "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA=="], "@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="],
"@emnapi/runtime": ["@emnapi/runtime@1.9.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA=="], "@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="],
"@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg=="], "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="],
"@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="], "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="],
@@ -178,25 +181,25 @@
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@0.2.12", "", { "dependencies": { "@emnapi/core": "^1.4.3", "@emnapi/runtime": "^1.4.3", "@tybys/wasm-util": "^0.10.0" } }, "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ=="], "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@0.2.12", "", { "dependencies": { "@emnapi/core": "^1.4.3", "@emnapi/runtime": "^1.4.3", "@tybys/wasm-util": "^0.10.0" } }, "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ=="],
"@next/env": ["@next/env@16.2.1", "", {}, "sha512-n8P/HCkIWW+gVal2Z8XqXJ6aB3J0tuM29OcHpCsobWlChH/SITBs1DFBk/HajgrwDkqqBXPbuUuzgDvUekREPg=="], "@next/env": ["@next/env@16.2.2", "", {}, "sha512-LqSGz5+xGk9EL/iBDr2yo/CgNQV6cFsNhRR2xhSXYh7B/hb4nePCxlmDvGEKG30NMHDFf0raqSyOZiQrO7BkHQ=="],
"@next/eslint-plugin-next": ["@next/eslint-plugin-next@16.2.1", "", { "dependencies": { "fast-glob": "3.3.1" } }, "sha512-r0epZGo24eT4g08jJlg2OEryBphXqO8aL18oajoTKLzHJ6jVr6P6FI58DLMug04MwD3j8Fj0YK0slyzneKVyzA=="], "@next/eslint-plugin-next": ["@next/eslint-plugin-next@16.2.2", "", { "dependencies": { "fast-glob": "3.3.1" } }, "sha512-IOPbWzDQ+76AtjZioaCjpIY72xNSDMnarZ2GMQ4wjNLvnJEJHqxQwGFhgnIWLV9klb4g/+amg88Tk5OXVpyLTw=="],
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@16.2.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BwZ8w8YTaSEr2HIuXLMLxIdElNMPvY9fLqb20LX9A9OMGtJilhHLbCL3ggyd0TwjmMcTxi0XXt+ur1vWUoxj2Q=="], "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@16.2.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-B92G3ulrwmkDSEJEp9+XzGLex5wC1knrmCSIylyVeiAtCIfvEJYiN3v5kXPlYt5R4RFlsfO/v++aKV63Acrugg=="],
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.2.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-/vrcE6iQSJq3uL3VGVHiXeaKbn8Es10DGTGRJnRZlkNQQk3kaNtAJg8Y6xuAlrx/6INKVjkfi5rY0iEXorZ6uA=="], "@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.2.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-7ZwSgNKJNQiwW0CKhNm9B1WS2L1Olc4B2XY0hPYCAL3epFnugMhuw5TMWzMilQ3QCZcCHoYm9NGWTHbr5REFxw=="],
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.2.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-uLn+0BK+C31LTVbQ/QU+UaVrV0rRSJQ8RfniQAHPghDdgE+SlroYqcmFnO5iNjNfVWCyKZHYrs3Nl0mUzWxbBw=="], "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.2.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-c3m8kBHMziMgo2fICOP/cd/5YlrxDU5YYjAJeQLyFsCqVF8xjOTH/QYG4a2u48CvvZZSj1eHQfBCbyh7kBr30Q=="],
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.2.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-ssKq6iMRnHdnycGp9hCuGnXJZ0YPr4/wNwrfE5DbmvEcgl9+yv97/Kq3TPVDfYome1SW5geciLB9aiEqKXQjlQ=="], "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.2.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-VKLuscm0P/mIfzt+SDdn2+8TNNJ7f0qfEkA+az7OqQbjzKdBxAHs0UvuiVoCtbwX+dqMEL9U54b5wQ/aN3dHeg=="],
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.2.1", "", { "os": "linux", "cpu": "x64" }, "sha512-HQm7SrHRELJ30T1TSmT706IWovFFSRGxfgUkyWJZF/RKBMdbdRWJuFrcpDdE5vy9UXjFOx6L3mRdqH04Mmx0hg=="], "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.2.2", "", { "os": "linux", "cpu": "x64" }, "sha512-kU3OPHJq6sBUjOk7wc5zJ7/lipn8yGldMoAv4z67j6ov6Xo/JvzA7L7LCsyzzsXmgLEhk3Qkpwqaq/1+XpNR3g=="],
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.2.1", "", { "os": "linux", "cpu": "x64" }, "sha512-aV2iUaC/5HGEpbBkE+4B8aHIudoOy5DYekAKOMSHoIYQ66y/wIVeaRx8MS2ZMdxe/HIXlMho4ubdZs/J8441Tg=="], "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.2.2", "", { "os": "linux", "cpu": "x64" }, "sha512-CKXRILyErMtUftp+coGcZ38ZwE/Aqq45VMCcRLr2I4OXKrgxIBDXHnBgeX/UMil0S09i2JXaDL3Q+TN8D/cKmg=="],
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.2.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-IXdNgiDHaSk0ZUJ+xp0OQTdTgnpx1RCfRTalhn3cjOP+IddTMINwA7DXZrwTmGDO8SUr5q2hdP/du4DcrB1GxA=="], "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.2.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-sS/jSk5VUoShUqINJFvNjVT7JfR5ORYj/+/ZpOYbbIohv/lQfduWnGAycq2wlknbOql2xOR0DoV0s6Xfcy49+g=="],
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.2.1", "", { "os": "win32", "cpu": "x64" }, "sha512-qvU+3a39Hay+ieIztkGSbF7+mccbbg1Tk25hc4JDylf8IHjYmY/Zm64Qq1602yPyQqvie+vf5T/uPwNxDNIoeg=="], "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.2.2", "", { "os": "win32", "cpu": "x64" }, "sha512-aHaKceJgdySReT7qeck5oShucxWRiiEuwCGK8HHALe6yZga8uyFpLkPgaRw3kkF04U7ROogL/suYCNt/+CuXGA=="],
"@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],
@@ -280,6 +283,10 @@
"@tauri-apps/plugin-os": ["@tauri-apps/plugin-os@2.3.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A=="], "@tauri-apps/plugin-os": ["@tauri-apps/plugin-os@2.3.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A=="],
"@tauri-apps/plugin-store": ["@tauri-apps/plugin-store@2.4.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-0ClHS50Oq9HEvLPhNzTNFxbWVOqoAp3dRvtewQBeqfIQ0z5m3JRnOISIn2ZVPCrQC0MyGyhTS9DWhHjpigQE7A=="],
"@tauri-apps/plugin-updater": ["@tauri-apps/plugin-updater@2.10.0", "", { "dependencies": { "@tauri-apps/api": "^2.10.1" } }, "sha512-ljN8jPlnT0aSn8ecYhuBib84alxfMx6Hc8vJSKMJyzGbTPFZAC44T2I1QNFZssgWKrAlofvJqCC6Rr472JWfkQ=="],
"@tauri-apps/plugin-window-state": ["@tauri-apps/plugin-window-state@2.4.1", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-OuvdrzyY8Q5Dbzpj+GcrnV1iCeoZbcFdzMjanZMMcAEUNy/6PH5pxZPXpaZLOR7whlzXiuzx0L9EKZbH7zpdRw=="], "@tauri-apps/plugin-window-state": ["@tauri-apps/plugin-window-state@2.4.1", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-OuvdrzyY8Q5Dbzpj+GcrnV1iCeoZbcFdzMjanZMMcAEUNy/6PH5pxZPXpaZLOR7whlzXiuzx0L9EKZbH7zpdRw=="],
"@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], "@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="],
@@ -292,31 +299,33 @@
"@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="], "@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="],
"@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="], "@types/node": ["@types/node@25.5.2", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg=="],
"@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="], "@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="],
"@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="], "@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="],
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.57.2", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/type-utils": "8.57.2", "@typescript-eslint/utils": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.57.2", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w=="], "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],
"@typescript-eslint/parser": ["@typescript-eslint/parser@8.57.2", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA=="], "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.58.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/type-utils": "8.58.0", "@typescript-eslint/utils": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.58.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg=="],
"@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.57.2", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.57.2", "@typescript-eslint/types": "^8.57.2", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw=="], "@typescript-eslint/parser": ["@typescript-eslint/parser@8.58.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA=="],
"@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2" } }, "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw=="], "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.58.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.58.0", "@typescript-eslint/types": "^8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg=="],
"@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.57.2", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw=="], "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0" } }, "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ=="],
"@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/utils": "8.57.2", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg=="], "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.58.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A=="],
"@typescript-eslint/types": ["@typescript-eslint/types@8.57.2", "", {}, "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA=="], "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg=="],
"@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.57.2", "", { "dependencies": { "@typescript-eslint/project-service": "8.57.2", "@typescript-eslint/tsconfig-utils": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA=="], "@typescript-eslint/types": ["@typescript-eslint/types@8.58.0", "", {}, "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww=="],
"@typescript-eslint/utils": ["@typescript-eslint/utils@8.57.2", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg=="], "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.58.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.58.0", "@typescript-eslint/tsconfig-utils": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA=="],
"@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "eslint-visitor-keys": "^5.0.0" } }, "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw=="], "@typescript-eslint/utils": ["@typescript-eslint/utils@8.58.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA=="],
"@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ=="],
"@unrs/resolver-binding-android-arm-eabi": ["@unrs/resolver-binding-android-arm-eabi@1.11.1", "", { "os": "android", "cpu": "arm" }, "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw=="], "@unrs/resolver-binding-android-arm-eabi": ["@unrs/resolver-binding-android-arm-eabi@1.11.1", "", { "os": "android", "cpu": "arm" }, "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw=="],
@@ -390,19 +399,19 @@
"available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="], "available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],
"axe-core": ["axe-core@4.11.1", "", {}, "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A=="], "axe-core": ["axe-core@4.11.2", "", {}, "sha512-byD6KPdvo72y/wj2T/4zGEvvlis+PsZsn/yPS3pEO+sFpcrqRpX/TJCxvVaEsNeMrfQbCr7w163YqoD9IYwHXw=="],
"axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="],
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
"baseline-browser-mapping": ["baseline-browser-mapping@2.10.10", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ=="], "baseline-browser-mapping": ["baseline-browser-mapping@2.10.14", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-fOVLPAsFTsQfuCkvahZkzq6nf8KvGWanlYoTh0SVA0A/PIUxQGU2AOZAoD95n2gFLVDW/jP6sbGLny95nmEuHA=="],
"brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], "brace-expansion": ["brace-expansion@1.1.13", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w=="],
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
"browserslist": ["browserslist@4.28.1", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="], "browserslist": ["browserslist@4.28.2", "", { "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", "electron-to-chromium": "^1.5.328", "node-releases": "^2.0.36", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg=="],
"call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="], "call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="],
@@ -412,7 +421,7 @@
"callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="],
"caniuse-lite": ["caniuse-lite@1.0.30001781", "", {}, "sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw=="], "caniuse-lite": ["caniuse-lite@1.0.30001784", "", {}, "sha512-WU346nBTklUV9YfUl60fqRbU5ZqyXlqvo1SgigE1OAXK5bFL8LL9q1K7aap3N739l4BvNqnkm3YrGHiY9sfUQw=="],
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
@@ -452,9 +461,11 @@
"doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="], "doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="],
"dompurify": ["dompurify@3.3.3", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA=="],
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
"electron-to-chromium": ["electron-to-chromium@1.5.322", "", {}, "sha512-vFU34OcrvMcH66T+dYC3G4nURmgfDVewMIu6Q2urXpumAPSMmzvcn04KVVV8Opikq8Vs5nUbO/8laNhNRqSzYw=="], "electron-to-chromium": ["electron-to-chromium@1.5.331", "", {}, "sha512-IbxXrsTlD3hRodkLnbxAPP4OuJYdWCeM3IOdT+CpcMoIwIoDfCmRpEtSPfwBXxVkg9xmBeY7Lz2Eo2TDn/HC3Q=="],
"emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
@@ -482,9 +493,9 @@
"eslint": ["eslint@9.39.4", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.2", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.5", "@eslint/js": "9.39.4", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ=="], "eslint": ["eslint@9.39.4", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.2", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.5", "@eslint/js": "9.39.4", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ=="],
"eslint-config-next": ["eslint-config-next@16.2.1", "", { "dependencies": { "@next/eslint-plugin-next": "16.2.1", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.37.0", "eslint-plugin-react-hooks": "^7.0.0", "globals": "16.4.0", "typescript-eslint": "^8.46.0" }, "peerDependencies": { "eslint": ">=9.0.0", "typescript": ">=3.3.1" }, "optionalPeers": ["typescript"] }, "sha512-qhabwjQZ1Mk53XzXvmogf8KQ0tG0CQXF0CZ56+2/lVhmObgmaqj7x5A1DSrWdZd3kwI7GTPGUjFne+krRxYmFg=="], "eslint-config-next": ["eslint-config-next@16.2.2", "", { "dependencies": { "@next/eslint-plugin-next": "16.2.2", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.37.0", "eslint-plugin-react-hooks": "^7.0.0", "globals": "16.4.0", "typescript-eslint": "^8.46.0" }, "peerDependencies": { "eslint": ">=9.0.0", "typescript": ">=3.3.1" }, "optionalPeers": ["typescript"] }, "sha512-6VlvEhwoug2JpVgjZDhyXrJXUEuPY++TddzIpTaIRvlvlXXFgvQUtm3+Zr84IjFm0lXtJt73w19JA08tOaZVwg=="],
"eslint-import-resolver-node": ["eslint-import-resolver-node@0.3.9", "", { "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.13.0", "resolve": "^1.22.4" } }, "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g=="], "eslint-import-resolver-node": ["eslint-import-resolver-node@0.3.10", "", { "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.16.1", "resolve": "^2.0.0-next.6" } }, "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ=="],
"eslint-import-resolver-typescript": ["eslint-import-resolver-typescript@3.10.1", "", { "dependencies": { "@nolyfill/is-core-module": "1.0.39", "debug": "^4.4.0", "get-tsconfig": "^4.10.0", "is-bun-module": "^2.0.0", "stable-hash": "^0.0.5", "tinyglobby": "^0.2.13", "unrs-resolver": "^1.6.2" }, "peerDependencies": { "eslint": "*", "eslint-plugin-import": "*", "eslint-plugin-import-x": "*" }, "optionalPeers": ["eslint-plugin-import", "eslint-plugin-import-x"] }, "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ=="], "eslint-import-resolver-typescript": ["eslint-import-resolver-typescript@3.10.1", "", { "dependencies": { "@nolyfill/is-core-module": "1.0.39", "debug": "^4.4.0", "get-tsconfig": "^4.10.0", "is-bun-module": "^2.0.0", "stable-hash": "^0.0.5", "tinyglobby": "^0.2.13", "unrs-resolver": "^1.6.2" }, "peerDependencies": { "eslint": "*", "eslint-plugin-import": "*", "eslint-plugin-import-x": "*" }, "optionalPeers": ["eslint-plugin-import", "eslint-plugin-import-x"] }, "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ=="],
@@ -726,11 +737,11 @@
"natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="],
"next": ["next@16.2.1", "", { "dependencies": { "@next/env": "16.2.1", "@swc/helpers": "0.5.15", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.2.1", "@next/swc-darwin-x64": "16.2.1", "@next/swc-linux-arm64-gnu": "16.2.1", "@next/swc-linux-arm64-musl": "16.2.1", "@next/swc-linux-x64-gnu": "16.2.1", "@next/swc-linux-x64-musl": "16.2.1", "@next/swc-win32-arm64-msvc": "16.2.1", "@next/swc-win32-x64-msvc": "16.2.1", "sharp": "^0.34.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-VaChzNL7o9rbfdt60HUj8tev4m6d7iC1igAy157526+cJlXOQu5LzsBXNT+xaJnTP/k+utSX5vMv7m0G+zKH+Q=="], "next": ["next@16.2.2", "", { "dependencies": { "@next/env": "16.2.2", "@swc/helpers": "0.5.15", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.2.2", "@next/swc-darwin-x64": "16.2.2", "@next/swc-linux-arm64-gnu": "16.2.2", "@next/swc-linux-arm64-musl": "16.2.2", "@next/swc-linux-x64-gnu": "16.2.2", "@next/swc-linux-x64-musl": "16.2.2", "@next/swc-win32-arm64-msvc": "16.2.2", "@next/swc-win32-x64-msvc": "16.2.2", "sharp": "^0.34.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-i6AJdyVa4oQjyvX/6GeER8dpY/xlIV+4NMv/svykcLtURJSy/WzDnnUk/TM4d0uewFHK7xSQz4TbIwPgjky+3A=="],
"node-exports-info": ["node-exports-info@1.6.0", "", { "dependencies": { "array.prototype.flatmap": "^1.3.3", "es-errors": "^1.3.0", "object.entries": "^1.1.9", "semver": "^6.3.1" } }, "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw=="], "node-exports-info": ["node-exports-info@1.6.0", "", { "dependencies": { "array.prototype.flatmap": "^1.3.3", "es-errors": "^1.3.0", "object.entries": "^1.1.9", "semver": "^6.3.1" } }, "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw=="],
"node-releases": ["node-releases@2.0.36", "", {}, "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA=="], "node-releases": ["node-releases@2.0.37", "", {}, "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg=="],
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
@@ -792,7 +803,7 @@
"regexp.prototype.flags": ["regexp.prototype.flags@1.5.4", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="], "regexp.prototype.flags": ["regexp.prototype.flags@1.5.4", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="],
"resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], "resolve": ["resolve@2.0.0-next.6", "", { "dependencies": { "es-errors": "^1.3.0", "is-core-module": "^2.16.1", "node-exports-info": "^1.6.0", "object-keys": "^1.1.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA=="],
"resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="],
@@ -884,9 +895,9 @@
"typed-array-length": ["typed-array-length@1.0.7", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0", "reflect.getprototypeof": "^1.0.6" } }, "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg=="], "typed-array-length": ["typed-array-length@1.0.7", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0", "reflect.getprototypeof": "^1.0.6" } }, "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg=="],
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="],
"typescript-eslint": ["typescript-eslint@8.57.2", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.57.2", "@typescript-eslint/parser": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/utils": "8.57.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A=="], "typescript-eslint": ["typescript-eslint@8.58.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.58.0", "@typescript-eslint/parser": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-e2TQzKfaI85fO+F3QywtX+tCTsu/D3WW5LVU6nz8hTFKFZ8yBJ6mSYRpXqdR3mFjPWmO0eWsTa5f+UpAOe/FMA=="],
"unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="], "unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="],
@@ -922,13 +933,13 @@
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.9.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.0", "tslib": "^2.4.0" }, "bundled": true }, "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" }, "bundled": true }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.9.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="],
"@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.1", "", { "dependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1", "@tybys/wasm-util": "^0.10.1" }, "bundled": true }, "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A=="], "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.2", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" }, "bundled": true }, "sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw=="],
"@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="],
@@ -936,7 +947,7 @@
"@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="],
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="],
"@typescript-eslint/typescript-estree/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "@typescript-eslint/typescript-estree/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
@@ -950,8 +961,6 @@
"eslint-plugin-import/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], "eslint-plugin-import/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
"eslint-plugin-react/resolve": ["resolve@2.0.0-next.6", "", { "dependencies": { "es-errors": "^1.3.0", "is-core-module": "^2.16.1", "node-exports-info": "^1.6.0", "object-keys": "^1.1.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA=="],
"fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
"is-bun-module/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "is-bun-module/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
+8 -5
View File
@@ -1,7 +1,7 @@
{ {
"name": "lncvrt-games-launcher", "name": "lncvrt-games-launcher",
"private": true, "private": true,
"version": "1.8.0", "version": "1.9.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@@ -23,8 +23,11 @@
"@tauri-apps/plugin-notification": "2.3.3", "@tauri-apps/plugin-notification": "2.3.3",
"@tauri-apps/plugin-opener": "2.5.3", "@tauri-apps/plugin-opener": "2.5.3",
"@tauri-apps/plugin-os": "2.3.2", "@tauri-apps/plugin-os": "2.3.2",
"@tauri-apps/plugin-store": "2.4.2",
"@tauri-apps/plugin-updater": "2.10.0",
"@tauri-apps/plugin-window-state": "2.4.1", "@tauri-apps/plugin-window-state": "2.4.1",
"next": "16.2.1", "dompurify": "3.3.3",
"next": "16.2.2",
"pretty-bytes": "7.1.0", "pretty-bytes": "7.1.0",
"react": "19.2.4", "react": "19.2.4",
"react-dom": "19.2.4" "react-dom": "19.2.4"
@@ -34,13 +37,13 @@
"@tailwindcss/postcss": "4.2.2", "@tailwindcss/postcss": "4.2.2",
"@tauri-apps/cli": "2.10.1", "@tauri-apps/cli": "2.10.1",
"@types/crypto-js": "4.2.2", "@types/crypto-js": "4.2.2",
"@types/node": "25.5.0", "@types/node": "25.5.2",
"@types/react": "19.2.14", "@types/react": "19.2.14",
"@types/react-dom": "19.2.3", "@types/react-dom": "19.2.3",
"crypto-js": "4.2.0", "crypto-js": "4.2.0",
"eslint": "9.39.4", "eslint": "9.39.4",
"eslint-config-next": "16.2.1", "eslint-config-next": "16.2.2",
"tailwindcss": "4.2.2", "tailwindcss": "4.2.2",
"typescript": "5.9.3" "typescript": "6.0.2"
} }
} }
+17 -5
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "lncvrt-games-launcher" name = "lncvrt-games-launcher"
version = "1.8.0" version = "1.9.0"
authors = ["Lncvrt"] authors = ["Lncvrt"]
edition = "2024" edition = "2024"
@@ -18,25 +18,37 @@ serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149" serde_json = "1.0.149"
tauri-plugin-os = "2.3.2" tauri-plugin-os = "2.3.2"
reqwest = { version = "0.13.2", default-features = false, features = ["stream", "rustls"] } reqwest = { version = "0.13.2", default-features = false, features = ["stream", "rustls"] }
tokio = "1.50.0" tokio = "1.51.0"
futures-util = { version = "0.3.32", features = ["io"] } futures-util = { version = "0.3.32", features = ["io"] }
tauri-plugin-decorum = "1.1.1" tauri-plugin-decorum = "1.1.1"
tauri-plugin-fs = "2.4.5" tauri-plugin-fs = "2.4.5"
zip = "8.4.0" zip = "8.5.0"
tauri-plugin-dialog = "2.6.0" tauri-plugin-dialog = "2.6.0"
tauri-plugin-notification = "2.3.3" tauri-plugin-notification = "2.3.3"
sysinfo = "0.38.4" sha2 = "0.11.0"
sha2 = "0.10.9"
tauri-plugin-clipboard-manager = "2.3.2" tauri-plugin-clipboard-manager = "2.3.2"
tauri-plugin-prevent-default = "4.0.4" tauri-plugin-prevent-default = "4.0.4"
openssl = { version = "0.10.76", features = ["v110", "vendored"] } openssl = { version = "0.10.76", features = ["v110", "vendored"] }
base64 = "0.22.1" base64 = "0.22.1"
tauri-plugin-http = "2.5.7" tauri-plugin-http = "2.5.7"
dashmap = "6.1.0" dashmap = "6.1.0"
tauri-plugin-store = "2.4.2"
hex = "0.4.3"
[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies]
sysinfo = "0.38.4"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-single-instance = "2.4.0" tauri-plugin-single-instance = "2.4.0"
tauri-plugin-updater = "2.10.0"
tauri-plugin-window-state = "2.4.1" tauri-plugin-window-state = "2.4.1"
[target.'cfg(target_os = "windows")'.dependencies] [target.'cfg(target_os = "windows")'.dependencies]
tauri-plugin-decorum = "1.1.1" tauri-plugin-decorum = "1.1.1"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
+9 -11
View File
@@ -2,9 +2,7 @@
"$schema": "../gen/schemas/desktop-schema.json", "$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default", "identifier": "default",
"description": "Capability for the main window", "description": "Capability for the main window",
"windows": [ "windows": ["main"],
"main"
],
"permissions": [ "permissions": [
"core:default", "core:default",
"opener:default", "opener:default",
@@ -26,19 +24,18 @@
"notification:default", "notification:default",
"clipboard-manager:default", "clipboard-manager:default",
"clipboard-manager:allow-write-text", "clipboard-manager:allow-write-text",
"store:default",
"store:allow-load",
"store:allow-save",
"fs:allow-applocaldata-read", "fs:allow-applocaldata-read",
"fs:allow-applocaldata-write", "fs:allow-applocaldata-write",
{ {
"identifier": "fs:scope", "identifier": "fs:scope",
"allow": [ "allow": [{ "path": "$APPLOCALDATA/game/**" }, { "path": "$APPCONFIG/versions.json" }]
{ "path": "$APPLOCALDATA/game/**" }
]
}, },
{ {
"identifier": "opener:allow-open-path", "identifier": "opener:allow-open-path",
"allow": [ "allow": [{ "path": "$APPLOCALDATA/game/**" }]
{ "path": "$APPLOCALDATA/game/**" }
]
}, },
{ {
"identifier": "http:default", "identifier": "http:default",
@@ -51,8 +48,9 @@
{ "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/berry" }, { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/berry" },
{ "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/coin" }, { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/coin" },
{ "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/legacy" }, { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/legacy" },
{ "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/total" } { "url": "https://games.lncvrt.xyz/api/berrydash/leaderboard/total" },
{ "url": "https://games.lncvrt.xyz/api/launcher/mods" }
] ]
} }
] ]
} }
+2 -1
View File
@@ -9,6 +9,7 @@
"main" "main"
], ],
"permissions": [ "permissions": [
"window-state:default" "window-state:default",
"updater:default"
] ]
} }
+102 -122
View File
@@ -15,7 +15,6 @@ use std::{
process::Command, process::Command,
time::Duration, time::Duration,
}; };
use sysinfo::System;
use tauri::window::{ProgressBarState, ProgressBarStatus}; use tauri::window::{ProgressBarState, ProgressBarStatus};
use tauri::{AppHandle, Emitter, Manager}; use tauri::{AppHandle, Emitter, Manager};
use tauri_plugin_os::platform; use tauri_plugin_os::platform;
@@ -25,9 +24,15 @@ use tokio::{io::AsyncWriteExt, time::timeout};
use zip::ZipArchive; use zip::ZipArchive;
use zip::result::ZipError; use zip::result::ZipError;
#[cfg(any(target_os = "windows", target_os = "linux"))]
use sysinfo::System;
#[cfg(unix)] #[cfg(unix)]
use std::os::unix::fs::PermissionsExt; use std::os::unix::fs::PermissionsExt;
#[cfg(not(debug_assertions))]
use tauri_plugin_updater::UpdaterExt;
static CANCEL_MAP: OnceLock<DashMap<String, bool>> = OnceLock::new(); static CANCEL_MAP: OnceLock<DashMap<String, bool>> = OnceLock::new();
fn cancel_map() -> &'static DashMap<String, bool> { fn cancel_map() -> &'static DashMap<String, bool> {
@@ -38,6 +43,7 @@ fn is_cancelled(name: &str) -> bool {
cancel_map().get(name).map(|v| *v).unwrap_or(false) cancel_map().get(name).map(|v| *v).unwrap_or(false)
} }
#[cfg(any(target_os = "windows", target_os = "linux"))]
fn is_running_by_path(path: &Path) -> bool { fn is_running_by_path(path: &Path) -> bool {
let sys = System::new_all(); let sys = System::new_all();
let target = match path.canonicalize() { let target = match path.canonicalize() {
@@ -151,25 +157,19 @@ async fn download(
download_type: i8, download_type: i8,
mod_id: String, mod_id: String,
) -> String { ) -> String {
println!("[download] Starting download for '{}' from '{}'", name, url);
let _ = app.emit("download-start", format!("{}", name)); let _ = app.emit("download-start", format!("{}", name));
let window = app.get_webview_window("main").expect("main window missing"); let window = app.get_webview_window("main").expect("main window missing");
let downloads_path = match app.path().app_local_data_dir() { let downloads_path = match app.path().app_local_data_dir() {
Ok(p) => p.join("downloads"), Ok(p) => p.join("downloads"),
Err(e) => { Err(_) => {
println!(
"[download] ERROR: Failed to resolve app_local_data_dir: {}",
e
);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
}; };
let game_path = match app.path().app_local_data_dir() { let game_path = match app.path().app_local_data_dir() {
Ok(p) => p.join("game"), Ok(p) => p.join("game"),
Err(e) => { Err(_) => {
println!("[download] ERROR: Failed to resolve game path: {}", e);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -177,18 +177,12 @@ async fn download(
let download_part_path = downloads_path.join(format!("{}.part", name)); let download_part_path = downloads_path.join(format!("{}.part", name));
let download_zip_path = downloads_path.join(format!("{}.zip", name)); let download_zip_path = downloads_path.join(format!("{}.zip", name));
println!("[download] Part file: {:?}", download_part_path);
println!("[download] Zip file: {:?}", download_zip_path);
let _ = tokio::fs::create_dir_all(&downloads_path).await; let _ = tokio::fs::create_dir_all(&downloads_path).await;
let resume_from: u64 = match tokio::fs::metadata(&download_part_path).await { let resume_from: u64 = match tokio::fs::metadata(&download_part_path).await {
Ok(meta) => { Ok(meta) => {
let size = meta.len(); let size = meta.len();
println!(
"[download] Found existing .part file ({} bytes), will attempt to resume",
size
);
size size
} }
Err(_) => 0, Err(_) => 0,
@@ -198,16 +192,11 @@ async fn download(
let mut request = client.get(&url); let mut request = client.get(&url);
if resume_from > 0 { if resume_from > 0 {
request = request.header("Range", format!("bytes={}-", resume_from)); request = request.header("Range", format!("bytes={}-", resume_from));
println!("[download] Requesting range: bytes={}-", resume_from);
} }
let resp = match request.send().await { let resp = match request.send().await {
Ok(r) => { Ok(r) => r,
println!("[download] HTTP request succeeded, status: {}", r.status()); Err(_) => {
r
}
Err(e) => {
println!("[download] ERROR: HTTP request failed: {:?}", e);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -216,19 +205,11 @@ async fn download(
let status = resp.status(); let status = resp.status();
let actual_resume_from = if resume_from > 0 && status == reqwest::StatusCode::OK { let actual_resume_from = if resume_from > 0 && status == reqwest::StatusCode::OK {
println!(
"[download] Server does not support range requests (got 200), restarting from scratch"
);
let _ = tokio::fs::remove_file(&download_part_path).await; let _ = tokio::fs::remove_file(&download_part_path).await;
0 0
} else if resume_from > 0 && status == reqwest::StatusCode::PARTIAL_CONTENT { } else if resume_from > 0 && status == reqwest::StatusCode::PARTIAL_CONTENT {
println!("[download] Server accepted range request (206 Partial Content)");
resume_from resume_from
} else if resume_from > 0 { } else if resume_from > 0 {
println!(
"[download] Unexpected status {} while resuming, restarting",
status
);
let _ = tokio::fs::remove_file(&download_part_path).await; let _ = tokio::fs::remove_file(&download_part_path).await;
0 0
} else { } else {
@@ -237,13 +218,6 @@ async fn download(
let remaining_size = resp.content_length().unwrap_or(0); let remaining_size = resp.content_length().unwrap_or(0);
let total_size = actual_resume_from + remaining_size; let total_size = actual_resume_from + remaining_size;
println!(
"[download] Resume offset: {} bytes | Remaining: {} bytes | Total: {} bytes ({:.2} MB)",
actual_resume_from,
remaining_size,
total_size,
total_size as f64 / 1_048_576.0
);
let _ = app.emit("download-size", format!("{}:{}", &name, &total_size)); let _ = app.emit("download-size", format!("{}:{}", &name, &total_size));
let mut file = if actual_resume_from > 0 { let mut file = if actual_resume_from > 0 {
@@ -252,15 +226,8 @@ async fn download(
.open(&download_part_path) .open(&download_part_path)
.await .await
{ {
Ok(f) => { Ok(f) => f,
println!("[download] Opened .part file in append mode for resume"); Err(_) => {
f
}
Err(e) => {
println!(
"[download] ERROR: Failed to open .part file for append: {}",
e
);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -268,22 +235,14 @@ async fn download(
} else { } else {
if download_type == 0 { if download_type == 0 {
if let Ok(true) = tokio::fs::try_exists(&game_path.join(&name)).await { if let Ok(true) = tokio::fs::try_exists(&game_path.join(&name)).await {
println!(
"[download] Existing game dir found, removing: {:?}",
game_path.join(&name)
);
let _ = tokio::fs::remove_dir_all(&game_path.join(&name)).await; let _ = tokio::fs::remove_dir_all(&game_path.join(&name)).await;
} }
let _ = tokio::fs::create_dir_all(&game_path.join(&name)).await; let _ = tokio::fs::create_dir_all(&game_path.join(&name)).await;
} }
match tokio::fs::File::create(&download_part_path).await { match tokio::fs::File::create(&download_part_path).await {
Ok(f) => { Ok(f) => f,
println!("[download] Created new .part file"); Err(_) => {
f
}
Err(e) => {
println!("[download] ERROR: Failed to create .part file: {}", e);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -298,7 +257,6 @@ async fn download(
while let Ok(Some(chunk_result)) = timeout(Duration::from_secs(5), stream.next()).await { while let Ok(Some(chunk_result)) = timeout(Duration::from_secs(5), stream.next()).await {
if is_cancelled(&name) { if is_cancelled(&name) {
println!("[download] Cancelled '{}' during chunk loop", name);
cancel_map().remove(&name); cancel_map().remove(&name);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
@@ -309,11 +267,7 @@ async fn download(
let chunk = match chunk_result { let chunk = match chunk_result {
Ok(c) => c, Ok(c) => c,
Err(e) => { Err(_) => {
println!(
"[download] ERROR: Failed to read chunk #{}: {}",
chunk_count, e
);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -321,11 +275,7 @@ async fn download(
chunk_count += 1; chunk_count += 1;
if let Err(e) = file.write_all(&chunk).await { if let Err(_) = file.write_all(&chunk).await {
println!(
"[download] ERROR: Failed to write chunk #{} to disk: {}",
chunk_count, e
);
let _ = &app.emit("download-stop", format!("{}", name)); let _ = &app.emit("download-stop", format!("{}", name));
return "-1".to_string(); return "-1".to_string();
} }
@@ -352,15 +302,6 @@ async fn download(
}; };
if chunk_count % 50 == 0 || downloaded == total_size { if chunk_count % 50 == 0 || downloaded == total_size {
println!(
"[download] [{:.1}%] {:.2} MB / {:.2} MB | Speed: {:.1} KB/s | ETA: {:.1}s | Chunks: {}",
progress,
downloaded as f64 / 1_048_576.0,
total_size as f64 / 1_048_576.0,
speed / 1024.0,
eta_secs,
chunk_count,
);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::Normal), status: Some(ProgressBarStatus::Normal),
progress: Some(progress as u64), progress: Some(progress as u64),
@@ -377,12 +318,6 @@ async fn download(
} }
if total_size > 0 && downloaded < total_size { if total_size > 0 && downloaded < total_size {
println!(
"[download] ERROR: Download incomplete — got {} of {} bytes ({:.1}% complete)",
downloaded,
total_size,
(downloaded as f64 / total_size as f64) * 100.0
);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
progress: Some(0), progress: Some(0),
@@ -390,36 +325,21 @@ async fn download(
return "-1".to_string(); return "-1".to_string();
} }
println!(
"[download] Download complete: {} bytes total in {:.2}s (this session)",
downloaded,
start.elapsed().as_secs_f64()
);
println!("[download] Verifying SHA-512 hash...");
let _ = app.emit("download-hash-checking", format!("{}", &name)); let _ = app.emit("download-hash-checking", format!("{}", &name));
let download_hash = { let download_hash = {
let mut file = match tokio::fs::File::open(&download_part_path).await { let mut file = match tokio::fs::File::open(&download_part_path).await {
Ok(f) => f, Ok(f) => f,
Err(e) => { Err(_) => {
println!(
"[download] ERROR: Failed to open .part file for hashing: {}",
e
);
return "-1".to_string(); return "-1".to_string();
} }
}; };
let mut hasher = Sha512::new(); let mut hasher = Sha512::new();
let mut bytes_hashed: u64 = 0;
let mut buffer = [0u8; 8192]; let mut buffer = [0u8; 8192];
loop { loop {
let bytes_read = match file.read(&mut buffer).await { let bytes_read = match file.read(&mut buffer).await {
Ok(n) => n, Ok(n) => n,
Err(e) => { Err(_) => {
println!(
"[download] ERROR: Failed to read file during hashing: {}",
e
);
return "-1".to_string(); return "-1".to_string();
} }
}; };
@@ -427,18 +347,12 @@ async fn download(
break; break;
} }
hasher.update(&buffer[..bytes_read]); hasher.update(&buffer[..bytes_read]);
bytes_hashed += bytes_read as u64;
} }
drop(file); drop(file);
println!("[download] Hashed {} bytes", bytes_hashed); hex::encode(hasher.finalize())
format!("{:x}", hasher.finalize())
}; };
println!("[download] Expected hash: {}", hash);
println!("[download] Computed hash: {}", download_hash);
if hash != download_hash { if hash != download_hash {
println!("[download] ERROR: Hash mismatch! Deleting corrupt .part file.");
let _ = tokio::fs::remove_file(&download_part_path).await; let _ = tokio::fs::remove_file(&download_part_path).await;
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
@@ -447,10 +361,7 @@ async fn download(
return "-1".to_string(); return "-1".to_string();
} }
println!("[download] Hash verified OK"); if let Err(_) = tokio::fs::rename(&download_part_path, &download_zip_path).await {
println!("[download] Renaming .part -> .zip: {:?}", download_zip_path);
if let Err(e) = tokio::fs::rename(&download_part_path, &download_zip_path).await {
println!("[download] ERROR: Failed to rename .part to .zip: {}", e);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
progress: Some(0), progress: Some(0),
@@ -460,7 +371,6 @@ async fn download(
let _ = tokio::fs::create_dir_all(&game_path.join(&name)).await; let _ = tokio::fs::create_dir_all(&game_path.join(&name)).await;
println!("[download] Unzipping to: {:?}", game_path.join(&name));
let unzip_res = unzip_to_dir( let unzip_res = unzip_to_dir(
app.clone(), app.clone(),
download_zip_path.clone(), download_zip_path.clone(),
@@ -477,11 +387,9 @@ async fn download(
) )
.await; .await;
println!("[download] Removing zip file: {:?}", download_zip_path);
let _ = tokio::fs::remove_file(&download_zip_path).await; let _ = tokio::fs::remove_file(&download_zip_path).await;
if unzip_res == "-1" { if unzip_res == "-1" {
println!("[download] ERROR: Unzip failed for '{}'", name);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
progress: Some(0), progress: Some(0),
@@ -489,10 +397,6 @@ async fn download(
return "-1".to_string(); return "-1".to_string();
} }
println!(
"[download] SUCCESS: '{}' downloaded, verified, and extracted",
&name
);
let _ = window.set_progress_bar(ProgressBarState { let _ = window.set_progress_bar(ProgressBarState {
status: Some(ProgressBarStatus::None), status: Some(ProgressBarStatus::None),
progress: Some(0), progress: Some(0),
@@ -612,7 +516,6 @@ fn verify_signature(body: String, signature: String, public_key: String) -> bool
#[tauri::command] #[tauri::command]
async fn cancel_download(name: String) { async fn cancel_download(name: String) {
println!("[cancel_download] Cancellation requested for '{}'", name);
cancel_map().insert(name.clone(), true); cancel_map().insert(name.clone(), true);
} }
@@ -620,6 +523,8 @@ async fn cancel_download(name: String) {
pub fn run() { pub fn run() {
#[allow(unused_variables)] #[allow(unused_variables)]
tauri::Builder::default() tauri::Builder::default()
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_store::Builder::new().build())
.plugin(tauri_plugin_http::init()) .plugin(tauri_plugin_http::init())
.plugin( .plugin(
tauri_plugin_prevent_default::Builder::new() tauri_plugin_prevent_default::Builder::new()
@@ -658,17 +563,92 @@ pub fn run() {
cancel_download cancel_download
]) ])
.setup(|app| { .setup(|app| {
let window = app.get_webview_window("main").unwrap();
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {
use tauri_plugin_decorum::WebviewWindowExt; use tauri_plugin_decorum::WebviewWindowExt;
if let Some(main_window) = app.get_webview_window("main") { if let Err(e) = window.create_overlay_titlebar() {
if let Err(e) = main_window.create_overlay_titlebar() { eprintln!("Failed to create overlay titlebar: {:?}", e);
eprintln!("Failed to create overlay titlebar: {:?}", e);
}
} }
} }
#[cfg(not(debug_assertions))]
{
let handle = app.handle().clone();
tauri::async_runtime::spawn(async move {
update(handle, window.clone()).await.unwrap();
});
}
#[cfg(debug_assertions)]
{
let mut new_url = app.config().build.dev_url.clone().unwrap();
new_url.set_path("/main");
window.navigate(new_url).unwrap();
}
Ok(()) Ok(())
}) })
.run(tauri::generate_context!()) .run(tauri::generate_context!())
.expect("error while running tauri application"); .expect("error while running tauri application");
} }
#[cfg(not(debug_assertions))]
async fn update(
app: tauri::AppHandle,
window: tauri::WebviewWindow,
) -> tauri_plugin_updater::Result<()> {
let target = {
#[cfg(target_os = "linux")]
{
if std::path::Path::new("/etc/debian_version").exists() {
"linux-debian"
} else if std::path::Path::new("/etc/redhat-release").exists() {
"linux-fedora"
} else {
let mut new_url = window.url().unwrap();
new_url.set_path("/update/outdated");
window.navigate(new_url).unwrap();
return Ok(());
}
}
#[cfg(not(target_os = "linux"))]
{
tauri_plugin_updater::target().unwrap_or("unknown".to_string())
}
};
if let Some(update) = app
.updater_builder()
.target(target)
.build()?
.check()
.await?
{
let mut new_url = window.url().unwrap();
new_url.set_path("/update/updating");
window.navigate(new_url).unwrap();
let mut downloaded = 0;
update
.download_and_install(
|chunk_length, content_length| {
downloaded += chunk_length;
println!("downloaded {downloaded} from {content_length:?}");
},
|| {
println!("download finished");
},
)
.await?;
println!("update installed");
app.restart();
}
let mut new_url = window.url().unwrap();
new_url.set_path("/main");
window.navigate(new_url).unwrap();
Ok(())
}
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Lncvrt Games Launcher", "productName": "Lncvrt Games Launcher",
"version": "1.8.0", "version": "1.9.0",
"identifier": "xyz.lncvrt.games-launcher", "identifier": "xyz.lncvrt.games-launcher",
"build": { "build": {
"beforeDevCommand": "next dev --webpack", "beforeDevCommand": "next dev --webpack",
+14 -2
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Lncvrt Games Launcher", "productName": "Lncvrt Games Launcher",
"version": "1.8.0", "version": "1.9.0",
"identifier": "xyz.lncvrt.games-launcher", "identifier": "xyz.lncvrt.games-launcher",
"build": { "build": {
"beforeDevCommand": "next dev --webpack", "beforeDevCommand": "next dev --webpack",
@@ -13,6 +13,7 @@
"windows": [ "windows": [
{ {
"title": "Lncvrt Games Launcher", "title": "Lncvrt Games Launcher",
"url": "/update/checking",
"width": 1000, "width": 1000,
"height": 600, "height": 600,
"minWidth": 875, "minWidth": 875,
@@ -24,6 +25,17 @@
} }
}, },
"bundle": { "bundle": {
"active": false "active": true,
"targets": ["deb", "rpm"],
"icon": ["icons/icon.png"],
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}"
]
}
} }
} }
+14 -4
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Lncvrt Games Launcher", "productName": "Lncvrt Games Launcher",
"version": "1.8.0", "version": "1.9.0",
"identifier": "xyz.lncvrt.games-launcher", "identifier": "xyz.lncvrt.games-launcher",
"build": { "build": {
"beforeDevCommand": "next dev --webpack", "beforeDevCommand": "next dev --webpack",
@@ -14,6 +14,7 @@
"windows": [ "windows": [
{ {
"title": "Lncvrt Games Launcher", "title": "Lncvrt Games Launcher",
"url": "/update/checking",
"width": 1000, "width": 1000,
"height": 600, "height": 600,
"minWidth": 875, "minWidth": 875,
@@ -28,10 +29,19 @@
}, },
"bundle": { "bundle": {
"active": true, "active": true,
"targets": ["app"], "targets": ["dmg", "app"],
"icon": ["icons/icon.icns"],
"createUpdaterArtifacts": true,
"macOS": { "macOS": {
"minimumSystemVersion": "13.0" "minimumSystemVersion": "13.0"
}, }
"icon": ["icons/icon.icns"] },
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}"
]
}
} }
} }
+14 -5
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Lncvrt Games Launcher", "productName": "Lncvrt Games Launcher",
"version": "1.8.0", "version": "1.9.0",
"identifier": "xyz.lncvrt.games-launcher", "identifier": "xyz.lncvrt.games-launcher",
"build": { "build": {
"beforeDevCommand": "next dev --webpack", "beforeDevCommand": "next dev --webpack",
@@ -14,12 +14,11 @@
"windows": [ "windows": [
{ {
"title": "Lncvrt Games Launcher", "title": "Lncvrt Games Launcher",
"url": "/update/checking",
"width": 1000, "width": 1000,
"height": 632, "height": 632,
"minWidth": 875, "minWidth": 875,
"minHeight": 532, "minHeight": 532,
"titleBarStyle": "Overlay",
"hiddenTitle": true,
"decorations": false, "decorations": false,
"shadow": true "shadow": true
} }
@@ -29,7 +28,17 @@
} }
}, },
"bundle": { "bundle": {
"active": false, "active": true,
"icon": ["icons/icon.ico"] "targets": ["msi"],
"icon": ["icons/icon.ico"],
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERFODI3MTAwQkNBMjE4REEKUldUYUdLSzhBSEdDM3J0N1NvbENsdDQ3c3BOdWlFajErVnlLZitSc2l5WVI0VjQ1ZHNMWjYzaUwK",
"endpoints": [
"https://games.lncvrt.xyz/api/launcher/update?target={{target}}&arch={{arch}}&currentVersion={{current_version}}"
]
}
} }
} }
File renamed without changes.
@@ -1,14 +1,14 @@
'use client' 'use client'
import './styles.css'
import { useCallback, useEffect, useState } from 'react' import { useCallback, useEffect, useState } from 'react'
import { BirdColor } from '@/types/BerryDash/BirdColor' import { BirdColor } from '@/types/BerryDash/BirdColor'
import { GetIconForUser } from '@/lib/BerryDash' import { GetIconForUser } from '@/lib/berrydashutil'
import Image from 'next/image' import Image from 'next/image'
import './styles.css'
import { useRouter } from 'next/navigation' import { useRouter } from 'next/navigation'
import { platform } from '@tauri-apps/plugin-os' import { platform } from '@tauri-apps/plugin-os'
import { fetch } from '@tauri-apps/plugin-http' import { fetch } from '@tauri-apps/plugin-http'
import { verifySignature } from '@/lib/Util' import { verifySignature } from '@/lib/util'
interface BaseEntry { interface BaseEntry {
id: number id: number
@@ -174,7 +174,7 @@ export default function BerryDashLeaderboards () {
<button <button
className='button btntheme1' className='button btntheme1'
onClick={() => { onClick={() => {
if (selected == -1) router.push('/game?id=1') if (selected == -1) router.push('/main/game?id=1')
else { else {
setSelected(-1) setSelected(-1)
setSelectedBerryOption(0) setSelectedBerryOption(0)
@@ -1,37 +1,35 @@
'use client' 'use client'
import '../Installs.css'
import { useEffect } from 'react' import { useEffect } from 'react'
import '@/app/Installs.css'
import { invoke } from '@tauri-apps/api/core' import { invoke } from '@tauri-apps/api/core'
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { useRouter, useSearchParams } from 'next/navigation' import { useRouter, useSearchParams } from 'next/navigation'
import { platform } from '@tauri-apps/plugin-os' import { platform } from '@tauri-apps/plugin-os'
import { faWarning } from '@fortawesome/free-solid-svg-icons' import { faWarning } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { ask } from '@tauri-apps/plugin-dialog' import { ask } from '@tauri-apps/plugin-dialog'
import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs'
import { writeVersionsConfig } from '@/lib/BazookaManager' import { openFolder } from '@/lib/util'
import { openFolder } from '@/lib/Util'
export default function Installs () { export default function Installs () {
const { const {
versionsList,
serverVersionList,
showPopup, showPopup,
setShowPopup, setShowPopup,
setPopupMode, setPopupMode,
setFadeOut, setFadeOut,
setSelectedVersionList, setSelectedVersionList,
downloadedVersionsConfig,
normalConfig,
setManagingVersion, setManagingVersion,
getVersionInfo,
getGameInfo,
setSelectedGame, setSelectedGame,
serverVersionList,
category, category,
setCategory, setCategory,
setDownloadedVersionsConfig,
downloadVersions, downloadVersions,
downloadProgress downloadProgress,
linuxUseWine,
linuxWineCommand,
versions
} = useGlobal() } = useGlobal()
const params = useSearchParams() const params = useSearchParams()
@@ -43,7 +41,7 @@ export default function Installs () {
useEffect(() => { useEffect(() => {
if (!showPopup) return if (!showPopup) return
setSelectedVersionList([]) setSelectedVersionList([])
}, [normalConfig, setSelectedVersionList, showPopup]) }, [setSelectedVersionList, showPopup])
if (!id || !game) return <p>Invalid game</p> if (!id || !game) return <p>Invalid game</p>
@@ -54,10 +52,7 @@ export default function Installs () {
if (!lastRevision) return false if (!lastRevision) return false
return ( return (
lastRevision > 0 && lastRevision > 0 &&
(downloadedVersionsConfig == undefined (versionsList == undefined ? 0 : versionsList[version]) / 1000 <=
? 0
: downloadedVersionsConfig?.list[version]) /
1000 <=
lastRevision lastRevision
) )
} }
@@ -80,7 +75,7 @@ export default function Installs () {
<button <button
className='button btntheme1' className='button btntheme1'
onClick={() => { onClick={() => {
router.push('/game/berrydash/leaderboards') router.push('/main/game/berrydash/leaderboards')
}} }}
title='View the leaderboards for this game.' title='View the leaderboards for this game.'
hidden={game.id != 1} hidden={game.id != 1}
@@ -121,19 +116,14 @@ export default function Installs () {
> >
{category == -1 && {category == -1 &&
Object.entries(game.categoryNames) Object.entries(game.categoryNames)
.sort(([a], [b]) => Number(b) - Number(a))
.filter(([key]) => { .filter(([key]) => {
const count = Object.keys( const count = Object.keys(versionsList).filter(v => {
downloadedVersionsConfig?.list ?? {} const info = serverVersionList?.versions.find(
).filter(v => { vf => vf.id == v
const info = getVersionInfo(v) )
if (!info) return false if (!info) return false
if ( if (platform() == 'linux' && info.wine && !linuxUseWine)
platform() == 'linux' &&
info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded
)
return false return false
return info.game === id && info.category === Number(key) return info.game === id && info.category === Number(key)
@@ -141,6 +131,7 @@ export default function Installs () {
return count >= 1 return count >= 1
}) })
.sort(([a], [b]) => Number(b) - Number(a))
.map(([key, value]) => { .map(([key, value]) => {
return ( return (
<div <div
@@ -160,16 +151,15 @@ export default function Installs () {
<p> <p>
{(() => { {(() => {
const count = const count =
Object.keys( Object.keys(versionsList).filter(v => {
downloadedVersionsConfig?.list ?? [] const info = serverVersionList?.versions.find(
).filter(v => { vf => vf.id == v
const info = getVersionInfo(v) )
if (!info) return false if (!info) return false
if ( if (
platform() == 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!normalConfig?.settings !linuxUseWine
.useWineOnUnixWhenNeeded
) )
return false return false
return ( return (
@@ -185,48 +175,40 @@ export default function Installs () {
</div> </div>
) )
})} })}
{Object.keys(downloadedVersionsConfig?.list ?? []).filter(v => { {Object.keys(versionsList)
const info = getVersionInfo(v) .filter(v => {
if (!info) return false const info = serverVersionList?.versions.find(vf => vf.id == v)
return info.game === id if (!info) return false
}).length != 0 ? ( if (platform() == 'linux' && info.wine && !linuxUseWine)
Object.keys(downloadedVersionsConfig?.list ?? []) return false
.sort((a, b) => { return (
const infoA = getVersionInfo(a) info.game === id &&
const infoB = getVersionInfo(b) (category == -1
if (!infoA || !infoB) return -1 ? info.category == -1
return infoB.place - infoA.place : info.category == category)
}) )
.filter(v => { })
const info = getVersionInfo(v) .sort((a, b) => {
if (!info) return false const infoA = serverVersionList?.versions.find(vf => vf.id == a)
if ( const infoB = serverVersionList?.versions.find(vf => vf.id == b)
platform() == 'linux' && if (!infoA || !infoB) return 0
info.wine && return infoB.place - infoA.place
!normalConfig?.settings.useWineOnUnixWhenNeeded })
) .map(v => {
return false const versionInfo = serverVersionList?.versions.find(
return ( vf => vf.id == v
info.game === id && )
(category == -1 if (!versionInfo) return
? info.category == -1
: info.category == category) return (
)
})
.map(entry => (
<div <div
key={entry} key={v}
className={'downloads-entry'} className={'downloads-entry'}
title={ title={
'Click to launch game. Right-click to manage this version install' 'Click to launch game. Right-click to manage this version install'
} }
onClick={async () => { onClick={async () => {
if ( if (needsRevisionUpdate(versionInfo.lastRevision, v)) {
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
) {
const answer = await ask( const answer = await ask(
'Before proceeding, if you do not want your installation directory wiped just yet, please backup the files to another directory. When you click "Yes", it will be wiped. Click "No" if you want to open the installation folder instead.', 'Before proceeding, if you do not want your installation directory wiped just yet, please backup the files to another directory. When you click "Yes", it will be wiped. Click "No" if you want to open the installation folder instead.',
{ {
@@ -250,72 +232,60 @@ export default function Installs () {
setFadeOut(false) setFadeOut(false)
//uninstall //uninstall
setDownloadedVersionsConfig(prev => { versions?.set(
if (!prev) return prev 'list',
const updatedList = Object.fromEntries( Object.fromEntries(
Object.entries(prev.list).filter( Object.entries(versionsList).filter(
([k]) => k !== entry ([k]) => k !== v
) )
) )
const updatedConfig = { )
...prev,
list: updatedList
}
writeVersionsConfig(updatedConfig)
return updatedConfig
})
if ( if (
await exists('game/' + entry, { await exists('game/' + v, {
baseDir: BaseDirectory.AppLocalData baseDir: BaseDirectory.AppLocalData
}) })
) )
await remove('game/' + entry, { await remove('game/' + v, {
baseDir: BaseDirectory.AppLocalData, baseDir: BaseDirectory.AppLocalData,
recursive: true recursive: true
}) })
//reinstall //reinstall
setSelectedVersionList([entry]) setSelectedVersionList([v])
downloadVersions([ downloadVersions([
{ {
id: entry, id: v,
type: 0 type: 0
} }
]) ])
} else { } else {
openFolder(entry) openFolder(v)
} }
return return
} }
const verInfo = getVersionInfo(entry)
if (verInfo == undefined) return
const gameInfo = getGameInfo(verInfo.game)
if (gameInfo == undefined) return
invoke('launch_game', { invoke('launch_game', {
name: verInfo.id, name: versionInfo.id,
executable: verInfo.executable, executable: versionInfo.executable,
displayName: verInfo.displayName, displayName: versionInfo.displayName,
useWine: !!( useWine: !!(
platform() == 'linux' && platform() == 'linux' &&
verInfo.wine && versionInfo.wine &&
normalConfig?.settings.useWineOnUnixWhenNeeded linuxUseWine
), ),
wineCommand: normalConfig?.settings.wineOnUnixCommand wineCommand: linuxWineCommand
}) })
}} }}
onContextMenu={e => { onContextMenu={e => {
e.preventDefault() e.preventDefault()
setManagingVersion(entry) setManagingVersion(v)
setPopupMode(2) setPopupMode(2)
setShowPopup(true) setShowPopup(true)
setFadeOut(false) setFadeOut(false)
}} }}
> >
<div className='h-18 w-screen relative'> <div className='h-18 w-screen relative'>
<p className='text-2xl'> <p className='text-2xl'>{versionInfo.displayName}</p>
{getVersionInfo(entry)?.displayName}{' '}
</p>
<div className='flex gap-2 absolute left-0 bottom-0'> <div className='flex gap-2 absolute left-0 bottom-0'>
<div <div
@@ -325,7 +295,7 @@ export default function Installs () {
<p> <p>
Installed{' '} Installed{' '}
{new Intl.DateTimeFormat(undefined).format( {new Intl.DateTimeFormat(undefined).format(
downloadedVersionsConfig?.list[entry] versionsList[v]
)} )}
</p> </p>
</div> </div>
@@ -333,13 +303,8 @@ export default function Installs () {
className='entry-info-item' className='entry-info-item'
title='This version is using wine. It cannot be guarenteed to work fully and might not work at all.' title='This version is using wine. It cannot be guarenteed to work fully and might not work at all.'
hidden={ hidden={
!( !(platform() == 'linux' && versionInfo.wine) ||
platform() == 'linux' && getVersionInfo(entry)?.wine needsRevisionUpdate(versionInfo.lastRevision, v)
) ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,
entry
)
} }
> >
<FontAwesomeIcon icon={faWarning} color='#ffc800' /> <FontAwesomeIcon icon={faWarning} color='#ffc800' />
@@ -348,10 +313,7 @@ export default function Installs () {
<div <div
className='entry-info-item' className='entry-info-item'
hidden={ hidden={
!needsRevisionUpdate( !needsRevisionUpdate(versionInfo.lastRevision, v)
getVersionInfo(entry)?.lastRevision,
entry
)
} }
> >
<FontAwesomeIcon icon={faWarning} color='#ffc800' /> <FontAwesomeIcon icon={faWarning} color='#ffc800' />
@@ -365,45 +327,41 @@ export default function Installs () {
e.stopPropagation() e.stopPropagation()
if ( if (
!(await exists('game/' + entry + '/BepInEx', { !(await exists('game/' + v + '/BepInEx', {
baseDir: BaseDirectory.AppLocalData baseDir: BaseDirectory.AppLocalData
})) }))
) { ) {
if ( if (
(await ask( (await ask(
"You don't have BepInEx (the mod loader for Unity Games), would you like to install it now? It is about 1MB in size. If you choose yes, it will download the recommended BepInEx version for " + "You don't have BepInEx (the mod loader for Unity Games), would you like to install it now? It is about 1MB in size. If you choose yes, it will download the recommended BepInEx version for " +
getVersionInfo(entry)?.displayName + versionInfo.displayName +
'.', '.',
{ title: 'BepInEx not found!', kind: 'error' } { title: 'BepInEx not found!', kind: 'error' }
)) && )) &&
!downloadProgress.find(d => d.version == entry) !downloadProgress.find(d => d.version == v)
) { ) {
downloadVersions([ downloadVersions([
{ {
id: entry, id: v,
type: 1 type: 1
} }
]) ])
} }
return return
} }
setManagingVersion(entry) setManagingVersion(v)
setPopupMode(3) setPopupMode(3)
setShowPopup(true) setShowPopup(true)
setFadeOut(false) setFadeOut(false)
}} }}
hidden={!getVersionInfo(entry)?.modSupportDownload} hidden={!versionInfo.modSupportDownload}
> >
Mod Manager Mod Manager
</button> </button>
</div> </div>
</div> </div>
)) )
) : ( })}
<div className='flex justify-center items-center h-full'>
<p className='text-3xl'>No versions installed</p>
</div>
)}
</div> </div>
</div> </div>
</div> </div>
+257 -199
View File
@@ -1,45 +1,44 @@
'use client' 'use client'
import './Globals.css' import '@/styles/globals.css'
import { useCallback, useEffect, useRef, useState } from 'react' import { useCallback, useEffect, useRef, useState } from 'react'
import Sidebar from '@/componets/Sidebar' import Sidebar from '@/components/Sidebar'
import { DownloadProgress } from '@/types/DownloadProgress' import { DownloadProgress } from '@/types/DownloadProgress'
import { invoke } from '@tauri-apps/api/core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faChevronLeft, faXmark } from '@fortawesome/free-solid-svg-icons'
import {
readNormalConfig,
readVersionsConfig,
writeVersionsConfig
} from '@/lib/BazookaManager'
import { VersionsConfig } from '@/types/VersionsConfig'
import { NormalConfig } from '@/types/NormalConfig'
import { app } from '@tauri-apps/api' import { app } from '@tauri-apps/api'
import { openUrl } from '@tauri-apps/plugin-opener' import { GlobalProvider } from '@/providers/GlobalProvider'
import { GlobalProvider } from './GlobalProvider'
import { Roboto } from 'next/font/google' import { Roboto } from 'next/font/google'
import { ServerVersionsResponse } from '@/types/ServerVersionsResponse' import { ServerVersionsResponse } from '@/types/ServerVersionsResponse'
import { GameVersion } from '@/types/GameVersion'
import { Game } from '@/types/Game'
import { listen } from '@tauri-apps/api/event' import { listen } from '@tauri-apps/api/event'
import { usePathname } from 'next/navigation' import { usePathname } from 'next/navigation'
import { arch, platform } from '@tauri-apps/plugin-os' import { arch, platform } from '@tauri-apps/plugin-os'
import { notifyUser } from '@/lib/Notifications'
import { import {
isPermissionGranted, isPermissionGranted,
requestPermission requestPermission
} from '@tauri-apps/plugin-notification' } from '@tauri-apps/plugin-notification'
import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' import {
BaseDirectory,
copyFile,
exists,
readTextFile,
remove
} from '@tauri-apps/plugin-fs'
import { fetch } from '@tauri-apps/plugin-http' import { fetch } from '@tauri-apps/plugin-http'
import { verifySignature } from '@/lib/Util' import { verifySignature } from '@/lib/util'
import { getCurrentWindow, UserAttentionType } from '@tauri-apps/api/window' import { getCurrentWindow, UserAttentionType } from '@tauri-apps/api/window'
import VersionsDownloadPopup from '@/componets/popups/VersionsDownload'
import GamesDownloadPopup from '@/componets/popups/GamesDownload'
import DownloadsPopup from '@/componets/popups/Downloads'
import ManageVersionPopup from '@/componets/popups/ManageVersion'
import ModDownloadsPopup from '@/componets/popups/ModDownloads'
import { Mod } from '@/types/Mod' import { Mod } from '@/types/Mod'
import { load, Store } from '@tauri-apps/plugin-store'
import { notifyUser } from '@/lib/notifications'
import { GameVersion } from '@/types/GameVersion'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faChevronLeft, faXmark } from '@fortawesome/free-solid-svg-icons'
import { invoke } from '@tauri-apps/api/core'
import VersionsDownloadPopup from '@/popups/VersionsDownload'
import GamesDownloadPopup from '@/popups/GamesDownload'
import DownloadsPopup from '@/popups/Downloads'
import ManageVersionPopup from '@/popups/ManageVersion'
import ModDownloadsPopup from '@/popups/ModDownloads'
import VersionChangelogPopup from '@/popups/VersionChangelog'
const roboto = Roboto({ const roboto = Roboto({
subsets: ['latin'] subsets: ['latin']
@@ -52,7 +51,6 @@ export default function RootLayout ({
}) { }) {
const [loading, setLoading] = useState(true) const [loading, setLoading] = useState(true)
const [loadingText, setLoadingText] = useState('Loading...') const [loadingText, setLoadingText] = useState('Loading...')
const [outdated, setOutdated] = useState(false)
const [version, setVersion] = useState<string | null>(null) const [version, setVersion] = useState<string | null>(null)
const [platformName, setPlatformName] = useState<string | null>(null) const [platformName, setPlatformName] = useState<string | null>(null)
@@ -60,10 +58,6 @@ export default function RootLayout ({
useState<null | ServerVersionsResponse>(null) useState<null | ServerVersionsResponse>(null)
const [selectedVersionList, setSelectedVersionList] = useState<string[]>([]) const [selectedVersionList, setSelectedVersionList] = useState<string[]>([])
const [downloadedVersionsConfig, setDownloadedVersionsConfig] =
useState<VersionsConfig | null>(null)
const [normalConfig, setNormalConfig] = useState<NormalConfig | null>(null)
const [showPopup, setShowPopup] = useState(false) const [showPopup, setShowPopup] = useState(false)
const [popupMode, setPopupMode] = useState<null | number>(null) const [popupMode, setPopupMode] = useState<null | number>(null)
const [fadeOut, setFadeOut] = useState(false) const [fadeOut, setFadeOut] = useState(false)
@@ -84,20 +78,30 @@ export default function RootLayout ({
const pathname = usePathname() const pathname = usePathname()
const revisionCheck = useRef(false) const revisionCheck = useRef(false)
const [settings, setSettings] = useState<Store | null>(null)
const [versions, setVersions] = useState<Store | null>(null)
const [notificationsAllowed, setNotificationsAllowed] =
useState<boolean>(false)
const [sidebarAlwaysShowGames, setSidebarAlwaysShowGames] =
useState<boolean>(false)
const [linuxUseWine, setLinuxUseWine] = useState<boolean>(false)
const [linuxWineCommand, setLinuxWineCommand] =
useState<string>('wine %path%')
const [theme, setTheme] = useState<string>('dark')
const [versionsList, setVersionsList] = useState<Record<string, number>>({})
const [modsList, setModsList] = useState<
Record<string, Record<string, number>>
>({})
function getSpecialVersionsList (game?: number): GameVersion[] { function getSpecialVersionsList (game?: number): GameVersion[] {
if (!normalConfig || !serverVersionList) return [] if (!serverVersionList) return []
return serverVersionList.versions return serverVersionList.versions
.filter( .filter(v => !Object.keys(versionsList).includes(v.id))
v => !Object.keys(downloadedVersionsConfig?.list ?? []).includes(v.id)
)
.filter(v => { .filter(v => {
if ( if (platformName == 'linux' && v.wine && linuxUseWine) return false
platformName == 'linux' &&
v.wine &&
!normalConfig.settings.useWineOnUnixWhenNeeded
)
return false
if (game && v.game != game) return false if (game && v.game != game) return false
if (category != -1 && v.category != category) return false if (category != -1 && v.category != category) return false
@@ -112,63 +116,6 @@ export default function RootLayout ({
}) })
} }
const getVersionInfo = useCallback(
(id: string | undefined): GameVersion | undefined => {
if (!id) return undefined
return serverVersionList?.versions.find(v => v.id === id)
},
[serverVersionList]
)
const getGameInfo = useCallback(
(game: number | undefined): Game | undefined => {
if (!game) return undefined
return serverVersionList?.games.find(g => g.id === game)
},
[serverVersionList]
)
function getListOfGames (): Game[] {
if (!downloadedVersionsConfig?.list) return []
const gamesMap = new Map<number, Game>()
Object.keys(downloadedVersionsConfig.list).forEach(i => {
const version = getVersionInfo(i)
if (!version) return
const game = getGameInfo(version.game)
if (!game) return
gamesMap.set(game.id, game)
})
return Array.from(gamesMap.values())
}
function getVersionsAmountData (gameId: number): {
installed: number
total: number
} | null {
if (!downloadedVersionsConfig || !serverVersionList) return null
const allowWine =
platformName !== 'linux' || normalConfig?.settings.useWineOnUnixWhenNeeded
const installed = Object.keys(downloadedVersionsConfig.list).filter(v => {
const info = getVersionInfo(v)
if (!info) return false
if (info.wine && !allowWine) return false
return getGameInfo(info.game)?.id === gameId
}).length
const total = serverVersionList.versions.filter(v => {
if (!v) return false
if (v.wine && !allowWine) return false
return getGameInfo(v.game)?.id === gameId
}).length
return { installed, total }
}
const closePopup = useCallback(() => { const closePopup = useCallback(() => {
if (popupMode == 0 && selectedGame && pathname === '/') { if (popupMode == 0 && selectedGame && pathname === '/') {
setSelectedGame(null) setSelectedGame(null)
@@ -178,6 +125,8 @@ export default function RootLayout ({
setPopupMode(0) setPopupMode(0)
} else if (popupMode == 3 && showModInfo) { } else if (popupMode == 3 && showModInfo) {
setShowModInfo(null) setShowModInfo(null)
} else if (popupMode == 4) {
setPopupMode(2)
} else { } else {
setFadeOut(true) setFadeOut(true)
setTimeout(() => setShowPopup(false), 200) setTimeout(() => setShowPopup(false), 200)
@@ -316,27 +265,6 @@ export default function RootLayout ({
setPlatformName(platform()) setPlatformName(platform())
const client = await app.getVersion() const client = await app.getVersion()
setVersion(client) setVersion(client)
if (process.env.NODE_ENV === 'production') {
try {
const response = await fetch(
'https://games.lncvrt.xyz/api/launcher/latest'
)
const signature = response.headers.get('x-signature') ?? ''
const data = await response.text()
if (await verifySignature(data, signature)) {
if (data !== client) {
setOutdated(true)
return
}
} else {
setLoadingText('Failed to check latest version.')
return
}
} catch {
setLoadingText('Failed to check latest version.')
return
}
}
try { try {
const response = await fetch( const response = await fetch(
`https://games.lncvrt.xyz/api/launcher/versions?platform=${platform()}&arch=${arch()}` `https://games.lncvrt.xyz/api/launcher/versions?platform=${platform()}&arch=${arch()}`
@@ -353,10 +281,113 @@ export default function RootLayout ({
setLoadingText('Failed to download versions list.') setLoadingText('Failed to download versions list.')
return return
} }
const normalConfig = await readNormalConfig() const legacyOptions = {
const versionsConfig = await readVersionsConfig() baseDir: BaseDirectory.AppLocalData
setDownloadedVersionsConfig(versionsConfig) }
setNormalConfig(normalConfig) if (
platform() == 'windows' &&
(await exists('versions.json', legacyOptions))
) {
if (
await exists('versions.json', {
baseDir: BaseDirectory.AppConfig
})
)
await remove('versions.json', {
baseDir: BaseDirectory.AppConfig
})
await copyFile('versions.json', 'versions.json', {
fromPathBaseDir: BaseDirectory.AppLocalData,
toPathBaseDir: BaseDirectory.AppConfig
})
await remove('versions.json', legacyOptions)
}
const settingsLocal = await load('settings.json', {
autoSave: true,
defaults: {
version: client,
notificationsAllowed: true,
sidebarAlwaysShowGames: true,
linuxUseWine: false,
linuxWineCommand: 'wine %path%',
theme: 'dark'
}
})
const versionsLocal = await load('versions.json', {
autoSave: true,
defaults: {
version: client,
list: {},
mods: {}
}
})
settingsLocal.set('version', client)
versionsLocal.set('version', client)
if (await exists('config.json', legacyOptions)) {
const config = await readTextFile('config.json', legacyOptions)
const raw = JSON.parse(config)
if (
raw.settings &&
raw.settings.theme &&
(raw.version == '1.0.0' ||
raw.version == '1.1.0' ||
raw.version == '1.1.1' ||
raw.version == '1.2.0' ||
raw.version == '1.3.0' ||
raw.version == '1.3.1' ||
raw.version == '1.4.0' ||
raw.version == '1.5.0' ||
raw.version == '1.5.1' ||
raw.version == '1.5.2' ||
raw.version == '1.5.3' ||
raw.version == '1.5.4')
) {
const parsed = Number(raw.settings.theme)
if (parsed == 3) raw.settings.theme = 2
if (parsed == 4) raw.settings.theme = 3
else if (parsed != 0 && parsed != 1) raw.settings.theme = 0
}
if (raw.settings.allowNotifications)
settingsLocal?.set(
'notificationsAllowed',
Boolean(raw.settings.allowNotifications)
)
if (raw.settings.alwaysShowGamesInSidebar)
settingsLocal?.set(
'sidebarAlwaysShowGames',
Boolean(raw.settings.alwaysShowGamesInSidebar)
)
if (raw.settings.useWineOnUnixWhenNeeded)
settingsLocal?.set(
'linuxUseWine',
Boolean(raw.settings.useWineOnUnixWhenNeeded)
)
if (raw.settings.wineOnUnixCommand)
settingsLocal?.set(
'linuxWineCommand',
String(raw.settings.wineOnUnixCommand)
)
if (raw.settings.theme) {
const tempTheme = (() => {
switch (Number(raw.settings.theme)) {
case 1:
return 'red'
case 2:
return 'blue'
case 3:
return 'purple'
default:
return 'dark'
}
})()
settingsLocal?.set('theme', tempTheme)
}
await remove('config.json', legacyOptions)
}
setSettings(settingsLocal)
setVersions(versionsLocal)
setLoading(false) setLoading(false)
if (!(await isPermissionGranted())) { if (!(await isPermissionGranted())) {
@@ -431,7 +462,7 @@ export default function RootLayout ({
const versionId = downloadQueue[0] const versionId = downloadQueue[0]
const downloadInfo = downloadProgress.find(d => d.version == versionId) const downloadInfo = downloadProgress.find(d => d.version == versionId)
if (!downloadInfo) return if (!downloadInfo) return
const info = getVersionInfo(versionId) const info = serverVersionList?.versions.find(vf => vf.id == versionId)
if (!info) { if (!info) {
setDownloadProgress(prev => prev.filter(d => d.version !== versionId)) setDownloadProgress(prev => prev.filter(d => d.version !== versionId))
@@ -440,7 +471,7 @@ export default function RootLayout ({
return return
} }
const gameInfo = getGameInfo(info.game) const gameInfo = serverVersionList?.games.find(vf => vf.id == info.game)
if (!gameInfo) { if (!gameInfo) {
setDownloadProgress(prev => prev.filter(d => d.version !== versionId)) setDownloadProgress(prev => prev.filter(d => d.version !== versionId))
setDownloadQueue(prev => prev.slice(1)) setDownloadQueue(prev => prev.slice(1))
@@ -475,7 +506,7 @@ export default function RootLayout ({
: d : d
) )
) )
if (normalConfig?.settings.allowNotifications) if (await settings?.get<boolean>('notifications-allowed'))
await notifyUser( await notifyUser(
'Download Failed', 'Download Failed',
`The download for version ${info.displayName} has failed.` `The download for version ${info.displayName} has failed.`
@@ -510,31 +541,19 @@ export default function RootLayout ({
if (res === '1') { if (res === '1') {
setDownloadProgress(prev => prev.filter(d => d.version !== versionId)) setDownloadProgress(prev => prev.filter(d => d.version !== versionId))
if (downloadInfo.type != 1) { if (downloadInfo.type != 1) {
setDownloadedVersionsConfig(prev => { if (downloadInfo.type == 2) {
if (!prev) return prev versions?.set('mods', {
...modsList,
const updated = [downloadInfo.modGame! + '-' + downloadInfo.modId!]: {
downloadInfo.type == 2 [downloadInfo.modVersion!]: Date.now()
? { }
...prev, })
mods: { } else {
...prev.mods, versions?.set('list', {
[downloadInfo.modGame! + '-' + downloadInfo.modId!]: { ...versionsList,
[downloadInfo.modVersion!]: Date.now() [versionId]: Date.now()
} })
} }
}
: {
...prev,
list: {
...prev.list,
[versionId]: Date.now()
}
}
writeVersionsConfig(updated)
return updated
})
} }
} else if (res == '0') { } else if (res == '0') {
setDownloadProgress(prev => { setDownloadProgress(prev => {
@@ -560,7 +579,7 @@ export default function RootLayout ({
: d : d
) )
) )
if (normalConfig?.settings.allowNotifications) if (await settings?.get<boolean>('notifications-allowed'))
await notifyUser( await notifyUser(
'Download Failed', 'Download Failed',
`The download for version ${info.displayName} has failed.` `The download for version ${info.displayName} has failed.`
@@ -578,20 +597,20 @@ export default function RootLayout ({
}, [ }, [
downloadQueue, downloadQueue,
isProcessingQueue, isProcessingQueue,
getVersionInfo,
getGameInfo,
downloadProgress, downloadProgress,
normalConfig serverVersionList,
settings,
versions,
versionsList,
modsList
]) ])
useEffect(() => { useEffect(() => {
if (revisionCheck.current) return if (revisionCheck.current) return
if (!serverVersionList || !downloadedVersionsConfig) return if (!serverVersionList) return
revisionCheck.current = true revisionCheck.current = true
;(async () => { ;(async () => {
for (const [key, value] of Object.entries( for (const [key, value] of Object.entries(versionsList)) {
downloadedVersionsConfig.list
)) {
const verInfo = serverVersionList.versions.find(item => item.id === key) const verInfo = serverVersionList.versions.find(item => item.id === key)
if ( if (
@@ -610,22 +629,74 @@ export default function RootLayout ({
} }
} }
})() })()
}, [serverVersionList, downloadedVersionsConfig, downloadVersions]) }, [serverVersionList, downloadVersions, versionsList])
useEffect(() => {
if (
downloadProgress.length === 0 &&
downloadQueue.length === 0 &&
showPopup &&
popupMode === 1
) {
setTimeout(async () => {
if (notificationsAllowed) {
await notifyUser('Downloads Complete', 'All downloads finished!')
}
await getCurrentWindow().requestUserAttention(
UserAttentionType.Informational
)
closePopup()
}, 0)
}
}, [
downloadProgress,
downloadQueue,
showPopup,
popupMode,
closePopup,
notificationsAllowed
])
useEffect(() => {
if (!settings || !versions) return
const unlisteners: Promise<() => void>[] = []
function watchSettings<T> (key: string, fn: (v: T | undefined) => void) {
settings!.get<T>(key).then(fn)
unlisteners.push(settings!.onKeyChange<T>(key, fn))
}
function watchVersions<T> (key: string, fn: (v: T | undefined) => void) {
versions!.get<T>(key).then(fn)
unlisteners.push(versions!.onKeyChange<T>(key, fn))
}
watchSettings<string>('theme', v => setTheme(v ?? 'dark'))
watchSettings<boolean>('notificationsAllowed', v =>
setNotificationsAllowed(v ?? true)
)
watchSettings<boolean>('sidebarAlwaysShowGames', v =>
setSidebarAlwaysShowGames(v ?? true)
)
watchSettings<boolean>('linuxUseWine', v => setLinuxUseWine(v ?? false))
watchSettings<string>('linuxWineCommand', v =>
setLinuxWineCommand(v ?? 'wine %path%')
)
watchVersions<Record<string, number>>('list', v => setVersionsList(v ?? {}))
watchVersions<Record<string, Record<string, number>>>('mods', v =>
setModsList(v ?? {})
)
return () => {
unlisteners.forEach(u => u.then(fn => fn()))
}
}, [settings, versions])
return ( return (
<> <>
<html lang='en' className={roboto.className}> <html lang='en' className={roboto.className}>
<body <body className={theme + '-theme'}>
className={
normalConfig?.settings.theme === 1
? 'red-theme'
: normalConfig?.settings.theme === 2
? 'blue-theme'
: normalConfig?.settings.theme === 3
? 'purple-theme'
: 'dark-theme'
}
>
{loading ? ( {loading ? (
<> <>
<div <div
@@ -639,24 +710,7 @@ export default function RootLayout ({
: 'h-screen' : 'h-screen'
} flex items-center justify-center`} } flex items-center justify-center`}
> >
{outdated ? ( <p className='text-7xl text-center'>{loadingText}</p>
<div className='text-center'>
<p className='text-6xl mb-4'>Outdated Launcher!</p>
<p className='text-2xl mb-4'>
Please update to the latest version to continue.
</p>
<button
className='button btntheme1'
onClick={() =>
openUrl('https://games.lncvrt.xyz/download')
}
>
Download latest version!
</button>
</div>
) : (
<p className='text-7xl text-center'>{loadingText}</p>
)}
</div> </div>
</> </>
) : ( ) : (
@@ -673,17 +727,9 @@ export default function RootLayout ({
setPopupMode, setPopupMode,
fadeOut, fadeOut,
setFadeOut, setFadeOut,
downloadedVersionsConfig,
setDownloadedVersionsConfig,
normalConfig,
setNormalConfig,
managingVersion, managingVersion,
setManagingVersion, setManagingVersion,
getVersionInfo,
getGameInfo,
getListOfGames,
setSelectedGame, setSelectedGame,
getVersionsAmountData,
viewingInfoFromDownloads, viewingInfoFromDownloads,
version, version,
downloadVersions, downloadVersions,
@@ -692,11 +738,20 @@ export default function RootLayout ({
downloadQueue, downloadQueue,
setDownloadQueue, setDownloadQueue,
closePopup, closePopup,
getSpecialVersionsList,
selectedGame, selectedGame,
setViewingInfoFromDownloads, setViewingInfoFromDownloads,
showModInfo, showModInfo,
setShowModInfo setShowModInfo,
getSpecialVersionsList,
settings,
versions,
notificationsAllowed,
sidebarAlwaysShowGames,
linuxUseWine,
linuxWineCommand,
theme,
versionsList,
modsList
}} }}
> >
<div <div
@@ -741,7 +796,8 @@ export default function RootLayout ({
selectedGame && selectedGame &&
pathname === '/') || pathname === '/') ||
viewingInfoFromDownloads || viewingInfoFromDownloads ||
(popupMode == 3 && showModInfo) (popupMode == 3 && showModInfo) ||
popupMode == 4
? faChevronLeft ? faChevronLeft
: faXmark : faXmark
} }
@@ -757,6 +813,8 @@ export default function RootLayout ({
<ManageVersionPopup /> <ManageVersionPopup />
) : popupMode === 3 ? ( ) : popupMode === 3 ? (
<ModDownloadsPopup /> <ModDownloadsPopup />
) : popupMode === 4 ? (
<VersionChangelogPopup />
) : null} ) : null}
</div> </div>
</div> </div>
+134
View File
@@ -0,0 +1,134 @@
'use client'
import './Installs.css'
import { useEffect } from 'react'
import { useGlobal } from '@/providers/GlobalProvider'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {
faCheck,
faShieldHalved,
faWarning
} from '@fortawesome/free-solid-svg-icons'
import { platform } from '@tauri-apps/plugin-os'
import { useRouter } from 'next/navigation'
export default function Installs () {
const {
versionsList,
serverVersionList,
showPopup,
setShowPopup,
setPopupMode,
setFadeOut,
setSelectedVersionList,
setSelectedGame,
setCategory
} = useGlobal()
const router = useRouter()
useEffect(() => {
if (!showPopup) return
setSelectedVersionList([])
}, [setSelectedVersionList, showPopup])
return (
<div className='mx-4 mt-4'>
<div className='flex justify-between items-center mb-4'>
<p className='text-3xl'>Games</p>
<button
className='button btntheme1'
onClick={() => {
setSelectedGame(null)
setPopupMode(0)
setShowPopup(true)
setFadeOut(false)
}}
title='Click to download more games.'
>
Download game
</button>
</div>
<div className='downloads-container'>
<div
className={`downloads-scroll ${
platform() == 'windows'
? 'h-[calc(100vh-116px)]'
: 'h-[calc(100vh-84px)]'
}`}
>
{serverVersionList?.games
.filter(g =>
serverVersionList.versions
.filter(v => v.game === g.id)
.some(v => Object.keys(versionsList).includes(v.id))
)
.map(i => (
<div
key={i.id}
className={'downloads-entry'}
title={'Click to view game installs'}
onClick={() => {
setCategory(-1)
router.push('/main/game?id=' + i.id)
}}
>
<div className='h-18 w-screen relative'>
<p className='text-2xl'>{i.name}</p>
<div className='flex gap-2 absolute left-0 bottom-0'>
<div
className='entry-info-item'
title='The amount of versions installed of this game in installed/installable format.'
onClick={e => e.stopPropagation()}
>
<p>
{(() => {
const gameVersions =
serverVersionList.versions.filter(
v => v.game === i.id
)
const installed = gameVersions.filter(v =>
Object.keys(versionsList).includes(v.id)
).length
return gameVersions.length
? `${installed}/${gameVersions.length}`
: 'N/A'
})()}{' '}
versions installed
</p>
</div>
<div
className='entry-info-item'
hidden={!i.official}
title='This game is official.'
onClick={e => e.stopPropagation()}
>
<FontAwesomeIcon icon={faCheck} color='#19c84b' />
<p>Official</p>
</div>
<div
className='entry-info-item'
hidden={i.official}
title={
i.verified
? 'This game is verified to be safe'
: 'This game is not verified to be save. Proceed with caution.'
}
onClick={e => e.stopPropagation()}
>
<FontAwesomeIcon
icon={i.verified ? faShieldHalved : faWarning}
color={i.verified ? '#19c84b' : '#ffc800'}
/>
<p>{i.verified ? 'Verified' : 'Unverified'}</p>
</div>
</div>
</div>
</div>
))}
</div>
</div>
</div>
)
}
+88
View File
@@ -0,0 +1,88 @@
'use client'
import { Setting } from '@/components/Setting'
import { useGlobal } from '@/providers/GlobalProvider'
import { copyToClipboard } from '@/lib/clipboard'
import { platform } from '@tauri-apps/plugin-os'
export default function Settings () {
const {
settings,
version,
notificationsAllowed,
sidebarAlwaysShowGames,
linuxUseWine,
linuxWineCommand,
theme
} = useGlobal()
return (
<>
<p className='text-3xl ml-4 mt-4'>Settings</p>
<div className='ml-4 mt-4 bg-(--col1) border border-(--col3) rounded-lg p-4 w-fit h-fit'>
<Setting
label='Allow sending notifications'
value={notificationsAllowed}
onChange={async () => {
await settings?.set('notificationsAllowed', !notificationsAllowed)
}}
title='This setting does as you expect, allow the launcher to send notifications for when stuff like downloading is done.'
/>
<Setting
label='Always show games in sidebar'
value={sidebarAlwaysShowGames}
onChange={async () => {
await settings?.set(
'sidebarAlwaysShowGames',
!sidebarAlwaysShowGames
)
}}
title="This setting will make it so when you are on a page like this, the games won't disappear."
/>
<Setting
label='Use wine if needed'
value={linuxUseWine}
onChange={async () => {
await settings?.set('linuxUseWine', !linuxUseWine)
}}
className={platform() == 'linux' ? '' : 'hidden'}
/>
<p hidden={!(platform() == 'linux' && linuxUseWine)}>Wine Command:</p>
<input
type='text'
value={linuxWineCommand}
onChange={async e => {
await settings?.set('linuxWineCommand', e.target.value)
}}
className={`input-field my-1 ${
platform() == 'linux' && linuxWineCommand ? '' : 'hidden'
}`}
></input>
<div title='The theme you want the launcher to use.'>
<label className='text-lg'>Theme:</label>
<select
className='ml-2 bg-(--col2) border border-(--col4) rounded-md'
value={theme}
onChange={async e => {
await settings?.set('theme', e.target.value)
}}
>
<option value={'dark'}>Dark (default)</option>
<option value={'red'}>Red</option>
<option value={'blue'}>Blue</option>
<option value={'purple'}>Purple</option>
</select>
</div>
</div>
<p
className='fixed bottom-1.5 right-1.5 rounded-md cursor-pointer px-1 border z-100 transition-colors btntheme1'
onClick={async () =>
await copyToClipboard(`v${version}`, notificationsAllowed)
}
title='The current launcher version.'
>
v{version}
</p>
</>
)
}
-134
View File
@@ -1,134 +0,0 @@
'use client'
import { useEffect } from 'react'
import './Installs.css'
import { useGlobal } from './GlobalProvider'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {
faCheck,
faShieldHalved,
faWarning
} from '@fortawesome/free-solid-svg-icons'
import { platform } from '@tauri-apps/plugin-os'
import { useRouter } from 'next/navigation'
export default function Installs () {
const {
showPopup,
setShowPopup,
setPopupMode,
setFadeOut,
setSelectedVersionList,
downloadedVersionsConfig,
normalConfig,
setSelectedGame,
getListOfGames,
getVersionsAmountData,
setCategory
} = useGlobal()
const router = useRouter()
useEffect(() => {
if (!showPopup) return
setSelectedVersionList([])
}, [normalConfig, setSelectedVersionList, showPopup])
return (
<div className='mx-4 mt-4'>
<div className='flex justify-between items-center mb-4'>
<p className='text-3xl'>Games</p>
<button
className='button btntheme1'
onClick={() => {
setSelectedGame(null)
setPopupMode(0)
setShowPopup(true)
setFadeOut(false)
}}
title='Click to download more games.'
>
Download game
</button>
</div>
<div className='downloads-container'>
<div
className={`downloads-scroll ${
platform() == 'windows'
? 'h-[calc(100vh-116px)]'
: 'h-[calc(100vh-84px)]'
}`}
>
{downloadedVersionsConfig &&
Object.keys(downloadedVersionsConfig.list).length ? (
getListOfGames()
.sort((a, b) => {
return a.id - b.id
})
.map(i => (
<div
key={i.id}
className={'downloads-entry'}
title={'Click to view game installs'}
onClick={() => {
setCategory(-1)
router.push('/game?id=' + i.id)
}}
>
<div className='h-18 w-screen relative'>
<p className='text-2xl'>{i.name}</p>
<div className='flex gap-2 absolute left-0 bottom-0'>
<div
className='entry-info-item'
title='The amount of versions installed of this game in installed/installable format.'
onClick={e => e.stopPropagation()}
>
<p>
{(() => {
const data = getVersionsAmountData(i.id)
if (!data) return 'N/A'
return `${data.installed}/${data.total}`
})()}{' '}
versions installed
</p>
</div>
<div
className='entry-info-item'
hidden={!i.official}
title='This game is official.'
onClick={e => e.stopPropagation()}
>
<FontAwesomeIcon icon={faCheck} color='#19c84b' />
<p>Official</p>
</div>
<div
className='entry-info-item'
hidden={i.official}
title={
i.verified
? 'This game is verified to be safe'
: 'This game is not verified to be save. Proceed with caution.'
}
onClick={e => e.stopPropagation()}
>
<FontAwesomeIcon
icon={i.verified ? faShieldHalved : faWarning}
color={i.verified ? '#19c84b' : '#ffc800'}
/>
<p>{i.verified ? 'Verified' : 'Unverified'}</p>
</div>
</div>
</div>
</div>
))
) : (
<div className='flex justify-center items-center h-full'>
<p className='text-3xl'>No games installed</p>
</div>
)}
</div>
</div>
</div>
)
}
-185
View File
@@ -1,185 +0,0 @@
'use client'
import { useEffect, useState } from 'react'
import { Setting } from '@/componets/Setting'
import { writeNormalConfig } from '@/lib/BazookaManager'
import { useGlobal } from '@/app/GlobalProvider'
import { copyToClipboard } from '@/lib/Clipboard'
import { platform } from '@tauri-apps/plugin-os'
export default function Settings () {
const [allowNotifications, setAllowNotifications] = useState(false)
const [alwaysShowGamesInSidebar, setAlwaysShowGamesInSidebar] =
useState(false)
const [useWineOnUnixWhenNeeded, setUseWineOnUnixWhenNeeded] = useState(false)
const [wineOnUnixCommand, setWineOnUnixCommand] = useState('wine %path%')
const [theme, setTheme] = useState(0)
const [loaded, setLoaded] = useState(false)
const { normalConfig, setNormalConfig, version } = useGlobal()
useEffect(() => {
;(async () => {
while (normalConfig != null) {
setAllowNotifications(normalConfig.settings.allowNotifications)
setAlwaysShowGamesInSidebar(
normalConfig.settings.alwaysShowGamesInSidebar
)
setUseWineOnUnixWhenNeeded(
normalConfig.settings.useWineOnUnixWhenNeeded
)
setWineOnUnixCommand(normalConfig.settings.wineOnUnixCommand)
setTheme(normalConfig.settings.theme)
setLoaded(true)
break
}
})()
}, [normalConfig])
return (
<>
<p className='text-3xl ml-4 mt-4'>Settings</p>
{loaded && (
<div className='ml-4 mt-4 bg-(--col1) border border-(--col3) rounded-lg p-4 w-fit h-fit'>
<Setting
label='Allow sending notifications'
value={allowNotifications}
onChange={async () => {
if (!normalConfig) return
setAllowNotifications(!allowNotifications)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
allowNotifications: !allowNotifications
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
allowNotifications: !allowNotifications
}
})
}}
title='This setting does as you expect, allow the launcher to send notifications for when stuff like downloading is done.'
/>
<Setting
label='Always show games in sidebar'
value={alwaysShowGamesInSidebar}
onChange={async () => {
if (!normalConfig) return
setAlwaysShowGamesInSidebar(!alwaysShowGamesInSidebar)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
alwaysShowGamesInSidebar: !alwaysShowGamesInSidebar
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
alwaysShowGamesInSidebar: !alwaysShowGamesInSidebar
}
})
}}
title="This setting will make it so when you are on a page like this, the games won't disappear."
/>
<Setting
label='Use wine when needed to launch games'
value={useWineOnUnixWhenNeeded}
onChange={async () => {
if (!normalConfig) return
setUseWineOnUnixWhenNeeded(!useWineOnUnixWhenNeeded)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
useWineOnUnixWhenNeeded: !useWineOnUnixWhenNeeded
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
useWineOnUnixWhenNeeded: !useWineOnUnixWhenNeeded
}
})
}}
className={platform() == 'linux' ? '' : 'hidden'}
/>
<p hidden={!(platform() == 'linux' && useWineOnUnixWhenNeeded)}>
Wine Command:
</p>
<input
type='text'
value={wineOnUnixCommand}
onChange={async e => {
if (!normalConfig) return
setWineOnUnixCommand(e.target.value)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
wineOnUnixCommand: e.target.value
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
wineOnUnixCommand: e.target.value
}
})
}}
className={`input-field my-1 ${
platform() == 'linux' && useWineOnUnixWhenNeeded ? '' : 'hidden'
}`}
></input>
<div title='The theme you want the launcher to use.'>
<label className='text-lg'>Theme:</label>
<select
className='ml-2 bg-(--col2) border border-(--col4) rounded-md'
value={theme}
onChange={async e => {
if (!normalConfig) return
const newTheme = parseInt(e.target.value)
setTheme(newTheme)
setNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
theme: newTheme
}
})
await writeNormalConfig({
...normalConfig,
settings: {
...normalConfig.settings,
theme: newTheme
}
})
}}
>
<option value={0}>Dark (default)</option>
<option value={1}>Red</option>
<option value={2}>Blue</option>
<option value={3}>Purple</option>
</select>
</div>
</div>
)}
<p
className='fixed bottom-1.5 right-1.5 rounded-md cursor-pointer px-1 border z-100 transition-colors btntheme1'
onClick={async () => {
await copyToClipboard(`v${version}`, normalConfig)
}}
title='The current launcher version.'
>
v{version}
</p>
</>
)
}
+5
View File
@@ -0,0 +1,5 @@
'use client'
export default function UpdateCheckingPage () {
return <p className='text-5xl text-center'>Checking for updates</p>
}
+42
View File
@@ -0,0 +1,42 @@
'use client'
import '@/styles/globals.css'
import { platform } from '@tauri-apps/plugin-os'
import { Roboto } from 'next/font/google'
import { useEffect, useState } from 'react'
const roboto = Roboto({
subsets: ['latin']
})
export default function RootLayout ({
children
}: {
children: React.ReactNode
}) {
const [platformName, setPlatformName] = useState<string | null>(null)
useEffect(() => {
setTimeout(() => setPlatformName(platform()), 0)
}, [])
return (
<>
<html lang='en' className={roboto.className}>
<body className='dark-theme'>
<div
className='relative z-2 w-screen border-b border-b-(--col3) h-8.25 bg-(--col1)'
hidden={platformName != 'windows'}
/>
<div
className={`w-screen ${
platformName == 'windows' ? 'h-[calc(100vh-64px)]' : 'h-screen'
} flex items-center justify-center`}
>
{children}
</div>
</body>
</html>
</>
)
}
+20
View File
@@ -0,0 +1,20 @@
'use client'
import { openUrl } from '@tauri-apps/plugin-opener'
export default function UpdateCheckingPage () {
return (
<div className='text-center'>
<p className='text-6xl mb-4'>Outdated Launcher!</p>
<p className='text-2xl mb-4'>
Please update to the latest version to continue.
</p>
<button
className='button btntheme1'
onClick={() => openUrl('https://games.lncvrt.xyz/download')}
>
Download latest version!
</button>
</div>
)
}
+5
View File
@@ -0,0 +1,5 @@
'use client'
export default function UpdateCheckingPage () {
return <p className='text-5xl text-center'>Updating launcher</p>
}
File renamed without changes.
@@ -1,4 +1,4 @@
import './Setting.css' import '@/styles/setting.css'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCheck } from '@fortawesome/free-solid-svg-icons' import { faCheck } from '@fortawesome/free-solid-svg-icons'
import { SettingProps } from '@/types/SettingProps' import { SettingProps } from '@/types/SettingProps'
@@ -1,6 +1,6 @@
'use client' 'use client'
import './Sidebar.css' import '@/styles/sidebar.css'
import Icon from '@/assets/Icon.png' import Icon from '@/assets/Icon.png'
import { openUrl } from '@tauri-apps/plugin-opener' import { openUrl } from '@tauri-apps/plugin-opener'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
@@ -13,7 +13,7 @@ import {
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import { faDiscord } from '@fortawesome/free-brands-svg-icons' import { faDiscord } from '@fortawesome/free-brands-svg-icons'
import { platform } from '@tauri-apps/plugin-os' import { platform } from '@tauri-apps/plugin-os'
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import Image from 'next/image' import Image from 'next/image'
import Link from 'next/link' import Link from 'next/link'
import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { usePathname, useRouter, useSearchParams } from 'next/navigation'
@@ -27,16 +27,16 @@ const lexend = Lexend({
export default function Sidebar () { export default function Sidebar () {
const { const {
normalConfig, serverVersionList,
getListOfGames, versionsList,
setShowPopup, setShowPopup,
setPopupMode, setPopupMode,
setFadeOut, setFadeOut,
downloadProgress, downloadProgress,
downloadedVersionsConfig,
getVersionInfo,
category, category,
setCategory setCategory,
sidebarAlwaysShowGames,
linuxUseWine
} = useGlobal() } = useGlobal()
const pathname = usePathname() const pathname = usePathname()
@@ -82,37 +82,42 @@ export default function Sidebar () {
<nav className='nav-links overflow-auto pt-2'> <nav className='nav-links overflow-auto pt-2'>
<Link <Link
draggable={false} draggable={false}
href='/' href='/main'
className={`link relative flex items-center ${ className={`link relative flex items-center ${
pathname === '/' || pathname.startsWith('/game') ? 'active' : '' pathname === '/main' || pathname.startsWith('/main/game')
? 'active'
: ''
}`} }`}
> >
<FontAwesomeIcon icon={faHexagonNodes} className='mr-2' /> Games <FontAwesomeIcon icon={faHexagonNodes} className='mr-2' /> Games
</Link> </Link>
{getListOfGames() {serverVersionList?.games
.sort((a, b) => { .filter(g =>
return a.id - b.id serverVersionList.versions
}) .filter(v => v.game === g.id)
.some(v => Object.keys(versionsList).includes(v.id))
)
.map(i => ( .map(i => (
<React.Fragment key={i.id}> <React.Fragment key={i.id}>
<div <div
draggable={false} draggable={false}
className={`link ${ className={`link ${
(pathname === '/game' && (pathname === '/main/game' &&
Number(params.get('id') || 0) == i.id) || Number(params.get('id') || 0) == i.id) ||
(i.id == 1 && pathname === '/game/berrydash/leaderboards') (i.id == 1 &&
pathname === '/main/game/berrydash/leaderboards')
? 'active' ? 'active'
: '' : ''
} ml-auto w-50 ${ } ml-auto w-50 ${
normalConfig?.settings.alwaysShowGamesInSidebar || sidebarAlwaysShowGames ||
pathname === '/' || pathname === '/' ||
pathname.startsWith('/game') pathname.startsWith('/main/game')
? '' ? ''
: 'hidden' : 'hidden'
}`} }`}
onClick={() => { onClick={() => {
setCategory(-1) setCategory(-1)
router.push('/game?id=' + i.id) router.push('/main/game?id=' + i.id)
}} }}
> >
<div className='flex items-center'> <div className='flex items-center'>
@@ -130,17 +135,13 @@ export default function Sidebar () {
{Object.entries(i.categoryNames) {Object.entries(i.categoryNames)
.sort(([a], [b]) => Number(b) - Number(a)) .sort(([a], [b]) => Number(b) - Number(a))
.filter(([key]) => { .filter(([key]) => {
const count = Object.keys( const count = Object.keys(versionsList).filter(v => {
downloadedVersionsConfig?.list ?? {} const info = serverVersionList.versions.find(
).filter(v => { vf => vf.id == v
const info = getVersionInfo(v) )
if (!info) return false if (!info) return false
if ( if (platform() == 'linux' && info.wine && !linuxUseWine)
platform() == 'linux' &&
info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded
)
return false return false
return info.game === i.id && info.category === Number(key) return info.game === i.id && info.category === Number(key)
@@ -153,23 +154,23 @@ export default function Sidebar () {
key={`${i.id}-${key}`} key={`${i.id}-${key}`}
draggable={false} draggable={false}
className={`link ${ className={`link ${
((pathname === '/game' && ((pathname === '/main/game' &&
Number(params.get('id') || 0) == i.id) || Number(params.get('id') || 0) == i.id) ||
(i.id == 1 && (i.id == 1 &&
pathname === '/game/berrydash/leaderboards')) && pathname === '/main/game/berrydash/leaderboards')) &&
category == Number(key) category == Number(key)
? 'active' ? 'active'
: '' : ''
} ml-auto w-47.5 ${ } ml-auto w-47.5 ${
normalConfig?.settings.alwaysShowGamesInSidebar || sidebarAlwaysShowGames ||
pathname === '/' || pathname === '/' ||
pathname.startsWith('/game') pathname.startsWith('/main/game')
? '' ? ''
: 'hidden' : 'hidden'
}`} }`}
onClick={() => { onClick={() => {
setCategory(Number(key)) setCategory(Number(key))
router.push('/game?id=' + i.id) router.push('/main/game?id=' + i.id)
}} }}
> >
<div className='flex items-center'> <div className='flex items-center'>
@@ -182,8 +183,8 @@ export default function Sidebar () {
))} ))}
<Link <Link
draggable={false} draggable={false}
href='/settings' href='/main/settings'
className={`link ${pathname === '/settings' ? 'active' : ''}`} className={`link ${pathname === '/main/settings' ? 'active' : ''}`}
> >
<FontAwesomeIcon icon={faCog} className='mr-1' /> Settings <FontAwesomeIcon icon={faCog} className='mr-1' /> Settings
</Link> </Link>
-148
View File
@@ -1,148 +0,0 @@
import { app } from '@tauri-apps/api'
import { NormalConfig } from '@/types/NormalConfig'
import {
BaseDirectory,
create,
exists,
mkdir,
readTextFile,
writeFile
} from '@tauri-apps/plugin-fs'
import { VersionsConfig } from '@/types/VersionsConfig'
export async function readNormalConfig (): Promise<NormalConfig> {
const version = await app.getVersion()
try {
const options = {
baseDir: BaseDirectory.AppLocalData
}
const doesFolderExist = await exists('', options)
const doesConfigExist = await exists('config.json', options)
if (!doesFolderExist || !doesConfigExist) {
if (!doesFolderExist) {
await mkdir('', options)
}
const file = await create('config.json', options)
await file.write(
new TextEncoder().encode(
JSON.stringify(new NormalConfig(version), null, 2)
)
)
await file.close()
return new NormalConfig(version)
}
const config = await readTextFile('config.json', options)
const raw = JSON.parse(config)
if (
raw.settings &&
raw.settings.theme &&
(raw.version == '1.0.0' ||
raw.version == '1.1.0' ||
raw.version == '1.1.1' ||
raw.version == '1.2.0' ||
raw.version == '1.3.0' ||
raw.version == '1.3.1' ||
raw.version == '1.4.0' ||
raw.version == '1.5.0' ||
raw.version == '1.5.1' ||
raw.version == '1.5.2' ||
raw.version == '1.5.3' ||
raw.version == '1.5.4')
) {
const parsed = Number(raw.settings.theme)
if (parsed == 3) raw.settings.theme = 2
if (parsed == 4) raw.settings.theme = 3
else if (parsed != 0 && parsed != 1) raw.settings.theme = 0
}
raw.version = version
writeNormalConfig(raw)
return NormalConfig.import(raw)
} catch {
return new NormalConfig(version)
}
}
export async function writeNormalConfig (data: NormalConfig) {
const options = {
baseDir: BaseDirectory.AppLocalData
}
const doesFolderExist = await exists('', options)
const doesConfigExist = await exists('config.json', options)
if (!doesFolderExist || !doesConfigExist) {
if (!doesFolderExist) {
await mkdir('', options)
}
const file = await create('config.json', options)
await file.write(new TextEncoder().encode(JSON.stringify(data, null, 2)))
await file.close()
} else {
await writeFile(
'config.json',
new TextEncoder().encode(JSON.stringify(data, null, 2)),
options
)
}
}
export async function readVersionsConfig (): Promise<VersionsConfig> {
const version = await app.getVersion()
try {
const options = {
baseDir: BaseDirectory.AppLocalData
}
const doesFolderExist = await exists('', options)
const doesConfigExist = await exists('versions.json', options)
if (!doesFolderExist || !doesConfigExist) {
if (!doesFolderExist) {
await mkdir('', options)
}
const file = await create('versions.json', options)
await file.write(
new TextEncoder().encode(
JSON.stringify(new VersionsConfig(version), null, 2)
)
)
await file.close()
return new VersionsConfig(version)
}
const config = await readTextFile('versions.json', options)
const raw = JSON.parse(config)
if (raw.list && raw.timestamps) {
raw.list = raw.timestamps
delete raw.timestamps
await writeFile(
'versions.json',
new TextEncoder().encode(JSON.stringify(raw, null, 2)),
options
)
}
raw.version = version
writeVersionsConfig(raw)
return VersionsConfig.import(raw)
} catch {
return new VersionsConfig(version)
}
}
export async function writeVersionsConfig (data: VersionsConfig) {
const options = {
baseDir: BaseDirectory.AppLocalData
}
const doesFolderExist = await exists('', options)
const doesConfigExist = await exists('versions.json', options)
if (!doesFolderExist || !doesConfigExist) {
if (!doesFolderExist) {
await mkdir('', options)
}
const file = await create('versions.json', options)
await file.write(new TextEncoder().encode(JSON.stringify(data, null, 2)))
await file.close()
} else {
await writeFile(
'versions.json',
new TextEncoder().encode(JSON.stringify(data, null, 2)),
options
)
}
}
-10
View File
@@ -1,10 +0,0 @@
import { NormalConfig } from '@/types/NormalConfig'
import { notifyUser } from './Notifications'
export async function copyToClipboard (
text: string,
normalConfig: NormalConfig | null
) {
if (normalConfig?.settings.allowNotifications)
await notifyUser('Copied', 'Text "' + text + '" copied to clipboard')
}
File renamed without changes.
+11
View File
@@ -0,0 +1,11 @@
import { writeText } from '@tauri-apps/plugin-clipboard-manager'
import { notifyUser } from './notifications'
export async function copyToClipboard (
text: string,
notificationsAllowed: boolean
) {
await writeText(text)
if (notificationsAllowed)
await notifyUser('Copied', 'Text "' + text + '" copied to clipboard')
}
File renamed without changes.
View File
File renamed without changes.
@@ -1,7 +1,7 @@
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import prettyBytes from 'pretty-bytes' import prettyBytes from 'pretty-bytes'
import ProgressBar from '../ProgressBar' import ProgressBar from '@/components/ProgressBar'
import { formatEtaSmart } from '@/lib/Util' import { formatEtaSmart } from '@/lib/util'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { import {
faCancel, faCancel,
@@ -10,19 +10,20 @@ import {
faTrash faTrash
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import { invoke } from '@tauri-apps/api/core' import { invoke } from '@tauri-apps/api/core'
import { writeVersionsConfig } from '@/lib/BazookaManager' import { notifyUser } from '@/lib/notifications'
import { notifyUser } from '@/lib/Notifications'
import { getCurrentWindow, UserAttentionType } from '@tauri-apps/api/window' import { getCurrentWindow, UserAttentionType } from '@tauri-apps/api/window'
export default function DownloadsPopup () { export default function DownloadsPopup () {
const { const {
downloadProgress, downloadProgress,
getVersionInfo,
setDownloadProgress, setDownloadProgress,
downloadQueue, downloadQueue,
setDownloadQueue, setDownloadQueue,
normalConfig, notificationsAllowed,
setDownloadedVersionsConfig versionsList,
modsList,
versions,
serverVersionList
} = useGlobal() } = useGlobal()
return ( return (
@@ -58,28 +59,30 @@ export default function DownloadsPopup () {
const res = await invoke<string>('download', { const res = await invoke<string>('download', {
url: v.url, url: v.url,
name: v.version, name: v.version,
executable: v.executable, hash: v.hash,
hash: v.hash downloadType: v.type,
modId: String(v.modId ?? '')
}) })
if (res === '1') { if (res === '1') {
setDownloadProgress(prev => setDownloadProgress(prev =>
prev.filter(d => d.version !== v.version) prev.filter(d => d.version !== v.version)
) )
setDownloadedVersionsConfig(prev => { if (v.type != 1) {
if (!prev) return prev if (v.type == 2) {
versions?.set('mods', {
const updated = { ...modsList,
...prev, [v.modGame! + '-' + v.modId!]: {
list: { [v.modVersion!]: Date.now()
...prev.list, }
})
} else {
versions?.set('list', {
...versionsList,
[v.version]: Date.now() [v.version]: Date.now()
} })
} }
}
writeVersionsConfig(updated)
return updated
})
} else if (res == '0') { } else if (res == '0') {
setDownloadProgress(prev => { setDownloadProgress(prev => {
const i = prev.findIndex(d => d.version === v.version) const i = prev.findIndex(d => d.version === v.version)
@@ -109,11 +112,13 @@ export default function DownloadsPopup () {
: d : d
) )
) )
if (normalConfig?.settings.allowNotifications) if (notificationsAllowed)
await notifyUser( await notifyUser(
'Download Failed', 'Download Failed',
`The download for version ${ `The download for version ${
getVersionInfo(v.version)?.displayName serverVersionList?.versions.find(
vf => vf.id == v.version
)?.displayName
} has failed.` } has failed.`
) )
await getCurrentWindow().requestUserAttention( await getCurrentWindow().requestUserAttention(
@@ -172,11 +177,14 @@ export default function DownloadsPopup () {
</div> </div>
<p className='text-2xl text-center'> <p className='text-2xl text-center'>
{v.type == 1 {v.type == 1
? 'Mod Manager for ' ? 'Mod loader for '
: v.type == 2 : v.type == 2
? 'Mod for ' ? 'Mod for '
: null}{' '} : null}{' '}
{getVersionInfo(v.version)?.displayName} {
serverVersionList?.versions.find(vf => vf.id == v.version)
?.displayName
}
</p> </p>
<div className='mt-6.25 flex items-center justify-between'> <div className='mt-6.25 flex items-center justify-between'>
{v.failed || v.queued ? ( {v.failed || v.queued ? (
@@ -1,4 +1,4 @@
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { import {
faCheck, faCheck,
faCode, faCode,
@@ -9,18 +9,18 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
export default function GamesDownloadPopup () { export default function GamesDownloadPopup () {
const { serverVersionList, getVersionsAmountData, setSelectedGame } = const { serverVersionList, setSelectedGame, versionsList } = useGlobal()
useGlobal()
return ( return (
<> <>
<p className='text-xl text-center'>Select a game to download</p> <p className='text-xl text-center'>Select a game to download</p>
<div className='popup-content'> <div className='popup-content'>
{serverVersionList?.games {serverVersionList?.games
.filter(v => { .filter(i => {
const data = getVersionsAmountData(v.id) const gameVersions = serverVersionList.versions.filter(
if (!data) return false vf => vf.game === i.id
if (data.total > 0) return true )
if (gameVersions.length > 0) return true
}) })
.map((v, i) => ( .map((v, i) => (
<div key={i} className='popup-entry'> <div key={i} className='popup-entry'>
@@ -32,9 +32,15 @@ export default function GamesDownloadPopup () {
> >
<p> <p>
{(() => { {(() => {
const data = getVersionsAmountData(v.id) const gameVersions = serverVersionList.versions.filter(
if (!data) return 'N/A' vf => vf.game === v.id
return `${data.installed}/${data.total}` )
const installed = gameVersions.filter(v =>
Object.keys(versionsList).includes(v.id)
).length
return gameVersions.length
? `${installed}/${gameVersions.length}`
: 'N/A'
})()}{' '} })()}{' '}
versions installed versions installed
</p> </p>
@@ -74,11 +80,7 @@ export default function GamesDownloadPopup () {
<button <button
className='button btntheme3 right-2 bottom-2' className='button btntheme3 right-2 bottom-2'
onClick={() => setSelectedGame(v.id)} onClick={() => setSelectedGame(v.id)}
title={`Click to download specific versions of the game. You have ${(() => { title='Click to download more versions of the game.'
const data = getVersionsAmountData(v.id)
if (!data) return 'N/A'
return `${data.installed} of ${data.total}`
})()} versions downloaded.`}
> >
<> <>
<FontAwesomeIcon icon={faDownload} /> Download <FontAwesomeIcon icon={faDownload} /> Download
@@ -9,28 +9,25 @@ import {
faWarning faWarning
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { invoke } from '@tauri-apps/api/core' import { invoke } from '@tauri-apps/api/core'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import prettyBytes from 'pretty-bytes' import prettyBytes from 'pretty-bytes'
import { message } from '@tauri-apps/plugin-dialog'
import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs'
import { writeVersionsConfig } from '@/lib/BazookaManager' import { openFolder } from '@/lib/util'
import { openFolder } from '@/lib/Util'
export default function ManageVersionPopup () { export default function ManageVersionPopup () {
const { const {
getGameInfo, versionsList,
getVersionInfo, serverVersionList,
managingVersion, managingVersion,
downloadedVersionsConfig,
viewingInfoFromDownloads, viewingInfoFromDownloads,
setManagingVersion, setManagingVersion,
closePopup, closePopup,
setDownloadedVersionsConfig,
setPopupMode, setPopupMode,
setSelectedVersionList, setSelectedVersionList,
downloadVersions downloadVersions,
versions
} = useGlobal() } = useGlobal()
const [versionSize, setVersionSize] = useState<number>(0) const [versionSize, setVersionSize] = useState<number>(0)
@@ -43,10 +40,14 @@ export default function ManageVersionPopup () {
}) })
}, [managingVersion, setVersionSize, viewingInfoFromDownloads]) }, [managingVersion, setVersionSize, viewingInfoFromDownloads])
if (!managingVersion || !downloadedVersionsConfig) return <></> if (!managingVersion) return <></>
const versionInfo = getVersionInfo(managingVersion) const versionInfo = serverVersionList?.versions.find(
const gameInfo = getGameInfo(versionInfo?.game) vf => vf.id == managingVersion
)
const gameInfo = serverVersionList?.games.find(
vf => vf.id == versionInfo?.game
)
return ( return (
<> <>
@@ -59,7 +60,7 @@ export default function ManageVersionPopup () {
<p> <p>
Installed{' '} Installed{' '}
{new Intl.DateTimeFormat(undefined).format( {new Intl.DateTimeFormat(undefined).format(
downloadedVersionsConfig.list[managingVersion] ?? 0 versionsList[managingVersion] ?? 0
)} )}
</p> </p>
</div> </div>
@@ -109,13 +110,7 @@ export default function ManageVersionPopup () {
</div> </div>
<div <div
className='entry-info-item btntheme2' className='entry-info-item btntheme2'
onClick={async () => { onClick={() => setPopupMode(4)}
if (!versionInfo) return
await message(atob(versionInfo.changelog), {
title: 'Changelog for ' + versionInfo.displayName,
kind: 'info'
})
}}
hidden={!versionInfo?.changelog} hidden={!versionInfo?.changelog}
> >
<p>View Changelog</p> <p>View Changelog</p>
@@ -135,18 +130,14 @@ export default function ManageVersionPopup () {
onClick={async () => { onClick={async () => {
closePopup() closePopup()
setDownloadedVersionsConfig(prev => { versions?.set(
if (!prev) return prev 'list',
const updatedList = Object.fromEntries( Object.fromEntries(
Object.entries(prev.list).filter(([k]) => k !== managingVersion) Object.entries(versionsList).filter(
([k]) => k !== managingVersion
)
) )
const updatedConfig = { )
...prev,
list: updatedList
}
writeVersionsConfig(updatedConfig)
return updatedConfig
})
if ( if (
await exists('game/' + managingVersion, { await exists('game/' + managingVersion, {
@@ -171,18 +162,14 @@ export default function ManageVersionPopup () {
setPopupMode(1) setPopupMode(1)
//uninstall //uninstall
setDownloadedVersionsConfig(prev => { versions?.set(
if (!prev) return prev 'list',
const updatedList = Object.fromEntries( Object.fromEntries(
Object.entries(prev.list).filter(([k]) => k !== managingVersion) Object.entries(versionsList).filter(
([k]) => k !== managingVersion
)
) )
const updatedConfig = { )
...prev,
list: updatedList
}
writeVersionsConfig(updatedConfig)
return updatedConfig
})
if ( if (
await exists('game/' + managingVersion, { await exists('game/' + managingVersion, {
@@ -1,8 +1,7 @@
'use client' 'use client'
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { writeVersionsConfig } from '@/lib/BazookaManager' import { verifySignature } from '@/lib/util'
import { verifySignature } from '@/lib/Util'
import { Mod } from '@/types/Mod' import { Mod } from '@/types/Mod'
import { import {
faArrowUpRightFromSquare, faArrowUpRightFromSquare,
@@ -17,19 +16,20 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { message } from '@tauri-apps/plugin-dialog' import { message } from '@tauri-apps/plugin-dialog'
import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs'
import { fetch } from '@tauri-apps/plugin-http'
import { arch, platform } from '@tauri-apps/plugin-os' import { arch, platform } from '@tauri-apps/plugin-os'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
export default function ModDownloadsPopup () { export default function ModDownloadsPopup () {
const { const {
getVersionInfo, modsList,
serverVersionList,
managingVersion, managingVersion,
downloadedVersionsConfig,
showModInfo, showModInfo,
setShowModInfo, setShowModInfo,
downloadVersions, downloadVersions,
downloadProgress, downloadProgress,
setDownloadedVersionsConfig versions
} = useGlobal() } = useGlobal()
const [mods, setMods] = useState<Mod[] | 0 | 1>(0) const [mods, setMods] = useState<Mod[] | 0 | 1>(0)
@@ -51,9 +51,11 @@ export default function ModDownloadsPopup () {
})() })()
}, [managingVersion]) }, [managingVersion])
if (!managingVersion) return <></> if (!managingVersion || !serverVersionList) return <></>
const versionInfo = getVersionInfo(managingVersion) const versionInfo = serverVersionList.versions.find(
v => v.id == managingVersion
)
return ( return (
<> <>
@@ -109,10 +111,10 @@ export default function ModDownloadsPopup () {
(!showModInfo && (!showModInfo &&
mods.filter(v => mods.filter(v =>
tab == 0 tab == 0
? Object.keys(downloadedVersionsConfig?.mods ?? []).includes( ? Object.keys(modsList).includes(
String(versionInfo?.game + '-' + v.id) String(versionInfo?.game + '-' + v.id)
) )
: !Object.keys(downloadedVersionsConfig?.mods ?? []).includes( : !Object.keys(modsList).includes(
String(versionInfo?.game + '-' + v.id) String(versionInfo?.game + '-' + v.id)
) )
).length == 0) ? ( ).length == 0) ? (
@@ -130,10 +132,10 @@ export default function ModDownloadsPopup () {
{mods {mods
.filter(v => .filter(v =>
tab == 0 tab == 0
? Object.keys(downloadedVersionsConfig?.mods ?? []).includes( ? Object.keys(modsList).includes(
String(versionInfo?.game + '-' + v.id) String(versionInfo?.game + '-' + v.id)
) )
: !Object.keys(downloadedVersionsConfig?.mods ?? []).includes( : !Object.keys(modsList).includes(
String(versionInfo?.game + '-' + v.id) String(versionInfo?.game + '-' + v.id)
) )
) )
@@ -141,9 +143,7 @@ export default function ModDownloadsPopup () {
const localVersion = const localVersion =
tab == 0 tab == 0
? Object.keys( ? Object.keys(
downloadedVersionsConfig?.mods?.[ modsList[versionInfo?.game + '-' + v.id] ?? {}
versionInfo?.game + '-' + v.id
] ?? {}
)[0] )[0]
: null : null
return ( return (
@@ -200,20 +200,14 @@ export default function ModDownloadsPopup () {
baseDir: BaseDirectory.AppLocalData, baseDir: BaseDirectory.AppLocalData,
recursive: true recursive: true
}) })
setDownloadedVersionsConfig(prev => { versions?.set(
if (!prev) return prev 'mods',
const updatedMods = Object.fromEntries( Object.fromEntries(
Object.entries(prev.mods).filter( Object.entries(modsList).filter(
([k]) => k !== versionInfo?.game + '-' + v.id ([k]) => k !== versionInfo?.game + '-' + v.id
) )
) )
const updatedConfig = { )
...prev,
mods: updatedMods
}
writeVersionsConfig(updatedConfig)
return updatedConfig
})
downloadVersions([ downloadVersions([
{ {
@@ -272,7 +266,7 @@ export default function ModDownloadsPopup () {
: '(No description added)'} : '(No description added)'}
</div> </div>
<div className='flex flex-row h-fit w-full gap-2 justify-center my-2'> <div className='flex flex-row h-fit w-full gap-2 justify-center my-2'>
{Object.keys(downloadedVersionsConfig?.mods ?? []).includes( {Object.keys(modsList).includes(
String(versionInfo?.game + '-' + showModInfo.id) String(versionInfo?.game + '-' + showModInfo.id)
) ? ( ) ? (
<button <button
@@ -293,21 +287,15 @@ export default function ModDownloadsPopup () {
baseDir: BaseDirectory.AppLocalData, baseDir: BaseDirectory.AppLocalData,
recursive: true recursive: true
}) })
setDownloadedVersionsConfig(prev => { versions?.set(
if (!prev) return prev 'mods',
const updatedMods = Object.fromEntries( Object.fromEntries(
Object.entries(prev.mods).filter( Object.entries(modsList).filter(
([k]) => ([k]) =>
k !== versionInfo?.game + '-' + showModInfo.id k !== versionInfo?.game + '-' + showModInfo.id
) )
) )
const updatedConfig = { )
...prev,
mods: updatedMods
}
writeVersionsConfig(updatedConfig)
return updatedConfig
})
}} }}
> >
<FontAwesomeIcon icon={faTrash} className='text-red-400' />{' '} <FontAwesomeIcon icon={faTrash} className='text-red-400' />{' '}
+34
View File
@@ -0,0 +1,34 @@
'use client'
import { useGlobal } from '@/providers/GlobalProvider'
import DOMPurify from 'dompurify'
export default function VersionChangelogPopup () {
const { serverVersionList, managingVersion } = useGlobal()
if (!managingVersion) return <></>
const versionInfo = serverVersionList?.versions.find(
vf => vf.id == managingVersion
)
return (
<>
<p className='text-xl text-center'>
Viewing changelog {versionInfo?.displayName}
</p>
<div className='popup-content h-full w-full p-2'>
<p
className='whitespace-pre-line'
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(
atob(versionInfo?.changelog ?? '')
.replaceAll('- ', '&bull; ')
.replaceAll(/`([^`]+)`/g, '<code>$1</code>')
)
}}
></p>
</div>
</>
)
}
@@ -1,22 +1,23 @@
import { useGlobal } from '@/app/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { faAdd, faInfo, faRemove } from '@fortawesome/free-solid-svg-icons' import { faAdd, faInfo, faRemove } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
export default function VersionsDownloadPopup () { export default function VersionsDownloadPopup () {
const { const {
serverVersionList,
getSpecialVersionsList,
selectedVersionList, selectedVersionList,
setSelectedVersionList, setSelectedVersionList,
setManagingVersion, setManagingVersion,
setPopupMode, setPopupMode,
getSpecialVersionsList,
selectedGame, selectedGame,
setViewingInfoFromDownloads, setViewingInfoFromDownloads,
downloadedVersionsConfig, downloadVersions
downloadVersions,
getGameInfo
} = useGlobal() } = useGlobal()
if (!selectedGame) return <></> const game = serverVersionList?.games.find(g => g.id === selectedGame)
if (!selectedGame || !game) return <></>
return ( return (
<> <>
@@ -78,24 +79,18 @@ export default function VersionsDownloadPopup () {
<button <button
className='button btntheme1 w-fit mt-2 -mb-4' className='button btntheme1 w-fit mt-2 -mb-4'
onClick={() => { onClick={() => {
if (downloadedVersionsConfig) { downloadVersions(
downloadVersions( selectedVersionList.map(versionId => ({
selectedVersionList.map(versionId => ({ id: versionId,
id: versionId, type: 0
type: 0 }))
})) )
) setPopupMode(1)
setPopupMode(1)
}
}} }}
disabled={selectedVersionList.length == 0} disabled={selectedVersionList.length == 0}
title={ title={`Download ${selectedVersionList.length} version${
selectedVersionList.length == 0 selectedVersionList.length == 1 ? '' : 's'
? 'Select at least one version to download' } of ${game.name}`}
: `Download ${selectedVersionList.length} version${
selectedVersionList.length == 1 ? '' : 's'
} of ${getGameInfo(selectedGame)?.name}`
}
> >
Download {selectedVersionList.length} version Download {selectedVersionList.length} version
{selectedVersionList.length == 1 ? '' : 's'} {selectedVersionList.length == 1 ? '' : 's'}
@@ -8,12 +8,10 @@ import {
SetStateAction SetStateAction
} from 'react' } from 'react'
import { DownloadProgress } from '@/types/DownloadProgress' import { DownloadProgress } from '@/types/DownloadProgress'
import { VersionsConfig } from '@/types/VersionsConfig'
import { NormalConfig } from '@/types/NormalConfig'
import { ServerVersionsResponse } from '@/types/ServerVersionsResponse' import { ServerVersionsResponse } from '@/types/ServerVersionsResponse'
import { GameVersion } from '@/types/GameVersion'
import { Game } from '@/types/Game'
import { Mod } from '@/types/Mod' import { Mod } from '@/types/Mod'
import { Store } from '@tauri-apps/plugin-store'
import { GameVersion } from '@/types/GameVersion'
type GlobalCtxType = { type GlobalCtxType = {
serverVersionList: ServerVersionsResponse | null serverVersionList: ServerVersionsResponse | null
@@ -27,20 +25,9 @@ type GlobalCtxType = {
setPopupMode: Dispatch<SetStateAction<number | null>> setPopupMode: Dispatch<SetStateAction<number | null>>
fadeOut: boolean fadeOut: boolean
setFadeOut: Dispatch<SetStateAction<boolean>> setFadeOut: Dispatch<SetStateAction<boolean>>
downloadedVersionsConfig: VersionsConfig | null
setDownloadedVersionsConfig: Dispatch<SetStateAction<VersionsConfig | null>>
normalConfig: NormalConfig | null
setNormalConfig: Dispatch<SetStateAction<NormalConfig | null>>
managingVersion: string | null managingVersion: string | null
setManagingVersion: Dispatch<SetStateAction<string | null>> setManagingVersion: Dispatch<SetStateAction<string | null>>
setSelectedGame: Dispatch<SetStateAction<number | null>> setSelectedGame: Dispatch<SetStateAction<number | null>>
getVersionInfo: (id: string | undefined) => GameVersion | undefined
getGameInfo: (game: number | undefined) => Game | undefined
getListOfGames(): Game[]
getVersionsAmountData: (gameId: number) => {
installed: number
total: number
} | null
viewingInfoFromDownloads: boolean viewingInfoFromDownloads: boolean
version: string | null version: string | null
downloadVersions: ( downloadVersions: (
@@ -58,11 +45,20 @@ type GlobalCtxType = {
downloadQueue: string[] downloadQueue: string[]
setDownloadQueue: Dispatch<SetStateAction<string[]>> setDownloadQueue: Dispatch<SetStateAction<string[]>>
closePopup: () => void closePopup: () => void
getSpecialVersionsList(game?: number | undefined): GameVersion[]
selectedGame: number | null selectedGame: number | null
setViewingInfoFromDownloads: Dispatch<SetStateAction<boolean>> setViewingInfoFromDownloads: Dispatch<SetStateAction<boolean>>
showModInfo: Mod | null showModInfo: Mod | null
setShowModInfo: Dispatch<SetStateAction<Mod | null>> setShowModInfo: Dispatch<SetStateAction<Mod | null>>
getSpecialVersionsList: (game?: number) => GameVersion[]
settings: Store | null
versions: Store | null
notificationsAllowed: boolean
sidebarAlwaysShowGames: boolean
linuxUseWine: boolean
linuxWineCommand: string
theme: string
versionsList: Record<string, number>
modsList: Record<string, Record<string, number>>
} }
const GlobalCtx = createContext<GlobalCtxType | null>(null) const GlobalCtx = createContext<GlobalCtxType | null>(null)
@@ -1,5 +1,9 @@
@import "tailwindcss"; @import "tailwindcss";
html {
overscroll-behavior: none;
}
body { body {
@apply bg-(--col0) text-white select-none; @apply bg-(--col0) text-white select-none;
} }
@@ -145,3 +149,7 @@ body {
.entry-info-item { .entry-info-item {
@apply flex flex-row items-center gap-1 border text-gray-300 py-1 px-2 rounded-md w-fit text-[16px] transition-colors cursor-pointer; @apply flex flex-row items-center gap-1 border text-gray-300 py-1 px-2 rounded-md w-fit text-[16px] transition-colors cursor-pointer;
} }
code {
@apply bg-(--col4) border border-(--col6) rounded-lg px-1 py-0.5 text-sm;
}
File renamed without changes.
File renamed without changes.
-21
View File
@@ -1,21 +0,0 @@
import { SettingsType } from './SettingsType'
type NormalConfigData = {
version: string
settings?: Partial<SettingsType>
}
export class NormalConfig {
constructor (
public version: string,
public settings: SettingsType = new SettingsType()
) {}
static import (data: NormalConfigData) {
const cfg = new NormalConfig(data.version)
if (data.settings) {
cfg.settings = { ...cfg.settings, ...data.settings }
}
return cfg
}
}
-9
View File
@@ -1,9 +0,0 @@
export class SettingsType {
constructor (
public allowNotifications: boolean = true,
public alwaysShowGamesInSidebar: boolean = true,
public useWineOnUnixWhenNeeded: boolean = false,
public wineOnUnixCommand: string = 'wine %path%',
public theme: number = 0
) {}
}
-20
View File
@@ -1,20 +0,0 @@
export type VersionsConfigData = {
version: string
list: Record<string, number>
mods: Record<string, Record<string, number>>
}
export class VersionsConfig {
constructor (
public version: string,
public list: Record<string, number> = {},
public mods: Record<string, Record<string, number>> = {}
) {}
static import (data: VersionsConfigData) {
const cfg = new VersionsConfig(data.version)
cfg.list = { ...data.list }
cfg.mods = { ...data.mods }
return cfg
}
}