add text hints for wheelchair users

This commit is contained in:
Yuhki 2025-05-16 14:40:11 +02:00
parent 9d1c7143ec
commit 7bd0b77bd0
4 changed files with 21 additions and 13 deletions

12
Cargo.lock generated
View file

@ -150,9 +150,9 @@ dependencies = [
[[package]] [[package]]
name = "ctrlc" name = "ctrlc"
version = "3.4.6" version = "3.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c" checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73"
dependencies = [ dependencies = [
"nix", "nix",
"windows-sys 0.59.0", "windows-sys 0.59.0",
@ -770,9 +770,9 @@ dependencies = [
[[package]] [[package]]
name = "nix" name = "nix"
version = "0.29.0" version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cfg-if", "cfg-if",
@ -1120,9 +1120,9 @@ dependencies = [
[[package]] [[package]]
name = "shellexpand" name = "shellexpand"
version = "3.1.0" version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb"
dependencies = [ dependencies = [
"dirs", "dirs",
] ]

View file

@ -10,8 +10,8 @@ md-5 = "0.10.6"
reqwest = { version = "0.12.15", features = ["blocking", "json"] } reqwest = { version = "0.12.15", features = ["blocking", "json"] }
serde_json = "1.0.140" serde_json = "1.0.140"
serde = "1.0.219" serde = "1.0.219"
ctrlc = "3.4.6" ctrlc = "3.4.7"
shellexpand = "3.1.0" shellexpand = "3.1.1"
flate2 = "1.1.1" flate2 = "1.1.1"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]

View file

@ -1,5 +1,9 @@
use std::{fs, io, io::Write, path::{Path, PathBuf}};
use md5::{Digest, Md5}; use md5::{Digest, Md5};
use std::{
fs, io,
io::Write,
path::{Path, PathBuf},
};
use crate::config::status::Status; use crate::config::status::Status;
@ -10,7 +14,11 @@ pub fn calculate_md5(path: &Path) -> String {
format!("{:x}", hasher.finalize()) format!("{:x}", hasher.finalize())
} }
pub fn check_existing_file(path: &Path, expected_md5: Option<&str>, expected_size: Option<u64>) -> bool { pub fn check_existing_file(
path: &Path,
expected_md5: Option<&str>,
expected_size: Option<u64>,
) -> bool {
if !path.exists() { if !path.exists() {
return false; return false;
} }
@ -41,7 +49,7 @@ pub fn get_filename(path: &str) -> String {
pub fn get_dir() -> PathBuf { pub fn get_dir() -> PathBuf {
loop { loop {
print!( print!(
"{} Enter download directory (Enter for current): ", "{} Please specify the directory where the game should be downloaded (press Enter to use the current directory): ",
Status::question() Status::question()
); );
io::stdout().flush().unwrap(); io::stdout().flush().unwrap();

View file

@ -523,7 +523,7 @@ pub fn fetch_gist(client: &Client) -> Result<String, String> {
println!("1. Live - OS"); println!("1. Live - OS");
println!("2. Live - CN"); println!("2. Live - CN");
println!("3. Beta - OS"); println!("3. Beta - OS");
println!("4. Beta - CN"); println!("4. Beta - CN (wicked-waifus-rs)");
loop { loop {
print!("{} Select version: ", Status::question()); print!("{} Select version: ", Status::question());