Compare commits
3 Commits
051a86943e
...
474f1f0c33
| Author | SHA1 | Date | |
|---|---|---|---|
| 474f1f0c33 | |||
| 871c40922e | |||
| 20e8389409 |
Generated
+210
-26
@@ -8,17 +8,52 @@ version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "aead"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher 0.4.4",
|
||||
"cpufeatures 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8"
|
||||
dependencies = [
|
||||
"cipher",
|
||||
"cipher 0.5.2",
|
||||
"cpubits",
|
||||
"cpufeatures 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes-gcm"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"aes 0.8.4",
|
||||
"cipher 0.4.4",
|
||||
"ctr",
|
||||
"ghash",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.4"
|
||||
@@ -449,7 +484,7 @@ dependencies = [
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -525,6 +560,16 @@ dependencies = [
|
||||
"windows-link 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"inout 0.1.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.5.2"
|
||||
@@ -532,7 +577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
|
||||
dependencies = [
|
||||
"crypto-common 0.2.2",
|
||||
"inout",
|
||||
"inout 0.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -734,6 +779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"rand_core 0.6.4",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
@@ -802,6 +848,15 @@ version = "0.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
|
||||
|
||||
[[package]]
|
||||
name = "ctr"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
|
||||
dependencies = [
|
||||
"cipher 0.4.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctutils"
|
||||
version = "0.4.2"
|
||||
@@ -1186,6 +1241,7 @@ dependencies = [
|
||||
name = "ezpplauncher"
|
||||
version = "3.2.1"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"anyhow",
|
||||
"base64 0.22.1",
|
||||
"byteorder",
|
||||
@@ -1197,10 +1253,12 @@ dependencies = [
|
||||
"open",
|
||||
"presenceforge",
|
||||
"reqwest",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_repr",
|
||||
"sha1",
|
||||
"sha2 0.11.0",
|
||||
"sysinfo",
|
||||
"tauri",
|
||||
"tauri-build",
|
||||
@@ -1209,6 +1267,7 @@ dependencies = [
|
||||
"tauri-plugin-fs",
|
||||
"tauri-plugin-shell",
|
||||
"tauri-plugin-single-instance",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"url",
|
||||
"widestring",
|
||||
@@ -1218,6 +1277,18 @@ dependencies = [
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fallible-iterator"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
|
||||
|
||||
[[package]]
|
||||
name = "fallible-streaming-iterator"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.3.0"
|
||||
@@ -1602,6 +1673,16 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ghash"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
|
||||
dependencies = [
|
||||
"opaque-debug",
|
||||
"polyval",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
version = "0.18.4"
|
||||
@@ -1799,6 +1880,18 @@ name = "hashbrown"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
||||
dependencies = [
|
||||
"foldhash 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
@@ -2153,6 +2246,15 @@ dependencies = [
|
||||
"cfb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inout"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inout"
|
||||
version = "0.2.2"
|
||||
@@ -2384,6 +2486,17 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.38.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a76001fb4daed01e5f2b518aac0b4dc592e7c734da63dbffcf0c64fa612a8d0c"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libz-rs-sys"
|
||||
version = "0.5.5"
|
||||
@@ -2554,7 +2667,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"png 0.18.1",
|
||||
"serde",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
@@ -2916,6 +3029,12 @@ version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "open"
|
||||
version = "5.3.5"
|
||||
@@ -3291,6 +3410,18 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polyval"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures 0.2.17",
|
||||
"opaque-debug",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "potential_utf"
|
||||
version = "0.1.4"
|
||||
@@ -3340,7 +3471,7 @@ dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"uuid",
|
||||
]
|
||||
@@ -3462,7 +3593,7 @@ dependencies = [
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
"socket2",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"web-time",
|
||||
@@ -3484,7 +3615,7 @@ dependencies = [
|
||||
"rustls",
|
||||
"rustls-pki-types",
|
||||
"slab",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tinyvec",
|
||||
"tracing",
|
||||
"web-time",
|
||||
@@ -3658,7 +3789,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
||||
dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3794,6 +3925,31 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rsqlite-vfs"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rusqlite"
|
||||
version = "0.40.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b3492ea85308705c3a5cc24fb9b9cf77273d30590349070db42991202b214c4"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"fallible-iterator",
|
||||
"fallible-streaming-iterator",
|
||||
"hashlink",
|
||||
"libsqlite3-sys",
|
||||
"smallvec",
|
||||
"sqlite-wasm-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.1"
|
||||
@@ -4402,6 +4558,18 @@ dependencies = [
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sqlite-wasm-rs"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc3efc0da82635d7e1ced0053bbbfa8c7ab9645d0bf36ceb4f7127bb85315d75"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"js-sys",
|
||||
"rsqlite-vfs",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stable_deref_trait"
|
||||
version = "1.2.1"
|
||||
@@ -4676,7 +4844,7 @@ dependencies = [
|
||||
"tauri-runtime",
|
||||
"tauri-runtime-wry",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"tray-icon",
|
||||
"url",
|
||||
@@ -4727,7 +4895,7 @@ dependencies = [
|
||||
"sha2 0.10.9",
|
||||
"syn 2.0.113",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"time",
|
||||
"url",
|
||||
"uuid",
|
||||
@@ -4780,7 +4948,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"url",
|
||||
]
|
||||
@@ -4799,7 +4967,7 @@ dependencies = [
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"tauri-plugin-fs",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"url",
|
||||
]
|
||||
|
||||
@@ -4822,7 +4990,7 @@ dependencies = [
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"toml 1.1.0+spec-1.1.0",
|
||||
"url",
|
||||
]
|
||||
@@ -4844,7 +5012,7 @@ dependencies = [
|
||||
"shared_child",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
@@ -4857,7 +5025,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"tracing",
|
||||
"windows-sys 0.60.2",
|
||||
"zbus",
|
||||
@@ -4881,7 +5049,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"url",
|
||||
"webkit2gtk",
|
||||
"webview2-com",
|
||||
@@ -4946,7 +5114,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"serde_with",
|
||||
"swift-rs",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"toml 1.1.0+spec-1.1.0",
|
||||
"url",
|
||||
"urlpattern",
|
||||
@@ -5010,11 +5178,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.17"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
|
||||
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.17",
|
||||
"thiserror-impl 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5030,9 +5198,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.17"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
|
||||
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -5361,7 +5529,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"png 0.18.1",
|
||||
"serde",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
@@ -5459,6 +5627,16 @@ version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||
|
||||
[[package]]
|
||||
name = "universal-hash"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.9.0"
|
||||
@@ -5514,6 +5692,12 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "version-compare"
|
||||
version = "0.2.1"
|
||||
@@ -5817,7 +6001,7 @@ version = "0.38.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c"
|
||||
dependencies = [
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"windows 0.61.3",
|
||||
"windows-core 0.61.2",
|
||||
]
|
||||
@@ -6510,7 +6694,7 @@ dependencies = [
|
||||
"sha2 0.10.9",
|
||||
"soup3",
|
||||
"tao-macros",
|
||||
"thiserror 2.0.17",
|
||||
"thiserror 2.0.18",
|
||||
"url",
|
||||
"webkit2gtk",
|
||||
"webkit2gtk-sys",
|
||||
@@ -6712,7 +6896,7 @@ version = "8.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"aes 0.9.0",
|
||||
"bzip2",
|
||||
"constant_time_eq",
|
||||
"crc32fast",
|
||||
|
||||
@@ -51,11 +51,15 @@ url = "2.5.8"
|
||||
zip = "8.6.0"
|
||||
sha1 = "0.11.0"
|
||||
hex = "0.4.3"
|
||||
rusqlite = { version = "0.40.0", features = ["bundled"] }
|
||||
aes-gcm = "0.10.3"
|
||||
base64 = "0.22.1"
|
||||
sha2 = "0.11.0"
|
||||
thiserror = "2.0.18"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winreg = "0.56.0"
|
||||
winapi = { version = "0.3.9", features = ["winuser", "wincrypt", "memoryapi", "winbase", "dpapi"] }
|
||||
base64 = "0.22.1"
|
||||
widestring = "1.2.1"
|
||||
windows-sys = "0.61.2"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use crate::config::ConfigError;
|
||||
use hardware_id::get_id;
|
||||
use reqwest::Client;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashSet;
|
||||
use std::io::Read;
|
||||
use std::path::PathBuf;
|
||||
@@ -9,15 +11,16 @@ use sysinfo::System;
|
||||
use tauri::AppHandle;
|
||||
use tauri::Emitter;
|
||||
use tauri::Manager;
|
||||
use tauri::State;
|
||||
use tauri_plugin_fs::FsExt;
|
||||
use tokio::fs;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::process::Command;
|
||||
use tokio::time::{Duration, sleep};
|
||||
|
||||
use crate::OpenedUrls;
|
||||
use crate::osudb::parse_osudb;
|
||||
use crate::presence;
|
||||
use crate::state::AppState;
|
||||
use crate::utils::{
|
||||
check_folder_completeness, encrypt_password, get_osu_config, get_osu_user_config,
|
||||
get_window_title_by_pid, is_net8_installed, is_osuwinello_available, is_wmctrl_available,
|
||||
@@ -26,8 +29,8 @@ use crate::utils::{
|
||||
|
||||
#[tauri::command]
|
||||
pub fn opened_urls(app: tauri::AppHandle) -> Vec<PathBuf> {
|
||||
let args = app.state::<OpenedUrls>().0.lock().unwrap().clone();
|
||||
app.state::<OpenedUrls>().0.lock().unwrap().clear();
|
||||
let args = app.state::<AppState>().opened_files.lock().unwrap().clone();
|
||||
app.state::<AppState>().opened_files.lock().unwrap().clear();
|
||||
|
||||
args
|
||||
}
|
||||
@@ -1315,3 +1318,38 @@ pub async fn read_theme_info(app: AppHandle, file_path: String) -> Result<ThemeI
|
||||
.await
|
||||
.map_err(|e| format!("Thread error: {}", e))?
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_get(key: String, state: State<AppState>) -> Result<Option<Value>, ConfigError> {
|
||||
state.config.lock().unwrap().get(&key)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_set(
|
||||
key: String,
|
||||
value: Value,
|
||||
encrypt: bool,
|
||||
state: State<AppState>,
|
||||
) -> Result<(), ConfigError> {
|
||||
state.config.lock().unwrap().set(&key, value, encrypt)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_exists(key: String, state: State<AppState>) -> Result<bool, ConfigError> {
|
||||
state.config.lock().unwrap().exists(&key)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_delete(key: String, state: State<AppState>) -> Result<(), ConfigError> {
|
||||
state.config.lock().unwrap().delete(&key)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_clear(state: State<AppState>) -> Result<(), ConfigError> {
|
||||
state.config.lock().unwrap().clear()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn config_all(state: State<AppState>) -> Result<Vec<(String, Value)>, ConfigError> {
|
||||
state.config.lock().unwrap().all()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
use aes_gcm::aead::rand_core::RngCore;
|
||||
use aes_gcm::{
|
||||
Aes256Gcm, Key, Nonce,
|
||||
aead::{Aead, KeyInit, OsRng},
|
||||
};
|
||||
use base64::{Engine, engine::general_purpose::STANDARD as BASE64};
|
||||
use rusqlite::{Connection, OptionalExtension, params};
|
||||
use serde_json::Value;
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::path::PathBuf;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ConfigError {
|
||||
#[error("SQLite error: {0}")]
|
||||
Sqlite(#[from] rusqlite::Error),
|
||||
#[error("Encryption error: {0}")]
|
||||
Encryption(String),
|
||||
#[error("JSON error: {0}")]
|
||||
Json(#[from] serde_json::Error),
|
||||
#[error("Base64 error: {0}")]
|
||||
Base64(#[from] base64::DecodeError),
|
||||
#[error("Config not initialized")]
|
||||
NotInitialized,
|
||||
#[error("IO error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
}
|
||||
|
||||
impl serde::Serialize for ConfigError {
|
||||
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
|
||||
s.serialize_str(&self.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Config {
|
||||
db_path: PathBuf,
|
||||
conn: Option<Connection>,
|
||||
hwid_key: Option<[u8; 32]>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new(db_path: impl Into<PathBuf>) -> Self {
|
||||
Self {
|
||||
db_path: db_path.into(),
|
||||
conn: None,
|
||||
hwid_key: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init(&mut self, hwid: &str) -> Result<bool, ConfigError> {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(hwid.as_bytes());
|
||||
let key_bytes: [u8; 32] = hasher.finalize().into();
|
||||
self.hwid_key = Some(key_bytes);
|
||||
|
||||
let is_new = !self.db_path.exists();
|
||||
|
||||
if let Some(parent) = self.db_path.parent() {
|
||||
std::fs::create_dir_all(parent)?;
|
||||
}
|
||||
|
||||
let conn = Connection::open(&self.db_path)?;
|
||||
|
||||
conn.execute_batch(
|
||||
"
|
||||
PRAGMA journal_mode=WAL;
|
||||
CREATE TABLE IF NOT EXISTS config (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
encrypted INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
",
|
||||
)?;
|
||||
|
||||
self.conn = Some(conn);
|
||||
Ok(is_new)
|
||||
}
|
||||
|
||||
pub fn get(&self, key: &str) -> Result<Option<Value>, ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
|
||||
let mut stmt = conn.prepare("SELECT value, encrypted FROM config WHERE key = ?1")?;
|
||||
|
||||
let row: Option<(String, bool)> = stmt
|
||||
.query_row(params![key], |r| Ok((r.get(0)?, r.get(1)?)))
|
||||
.optional()?;
|
||||
|
||||
match row {
|
||||
None => Ok(None),
|
||||
Some((raw, false)) => Ok(Some(serde_json::from_str::<Value>(&raw)?)),
|
||||
Some((raw, true)) => {
|
||||
let plaintext = self
|
||||
.decrypt_value(&raw)
|
||||
.map_err(|_| ConfigError::Encryption(format!("failed to decrypt '{}'", key)))?;
|
||||
|
||||
serde_json::from_str::<Value>(&plaintext)
|
||||
.map(Some)
|
||||
.map_err(|_| {
|
||||
ConfigError::Encryption(format!("decrypted '{}' is not valid JSON", key))
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn exists(&self, key: &str) -> Result<bool, ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
let count: i64 = conn.query_row(
|
||||
"SELECT COUNT(*) FROM config WHERE key = ?1",
|
||||
params![key],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
Ok(count > 0)
|
||||
}
|
||||
|
||||
/// Return all key/value pairs (decrypting encrypted ones).
|
||||
pub fn all(&self) -> Result<Vec<(String, Value)>, ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
let mut stmt = conn.prepare("SELECT key, value, encrypted FROM config")?;
|
||||
|
||||
let rows = stmt.query_map([], |r| {
|
||||
Ok((
|
||||
r.get::<_, String>(0)?,
|
||||
r.get::<_, String>(1)?,
|
||||
r.get::<_, bool>(2)?,
|
||||
))
|
||||
})?;
|
||||
|
||||
let mut out = Vec::new();
|
||||
for row in rows {
|
||||
let (k, raw, enc) = row?;
|
||||
let v: Value = if enc {
|
||||
let pt = self.decrypt_value(&raw)?;
|
||||
serde_json::from_str(&pt)?
|
||||
} else {
|
||||
serde_json::from_str(&raw)?
|
||||
};
|
||||
out.push((k, v));
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
pub fn set<T: serde::Serialize>(
|
||||
&self,
|
||||
key: &str,
|
||||
value: T,
|
||||
encrypt: bool,
|
||||
) -> Result<(), ConfigError> {
|
||||
let json = serde_json::to_string(&value)?;
|
||||
if encrypt {
|
||||
let blob = self.encrypt_value(&json)?;
|
||||
self.upsert(key, &blob, true)
|
||||
} else {
|
||||
self.upsert(key, &json, false)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn delete(&self, key: &str) -> Result<(), ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
conn.execute("DELETE FROM config WHERE key = ?1", params![key])?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn clear(&self) -> Result<(), ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
conn.execute("DELETE FROM config", [])?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn upsert(&self, key: &str, raw: &str, encrypted: bool) -> Result<(), ConfigError> {
|
||||
let conn = self.conn.as_ref().ok_or(ConfigError::NotInitialized)?;
|
||||
conn.execute(
|
||||
"INSERT INTO config (key, value, encrypted)
|
||||
VALUES (?1, ?2, ?3)
|
||||
ON CONFLICT(key) DO UPDATE SET value = excluded.value,
|
||||
encrypted = excluded.encrypted",
|
||||
params![key, raw, encrypted as i32],
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn cipher(&self) -> Result<Aes256Gcm, ConfigError> {
|
||||
let key_bytes = self.hwid_key.ok_or(ConfigError::NotInitialized)?;
|
||||
let key = Key::<Aes256Gcm>::from_slice(&key_bytes);
|
||||
Ok(Aes256Gcm::new(key))
|
||||
}
|
||||
|
||||
fn encrypt_value(&self, plaintext: &str) -> Result<String, ConfigError> {
|
||||
let cipher = self.cipher()?;
|
||||
let mut nonce_bytes = [0u8; 12];
|
||||
OsRng.fill_bytes(&mut nonce_bytes);
|
||||
let nonce = Nonce::from_slice(&nonce_bytes);
|
||||
|
||||
let ciphertext = cipher
|
||||
.encrypt(nonce, plaintext.as_bytes())
|
||||
.map_err(|e| ConfigError::Encryption(e.to_string()))?;
|
||||
|
||||
let mut combined = nonce_bytes.to_vec();
|
||||
combined.extend_from_slice(&ciphertext);
|
||||
Ok(BASE64.encode(&combined))
|
||||
}
|
||||
|
||||
fn decrypt_value(&self, blob: &str) -> Result<String, ConfigError> {
|
||||
let cipher = self.cipher()?;
|
||||
let combined = BASE64.decode(blob)?;
|
||||
|
||||
if combined.len() < 12 {
|
||||
return Err(ConfigError::Encryption("blob too short".into()));
|
||||
}
|
||||
|
||||
let (nonce_bytes, ciphertext) = combined.split_at(12);
|
||||
let nonce = Nonce::from_slice(nonce_bytes);
|
||||
|
||||
let plaintext = cipher
|
||||
.decrypt(nonce, ciphertext)
|
||||
.map_err(|e| ConfigError::Encryption(e.to_string()))?;
|
||||
|
||||
String::from_utf8(plaintext).map_err(|e| ConfigError::Encryption(e.to_string()))
|
||||
}
|
||||
}
|
||||
+45
-20
@@ -1,28 +1,34 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
use hardware_id::get_id;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Mutex;
|
||||
use tauri::Manager;
|
||||
use tauri_plugin_fs::FsExt;
|
||||
|
||||
pub mod commands;
|
||||
pub mod config;
|
||||
pub mod osudb;
|
||||
pub mod presence;
|
||||
pub mod state;
|
||||
pub mod utils;
|
||||
use crate::commands::{
|
||||
check_for_corruption, download_and_extract_theme, download_ezpp_launcher_update,
|
||||
download_ezpp_launcher_update_files, encrypt_string, exit, extract_theme,
|
||||
find_osu_installation, get_beatmapsets_count, get_ezpp_launcher_update_files, get_hwid,
|
||||
get_launcher_version, get_osu_release_stream, get_osu_skin, get_osu_version, get_platform,
|
||||
get_skins, get_skins_count, has_net8, has_osuwinello, has_wmctrl, install_ezpp_launcher_update,
|
||||
is_open_tablet_driver_path_valid, is_open_tablet_driver_running, is_osu_running,
|
||||
open_url_in_browser, opened_urls, presence_connect, presence_disconnect, presence_is_connected,
|
||||
presence_update_button, presence_update_status, presence_update_user, read_theme_info,
|
||||
replace_ui_files, run_open_tablet_driver, run_osu, run_osu_updater, set_osu_config_values,
|
||||
set_osu_user_config_values, stop_open_tablet_driver, valid_osu_folder,
|
||||
use crate::{
|
||||
commands::{
|
||||
check_for_corruption, config_all, config_clear, config_delete, config_exists, config_get,
|
||||
config_set, download_and_extract_theme, download_ezpp_launcher_update,
|
||||
download_ezpp_launcher_update_files, encrypt_string, exit, extract_theme,
|
||||
find_osu_installation, get_beatmapsets_count, get_ezpp_launcher_update_files, get_hwid,
|
||||
get_launcher_version, get_osu_release_stream, get_osu_skin, get_osu_version, get_platform,
|
||||
get_skins, get_skins_count, has_net8, has_osuwinello, has_wmctrl,
|
||||
install_ezpp_launcher_update, is_open_tablet_driver_path_valid,
|
||||
is_open_tablet_driver_running, is_osu_running, open_url_in_browser, opened_urls,
|
||||
presence_connect, presence_disconnect, presence_is_connected, presence_update_button,
|
||||
presence_update_status, presence_update_user, read_theme_info, replace_ui_files,
|
||||
run_open_tablet_driver, run_osu, run_osu_updater, set_osu_config_values,
|
||||
set_osu_user_config_values, stop_open_tablet_driver, valid_osu_folder,
|
||||
},
|
||||
state::AppState,
|
||||
};
|
||||
|
||||
struct OpenedUrls(Mutex<Vec<PathBuf>>);
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
#[cfg(target_os = "linux")]
|
||||
@@ -60,26 +66,39 @@ pub fn run() {
|
||||
}
|
||||
|
||||
let app = builder
|
||||
.manage(OpenedUrls(Mutex::new(vec![])))
|
||||
.setup(|app| {
|
||||
// ── Config ────────────────────────────────────────────────────────
|
||||
let home = std::env::var("HOME")
|
||||
.or_else(|_| std::env::var("USERPROFILE"))
|
||||
.unwrap_or_else(|_| ".".into());
|
||||
let db_path = PathBuf::from(home).join(".ezpplauncher").join("config.db");
|
||||
|
||||
let hwid = get_id().unwrap_or_else(|_| "recorderinsandybridge".into());
|
||||
|
||||
let mut cfg = config::Config::new(db_path);
|
||||
cfg.init(&hwid)?;
|
||||
|
||||
// ── Opened files ──────────────────────────────────────────────────
|
||||
let mut opened_files = Vec::new();
|
||||
let args = std::env::args().collect::<Vec<_>>();
|
||||
if args.len() > 1 {
|
||||
let mut files = Vec::new();
|
||||
|
||||
for maybe_file in args.iter().skip(1) {
|
||||
if maybe_file.starts_with("-") {
|
||||
continue;
|
||||
}
|
||||
|
||||
let path = PathBuf::from(maybe_file);
|
||||
if path.extension().and_then(|e| e.to_str()) == Some("ezpplauncher-theme") {
|
||||
app.fs_scope().allow_file(&path).ok();
|
||||
files.push(path);
|
||||
opened_files.push(path);
|
||||
}
|
||||
}
|
||||
|
||||
app.state::<OpenedUrls>().0.lock().unwrap().extend(files);
|
||||
}
|
||||
|
||||
app.manage(AppState {
|
||||
config: Mutex::new(cfg),
|
||||
opened_files: Mutex::new(opened_files),
|
||||
});
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
@@ -121,6 +140,12 @@ pub fn run() {
|
||||
read_theme_info,
|
||||
extract_theme,
|
||||
download_and_extract_theme,
|
||||
config_get,
|
||||
config_set,
|
||||
config_exists,
|
||||
config_delete,
|
||||
config_clear,
|
||||
config_all,
|
||||
run_open_tablet_driver,
|
||||
stop_open_tablet_driver,
|
||||
is_open_tablet_driver_running,
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// state.rs
|
||||
use crate::config::Config;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Mutex;
|
||||
|
||||
pub struct AppState {
|
||||
pub config: Mutex<Config>,
|
||||
pub opened_files: Mutex<Vec<PathBuf>>,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { config } from '$lib/config';
|
||||
import { custom_theme_audio_playing, custom_theme_volume } from '$lib/global';
|
||||
import { reduceAnimations, userSettings } from '$lib/userSettings';
|
||||
import { reduceAnimations } from '$lib/userSettings';
|
||||
import { Volume, Volume1, VolumeOff } from '@lucide/svelte';
|
||||
import Minimize from '@lucide/svelte/icons/minus';
|
||||
import Volume2 from '@lucide/svelte/icons/volume-2';
|
||||
@@ -62,8 +63,7 @@
|
||||
step="0.01"
|
||||
bind:value={$custom_theme_volume}
|
||||
on:input={() => {
|
||||
$userSettings.value('volume').set($custom_theme_volume);
|
||||
$userSettings.save();
|
||||
config.value<number>('volume').set($custom_theme_volume);
|
||||
}}
|
||||
class="volume-slider"
|
||||
/>
|
||||
|
||||
+31
-79
@@ -1,87 +1,39 @@
|
||||
import { Crypto } from './crypto';
|
||||
import { getHWID } from './osuUtil';
|
||||
import * as path from '@tauri-apps/api/path';
|
||||
import { exists, mkdir, readTextFile, writeFile } from '@tauri-apps/plugin-fs';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
export class Config {
|
||||
private fileName: string;
|
||||
private config: Record<string, unknown> = {};
|
||||
private crypto: Crypto | undefined;
|
||||
private configFilePath: string | undefined;
|
||||
private encrypt: boolean;
|
||||
interface ConfigValue<T> {
|
||||
set(value: T, opts?: { encrypt?: boolean }): Promise<void>;
|
||||
get(fallback: T): Promise<T>;
|
||||
exists(): Promise<boolean>;
|
||||
delete(): Promise<void>;
|
||||
}
|
||||
|
||||
constructor(fileName: string, encrypt?: boolean) {
|
||||
this.fileName = fileName;
|
||||
this.encrypt = encrypt ?? false;
|
||||
}
|
||||
|
||||
async init(): Promise<boolean> {
|
||||
const hwid = (await getHWID()) ?? 'recorderinsandybridge';
|
||||
|
||||
this.crypto = new Crypto(hwid);
|
||||
|
||||
const homeDir = await path.homeDir();
|
||||
const folderPath = await path.join(homeDir, '.ezpplauncher');
|
||||
this.configFilePath = await path.join(folderPath, this.fileName);
|
||||
|
||||
const createFolder = !(await exists(folderPath));
|
||||
if (createFolder) await mkdir(folderPath);
|
||||
|
||||
const configExists = await exists(this.configFilePath);
|
||||
if (!configExists) return true;
|
||||
|
||||
await this.load();
|
||||
return false;
|
||||
}
|
||||
|
||||
private async load() {
|
||||
if (!this.configFilePath) throw Error('configFilePath not set');
|
||||
if (this.encrypt && !this.crypto) throw Error('crypto not initialized');
|
||||
|
||||
const fileStream = await readTextFile(this.configFilePath);
|
||||
try {
|
||||
const decryptedJSON = JSON.parse(
|
||||
this.encrypt && this.crypto ? this.crypto.decrypt(fileStream) : fileStream
|
||||
) as Record<string, unknown>;
|
||||
this.config = decryptedJSON;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.config = {};
|
||||
await this.save();
|
||||
}
|
||||
}
|
||||
|
||||
async save() {
|
||||
if (!this.configFilePath) throw Error('configFilePath not set');
|
||||
if (this.encrypt && !this.crypto) throw Error('crypto not initialized');
|
||||
const encryptedJSON =
|
||||
this.encrypt && this.crypto
|
||||
? this.crypto.encrypt(JSON.stringify(this.config))
|
||||
: JSON.stringify(this.config);
|
||||
|
||||
await writeFile(this.configFilePath, Buffer.from(encryptedJSON), {
|
||||
append: false,
|
||||
});
|
||||
}
|
||||
|
||||
values() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
value(key: string) {
|
||||
export const config = {
|
||||
value<T = unknown>(key: string): ConfigValue<T> {
|
||||
return {
|
||||
set: <T>(val: T) => {
|
||||
this.config[key] = val;
|
||||
set(value: T, opts?: { encrypt?: boolean }): Promise<void> {
|
||||
return invoke('config_set', { key, value, encrypt: opts?.encrypt ?? false });
|
||||
},
|
||||
exists: () => {
|
||||
return this.config[key] !== undefined;
|
||||
|
||||
async get(fallback: T): Promise<T> {
|
||||
const result = await invoke<T | null>('config_get', { key });
|
||||
return result ?? fallback;
|
||||
},
|
||||
get: <T>(fallback: T): T => {
|
||||
return (this.config[key] as T) ?? fallback;
|
||||
|
||||
exists(): Promise<boolean> {
|
||||
return invoke<boolean>('config_exists', { key });
|
||||
},
|
||||
del: () => {
|
||||
delete this.config[key];
|
||||
|
||||
delete(): Promise<void> {
|
||||
return invoke('config_delete', { key });
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
all(): Promise<[string, unknown][]> {
|
||||
return invoke<[string, unknown][]>('config_all');
|
||||
},
|
||||
|
||||
clear(): Promise<void> {
|
||||
return invoke('config_clear');
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import { Crypto } from './crypto';
|
||||
import { getHWID } from './osuUtil';
|
||||
import * as path from '@tauri-apps/api/path';
|
||||
import { exists, mkdir, readTextFile, writeFile, remove } from '@tauri-apps/plugin-fs';
|
||||
|
||||
export class Config {
|
||||
private fileName: string;
|
||||
private config: Record<string, unknown> = {};
|
||||
private crypto: Crypto | undefined;
|
||||
private configFilePath: string | undefined;
|
||||
private encrypt: boolean;
|
||||
|
||||
constructor(fileName: string, encrypt?: boolean) {
|
||||
this.fileName = fileName;
|
||||
this.encrypt = encrypt ?? false;
|
||||
}
|
||||
|
||||
async init(): Promise<boolean> {
|
||||
const hwid = (await getHWID()) ?? 'recorderinsandybridge';
|
||||
|
||||
this.crypto = new Crypto(hwid);
|
||||
|
||||
const homeDir = await path.homeDir();
|
||||
const folderPath = await path.join(homeDir, '.ezpplauncher');
|
||||
this.configFilePath = await path.join(folderPath, this.fileName);
|
||||
|
||||
const createFolder = !(await exists(folderPath));
|
||||
if (createFolder) await mkdir(folderPath);
|
||||
|
||||
const configExists = await exists(this.configFilePath);
|
||||
if (configExists) {
|
||||
await this.load();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private async load() {
|
||||
if (!this.configFilePath) throw Error('configFilePath not set');
|
||||
if (this.encrypt && !this.crypto) throw Error('crypto not initialized');
|
||||
|
||||
const fileStream = await readTextFile(this.configFilePath);
|
||||
try {
|
||||
const decryptedJSON = JSON.parse(
|
||||
this.encrypt && this.crypto ? this.crypto.decrypt(fileStream) : fileStream
|
||||
) as Record<string, unknown>;
|
||||
this.config = decryptedJSON;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.config = {};
|
||||
await this.save();
|
||||
}
|
||||
}
|
||||
|
||||
async delete() {
|
||||
if (!this.configFilePath) throw Error('configFilePath not set');
|
||||
await remove(this.configFilePath);
|
||||
}
|
||||
|
||||
async save() {
|
||||
if (!this.configFilePath) throw Error('configFilePath not set');
|
||||
if (this.encrypt && !this.crypto) throw Error('crypto not initialized');
|
||||
const encryptedJSON =
|
||||
this.encrypt && this.crypto
|
||||
? this.crypto.encrypt(JSON.stringify(this.config))
|
||||
: JSON.stringify(this.config);
|
||||
|
||||
await writeFile(this.configFilePath, Buffer.from(encryptedJSON), {
|
||||
append: false,
|
||||
});
|
||||
}
|
||||
|
||||
values() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
value(key: string) {
|
||||
return {
|
||||
set: <T>(val: T) => {
|
||||
this.config[key] = val;
|
||||
},
|
||||
exists: () => {
|
||||
return this.config[key] !== undefined;
|
||||
},
|
||||
get: <T>(fallback: T): T => {
|
||||
return (this.config[key] as T) ?? fallback;
|
||||
},
|
||||
del: () => {
|
||||
delete this.config[key];
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,6 @@ export const loadTheme = async (theme: Theme, themeContainer: HTMLElement, volum
|
||||
};
|
||||
|
||||
export const deleteTheme = async (themeToUninstall: Theme) => {
|
||||
console.log('Uninstall', themeToUninstall);
|
||||
if (themeToUninstall.status !== 'installed') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Config } from './config';
|
||||
import type { EZPPUser } from './types';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const userAuth = writable<Config>(new Config('user_auth', true));
|
||||
export const currentUser = writable<EZPPUser | undefined>(undefined);
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { Config } from './config';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const userSettings = writable<Config>(new Config('user_settings', false));
|
||||
|
||||
export const customCursor = writable<boolean>(false);
|
||||
export const cursorSmoothening = writable<boolean>(false);
|
||||
export const cursorSmoothness = writable<number>(180);
|
||||
|
||||
+65
-37
@@ -6,6 +6,8 @@
|
||||
import OsuCursor from '$lib/components/ui/osu-cursor/OsuCursor.svelte';
|
||||
import SileoToast from '$lib/components/ui/sileo/sileo-toast.svelte';
|
||||
import Titlebar from '$lib/components/ui/titlebar/titlebar.svelte';
|
||||
import { config } from '$lib/config';
|
||||
import { Config } from '$lib/config_old';
|
||||
import {
|
||||
active_custom_theme,
|
||||
currentLoadingInfo,
|
||||
@@ -25,14 +27,12 @@
|
||||
import { exit, getLauncherVersion, getPlatform } from '$lib/osuUtil';
|
||||
import * as presence from '$lib/presence';
|
||||
import { getDownloadableThemes, getThemes, loadTheme } from '$lib/themes';
|
||||
import { userAuth } from '$lib/userAuthentication';
|
||||
import {
|
||||
cursorSmoothening,
|
||||
customCursor,
|
||||
osuInstallationPath,
|
||||
patch,
|
||||
reduceAnimations,
|
||||
userSettings,
|
||||
} from '$lib/userSettings';
|
||||
import { trackMediaContainer } from '$lib/utils';
|
||||
import '../app.css';
|
||||
@@ -94,51 +94,79 @@
|
||||
disableReload();
|
||||
setupValues();
|
||||
launcherVersion.set(await getLauncherVersion());
|
||||
const isFirstStartup = await $userSettings.init();
|
||||
firstStartup.set(isFirstStartup);
|
||||
$userAuth.init();
|
||||
|
||||
const oldUserConfig = new Config('user_settings', false);
|
||||
const oldUserConfigExists = await oldUserConfig.init();
|
||||
if (oldUserConfigExists) {
|
||||
const oldUserConfigValues = oldUserConfig.values();
|
||||
if (Object.keys(oldUserConfigValues).length > 0) {
|
||||
await config.value<boolean>('setup_complete').set(true);
|
||||
|
||||
for (const key in oldUserConfigValues) {
|
||||
const value = oldUserConfigValues[key];
|
||||
await config.value<typeof value>(key).set(value);
|
||||
}
|
||||
}
|
||||
await oldUserConfig.delete();
|
||||
}
|
||||
|
||||
const oldUserAuth = new Config('user_auth', true);
|
||||
const oldUserAuthExists = await oldUserAuth.init();
|
||||
if (oldUserAuthExists) {
|
||||
const oldUserAuthValues = oldUserAuth.values();
|
||||
if (Object.keys(oldUserAuthValues).length > 0) {
|
||||
for (const key in oldUserAuthValues) {
|
||||
const value = oldUserAuthValues[key];
|
||||
await config.value<typeof value>(key).set(value);
|
||||
}
|
||||
}
|
||||
await oldUserAuth.delete();
|
||||
}
|
||||
|
||||
const isSetupComplete = await config.value<boolean>('setup_complete').get(false);
|
||||
firstStartup.set(!isSetupComplete);
|
||||
|
||||
currentLoadingInfo.set('Loading config...');
|
||||
const config_theme = $userSettings.value('theme');
|
||||
const config_theme_volume = $userSettings.value('volume');
|
||||
const config_patching = $userSettings.value('patching');
|
||||
const config_custom_cursor = $userSettings.value('custom_cursor');
|
||||
const config_cursor_smoothening = $userSettings.value('cursor_smoothening');
|
||||
const config_reduce_animations = $userSettings.value('reduce_animations');
|
||||
const config_osu_installation_path = $userSettings.value('osu_installation_path');
|
||||
const config_discord_presence = $userSettings.value('discord_presence');
|
||||
const config_tracking_enabled = $userSettings.value('tracking_consent');
|
||||
const config_otd_enabled = $userSettings.value('otd_enabled');
|
||||
const config_otd_path = $userSettings.value('otd_path');
|
||||
const config_theme = config.value<string>('theme');
|
||||
const config_theme_volume = config.value<number>('volume');
|
||||
const config_patching = config.value<boolean>('patching');
|
||||
const config_custom_cursor = config.value<boolean>('custom_cursor');
|
||||
const config_cursor_smoothening = config.value<boolean>('cursor_smoothening');
|
||||
const config_reduce_animations = config.value<boolean>('reduce_animations');
|
||||
const config_osu_installation_path = config.value<string>('osu_installation_path');
|
||||
const config_discord_presence = config.value<boolean>('discord_presence');
|
||||
const config_tracking_enabled = config.value<boolean>('tracking_consent');
|
||||
const config_otd_enabled = config.value<boolean>('otd_enabled');
|
||||
const config_otd_path = config.value<string>('otd_path');
|
||||
|
||||
const localThemes = await getThemes();
|
||||
const last_theme = localThemes.find((t) => t.name === config_theme.get('Default'));
|
||||
const lastThemeName = await config_theme.get('Default');
|
||||
const last_theme = localThemes.find((t) => t.name === lastThemeName);
|
||||
if (!last_theme) {
|
||||
$userSettings.value('theme').set('Default');
|
||||
await $userSettings.save();
|
||||
loadTheme(localThemes[0], $custom_theme_container!, config_theme_volume.get(0.15));
|
||||
await config.value<string>('theme').set('Default');
|
||||
loadTheme(localThemes[0], $custom_theme_container!, await config_theme_volume.get(0.15));
|
||||
} else {
|
||||
loadTheme(last_theme, $custom_theme_container!, config_theme_volume.get(0.15));
|
||||
loadTheme(last_theme, $custom_theme_container!, await config_theme_volume.get(0.15));
|
||||
}
|
||||
|
||||
custom_theme_volume.set(config_theme_volume.get(0.15));
|
||||
patch.set(config_patching.get(true));
|
||||
customCursor.set(config_custom_cursor.get(true));
|
||||
cursorSmoothening.set(config_cursor_smoothening.get(true));
|
||||
reduceAnimations.set(config_reduce_animations.get(false));
|
||||
osuInstallationPath.set(config_osu_installation_path.get(''));
|
||||
discordPresence.set(config_discord_presence.get(true));
|
||||
openTabletDriverEnabled.set(config_otd_enabled.get(false));
|
||||
openTabletDriverPath.set(config_otd_path.get(''));
|
||||
if (config_tracking_enabled.exists()) {
|
||||
trackingEnabled.set(config_tracking_enabled.get(false));
|
||||
custom_theme_volume.set(await config_theme_volume.get(0.15));
|
||||
patch.set(await config_patching.get(true));
|
||||
customCursor.set(await config_custom_cursor.get(true));
|
||||
cursorSmoothening.set(await config_cursor_smoothening.get(true));
|
||||
reduceAnimations.set(await config_reduce_animations.get(false));
|
||||
osuInstallationPath.set(await config_osu_installation_path.get(''));
|
||||
discordPresence.set(await config_discord_presence.get(true));
|
||||
openTabletDriverEnabled.set(await config_otd_enabled.get(false));
|
||||
openTabletDriverPath.set(await config_otd_path.get(''));
|
||||
if (await config_tracking_enabled.exists()) {
|
||||
trackingEnabled.set(await config_tracking_enabled.get(false));
|
||||
}
|
||||
|
||||
patch.subscribe((val) => config_patching.set(val));
|
||||
customCursor.subscribe((val) => config_custom_cursor.set(val));
|
||||
cursorSmoothening.subscribe((val) => config_cursor_smoothening.set(val));
|
||||
reduceAnimations.subscribe((val) => config_reduce_animations.set(val));
|
||||
openTabletDriverEnabled.subscribe((val) => config_otd_enabled.set(val));
|
||||
patch.subscribe(async (val) => await config_patching.set(val));
|
||||
customCursor.subscribe(async (val) => await config_custom_cursor.set(val));
|
||||
cursorSmoothening.subscribe(async (val) => await config_cursor_smoothening.set(val));
|
||||
reduceAnimations.subscribe(async (val) => await config_reduce_animations.set(val));
|
||||
openTabletDriverEnabled.subscribe(async (val) => config_otd_enabled.set(val));
|
||||
|
||||
discordPresence.subscribe(async (val) => {
|
||||
config_discord_presence.set(val);
|
||||
|
||||
+30
-41
@@ -15,6 +15,7 @@
|
||||
import Progress from '$lib/components/ui/progress/progress.svelte';
|
||||
import ScrollContainer from '$lib/components/ui/scroll-container/ScrollContainer.svelte';
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import { config } from '$lib/config';
|
||||
import { currentUserInfo } from '$lib/data';
|
||||
import { useDropZone } from '$lib/dropZone.svelte';
|
||||
import {
|
||||
@@ -88,7 +89,7 @@
|
||||
type ThemeInfo,
|
||||
} from '$lib/themes';
|
||||
import { EZPPActionStatus } from '$lib/types';
|
||||
import { currentUser, userAuth } from '$lib/userAuthentication';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import {
|
||||
cursorSmoothening,
|
||||
customCursor,
|
||||
@@ -97,7 +98,6 @@
|
||||
preferredMode,
|
||||
preferredType,
|
||||
reduceAnimations,
|
||||
userSettings,
|
||||
} from '$lib/userSettings';
|
||||
import {
|
||||
compareBuildNumbers,
|
||||
@@ -220,8 +220,7 @@
|
||||
return;
|
||||
}
|
||||
osuInstallationPath.set(selectedPath);
|
||||
$userSettings.value('osu_installation_path').set(selectedPath);
|
||||
await $userSettings.save();
|
||||
await config.value<string>('osu_installation_path').set(selectedPath);
|
||||
sileo.success({
|
||||
title: 'Yay!',
|
||||
description: 'osu! installation path set successfully.',
|
||||
@@ -404,8 +403,10 @@
|
||||
launchInfo = 'You are up to date!';
|
||||
}
|
||||
if ($currentUser) {
|
||||
const username = $userAuth.value('username').get('');
|
||||
const password = $userAuth.value('password').get('');
|
||||
const [username, password] = await Promise.all([
|
||||
config.value<string>('username').get(''),
|
||||
config.value<string>('password').get(''),
|
||||
]);
|
||||
if (username.length > 0 && password.length > 0) {
|
||||
await setUserConfigValues(osuPath, [
|
||||
{
|
||||
@@ -703,10 +704,10 @@
|
||||
title: 'Login successful!',
|
||||
description: `Welcome back, ${loginResult.user.name}!`,
|
||||
});
|
||||
|
||||
$userAuth.value('username').set(username);
|
||||
$userAuth.value('password').set(password);
|
||||
await $userAuth.save();
|
||||
await Promise.all([
|
||||
config.value<string>('username').set(username, { encrypt: true }),
|
||||
config.value<string>('password').set(password, { encrypt: true }),
|
||||
]);
|
||||
|
||||
currentUser.set(loginResult.user);
|
||||
selectedView = 'home';
|
||||
@@ -839,8 +840,7 @@
|
||||
}
|
||||
|
||||
openTabletDriverPath.set(selectedPath);
|
||||
$userSettings.value('otd_path').set(selectedPath);
|
||||
await $userSettings.save();
|
||||
await config.value<string>('otd_path').set(selectedPath);
|
||||
sileo.success({
|
||||
title: 'Yay!',
|
||||
description: 'OpenTabletDriver set successfully.',
|
||||
@@ -849,13 +849,14 @@
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
const config = $userSettings;
|
||||
const trackingConsent = config.value('tracking_consent');
|
||||
if (trackingConsent.exists()) {
|
||||
trackingEnabled.set(trackingConsent.get(false));
|
||||
} else {
|
||||
askForTrackingPermission = true;
|
||||
}
|
||||
(async () => {
|
||||
const trackingConsent = config.value<boolean>('tracking_consent');
|
||||
if (await trackingConsent.exists()) {
|
||||
trackingEnabled.set(await trackingConsent.get(false));
|
||||
} else {
|
||||
askForTrackingPermission = true;
|
||||
}
|
||||
})();
|
||||
|
||||
animate(ezppLogo, {
|
||||
opacity: [0, 1],
|
||||
@@ -1008,9 +1009,7 @@
|
||||
<Button
|
||||
onclick={async () => {
|
||||
trackingEnabled.set(true);
|
||||
const config = $userSettings;
|
||||
config.value('tracking_consent').set(true);
|
||||
await config.save();
|
||||
await config.value<boolean>('tracking_consent').set(true);
|
||||
askForTrackingPermission = false;
|
||||
}}>Yes, I consent</Button
|
||||
>
|
||||
@@ -1018,9 +1017,7 @@
|
||||
variant="outline"
|
||||
onclick={async () => {
|
||||
trackingEnabled.set(false);
|
||||
const config = $userSettings;
|
||||
config.value('tracking_consent').set(false);
|
||||
await config.save();
|
||||
await config.value<boolean>('tracking_consent').set(false);
|
||||
askForTrackingPermission = false;
|
||||
}}>No, I do not consent</Button
|
||||
>
|
||||
@@ -1194,9 +1191,10 @@
|
||||
<DropdownMenu.Item
|
||||
class="text-destructive focus:text-destructive text-xs"
|
||||
onclick={async () => {
|
||||
$userAuth.value('username').del();
|
||||
$userAuth.value('password').del();
|
||||
await $userAuth.save();
|
||||
await Promise.all([
|
||||
config.value<string>('username').set(''),
|
||||
config.value<string>('password').set(''),
|
||||
]);
|
||||
sileo.success({
|
||||
title: 'Logout successful!',
|
||||
description: 'See you soon!',
|
||||
@@ -1566,7 +1564,6 @@
|
||||
disabled={$platform !== 'windows'}
|
||||
onCheckedChange={async (e) => {
|
||||
patch.set(e);
|
||||
$userSettings.save();
|
||||
}}
|
||||
class="flex items-center justify-center w-5 h-5"
|
||||
></Checkbox>
|
||||
@@ -1585,8 +1582,6 @@
|
||||
cursorSmoothening.set(false);
|
||||
}
|
||||
customCursor.set(e);
|
||||
|
||||
$userSettings.save();
|
||||
}}
|
||||
class="flex items-center justify-center w-5 h-5"
|
||||
></Checkbox>
|
||||
@@ -1603,7 +1598,6 @@
|
||||
onCheckedChange={async (e) => {
|
||||
if (!$customCursor) return;
|
||||
cursorSmoothening.set(e);
|
||||
$userSettings.save();
|
||||
}}
|
||||
disabled={!$customCursor}
|
||||
class="flex items-center justify-center w-5 h-5"
|
||||
@@ -1620,7 +1614,6 @@
|
||||
checked={$reduceAnimations}
|
||||
onCheckedChange={async (e) => {
|
||||
reduceAnimations.set(e);
|
||||
$userSettings.save();
|
||||
}}
|
||||
class="flex items-center justify-center w-5 h-5"
|
||||
></Checkbox>
|
||||
@@ -1656,8 +1649,7 @@
|
||||
checked={$trackingEnabled}
|
||||
onCheckedChange={async (e) => {
|
||||
trackingEnabled.set(e);
|
||||
$userSettings.value('tracking_consent').set(e);
|
||||
await $userSettings.save();
|
||||
await config.value<boolean>('tracking_consent').set(e);
|
||||
}}
|
||||
class="flex items-center justify-center w-5 h-5"
|
||||
></Checkbox>
|
||||
@@ -1738,9 +1730,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
$userSettings.value('patcherStream').set(newStream);
|
||||
await config.value<string>('patcherStream').set(newStream);
|
||||
launcherStream.set(newStream);
|
||||
await $userSettings.save();
|
||||
}}
|
||||
>
|
||||
<Select.Trigger
|
||||
@@ -1860,8 +1851,7 @@
|
||||
if (theme.status === 'installed') {
|
||||
if ($custom_theme_container) {
|
||||
loadTheme(theme, $custom_theme_container, $custom_theme_volume);
|
||||
$userSettings.value('theme').set(theme.name);
|
||||
$userSettings.save();
|
||||
await config.value<string>('theme').set(theme.name);
|
||||
} else {
|
||||
sileo.error({
|
||||
title: 'Uhhm..',
|
||||
@@ -1913,8 +1903,7 @@
|
||||
const defaultTheme = $custom_themes.find((t) => t.name === 'Default');
|
||||
if (defaultTheme) {
|
||||
loadTheme(defaultTheme, $custom_theme_container!, $custom_theme_volume);
|
||||
$userSettings.value('theme').set(defaultTheme.name);
|
||||
$userSettings.save();
|
||||
await config.value<string>('theme').set(defaultTheme.name);
|
||||
|
||||
if (!(await downloadTheme(theme, true))) {
|
||||
sileo.error({
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import Logo from '$assets/logo.png';
|
||||
import { ezppfarm } from '$lib/api/ezpp';
|
||||
import { git } from '$lib/api/git';
|
||||
import { config } from '$lib/config';
|
||||
import { currentUserInfo } from '$lib/data';
|
||||
import { estimateFrameRate } from '$lib/displayUtils';
|
||||
import {
|
||||
@@ -29,13 +30,12 @@
|
||||
isValidOsuFolder,
|
||||
} from '$lib/osuUtil';
|
||||
import type { EZPPUser } from '$lib/types';
|
||||
import { currentUser, userAuth } from '$lib/userAuthentication';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import {
|
||||
cursorSmoothness,
|
||||
osuInstallationPath,
|
||||
preferredMode,
|
||||
preferredType,
|
||||
userSettings,
|
||||
} from '$lib/userSettings';
|
||||
import Launch from './Launch.svelte';
|
||||
import SetupWizard from './SetupWizard.svelte';
|
||||
@@ -75,15 +75,14 @@
|
||||
const clamped = Math.min(Math.max(refreshRate, hzMin), hzMax);
|
||||
const duration =
|
||||
durationMin + ((clamped - hzMin) / (hzMax - hzMin)) * (durationMax - durationMin);
|
||||
console.log(Math.round(duration));
|
||||
cursorSmoothness.set(Math.round(duration));
|
||||
};
|
||||
|
||||
const prepare = async () => {
|
||||
await calculateCursorSmoothness();
|
||||
|
||||
const username = $userAuth.value('username').get('');
|
||||
const password = $userAuth.value('password').get('');
|
||||
const username = await config.value<string>('username').get('');
|
||||
const password = await config.value<string>('password').get('');
|
||||
|
||||
const shouldLogin = username.length > 0 && password.length > 0;
|
||||
let userLoginResult: { message: string; user?: EZPPUser } = {
|
||||
@@ -137,8 +136,7 @@
|
||||
const validFolder = await isValidOsuFolder($osuInstallationPath);
|
||||
if (!validFolder) {
|
||||
osuInstallationPath.set('');
|
||||
$userSettings.value('osu_installation_path').del();
|
||||
await $userSettings.save();
|
||||
await config.value<string>('osu_installation_path').set('');
|
||||
sileo.error({
|
||||
title: 'Hmm...',
|
||||
description: 'Your previously set osu! installation path seems to be invalid.',
|
||||
@@ -177,7 +175,7 @@
|
||||
const ezpplauncherStreams = await getEZPPLauncherStreams();
|
||||
if (ezpplauncherStreams) launcherStreams.set(ezpplauncherStreams);
|
||||
|
||||
const selectedLauncherStream = $userSettings.value('patcherStream').get('stable');
|
||||
const selectedLauncherStream = await config.value<string>('patcherStream').get('stable');
|
||||
if ($launcherStreams.includes(selectedLauncherStream)) {
|
||||
launcherStream.set(selectedLauncherStream);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import Checkbox from '$lib/components/ui/checkbox/checkbox.svelte';
|
||||
import Input from '$lib/components/ui/input/input.svelte';
|
||||
import Label from '$lib/components/ui/label/label.svelte';
|
||||
import { config } from '$lib/config';
|
||||
import {
|
||||
beatmapSets,
|
||||
currentSkin,
|
||||
@@ -32,7 +33,6 @@
|
||||
osuInstallationPath,
|
||||
patch,
|
||||
reduceAnimations,
|
||||
userSettings,
|
||||
} from '$lib/userSettings';
|
||||
import Launch from './Launch.svelte';
|
||||
import { Check, CircleCheckBig, CircleOff, LoaderCircle } from '@lucide/svelte';
|
||||
@@ -95,9 +95,9 @@
|
||||
};
|
||||
|
||||
const saveConfig = async () => {
|
||||
$userSettings.value('osu_installation_path').set(osuInstallPath);
|
||||
await $userSettings.save();
|
||||
await config.value<string>('osu_installation_path').set(osuInstallPath);
|
||||
osuInstallationPath.set(osuInstallPath);
|
||||
await config.value<boolean>('setup_complete').set(true);
|
||||
|
||||
const beatmapSetCount = await getBeatmapSetsCount(osuInstallPath);
|
||||
if (beatmapSetCount) {
|
||||
@@ -128,7 +128,7 @@
|
||||
if (osuPath) {
|
||||
osuInstallPath = osuPath;
|
||||
autoDetectedOsuPath = true;
|
||||
$userSettings.value('osu_installation_path').set(osuInstallPath);
|
||||
await config.value<string>('osu_installation_path').set(osuInstallPath);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user