mirror of
https://github.com/yuhkix/wuwa-downloader.git
synced 2025-06-06 01:43:40 +00:00
add text hints for wheelchair users
This commit is contained in:
parent
9d1c7143ec
commit
7bd0b77bd0
4 changed files with 21 additions and 13 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -150,9 +150,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ctrlc"
|
||||
version = "3.4.6"
|
||||
version = "3.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c"
|
||||
checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73"
|
||||
dependencies = [
|
||||
"nix",
|
||||
"windows-sys 0.59.0",
|
||||
|
@ -770,9 +770,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.29.0"
|
||||
version = "0.30.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
|
||||
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
|
@ -1120,9 +1120,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "shellexpand"
|
||||
version = "3.1.0"
|
||||
version = "3.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b"
|
||||
checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
]
|
||||
|
|
|
@ -10,8 +10,8 @@ md-5 = "0.10.6"
|
|||
reqwest = { version = "0.12.15", features = ["blocking", "json"] }
|
||||
serde_json = "1.0.140"
|
||||
serde = "1.0.219"
|
||||
ctrlc = "3.4.6"
|
||||
shellexpand = "3.1.0"
|
||||
ctrlc = "3.4.7"
|
||||
shellexpand = "3.1.1"
|
||||
flate2 = "1.1.1"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
use std::{fs, io, io::Write, path::{Path, PathBuf}};
|
||||
use md5::{Digest, Md5};
|
||||
use std::{
|
||||
fs, io,
|
||||
io::Write,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use crate::config::status::Status;
|
||||
|
||||
|
@ -10,7 +14,11 @@ pub fn calculate_md5(path: &Path) -> String {
|
|||
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() {
|
||||
return false;
|
||||
}
|
||||
|
@ -41,7 +49,7 @@ pub fn get_filename(path: &str) -> String {
|
|||
pub fn get_dir() -> PathBuf {
|
||||
loop {
|
||||
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()
|
||||
);
|
||||
io::stdout().flush().unwrap();
|
||||
|
@ -74,4 +82,4 @@ pub fn get_dir() -> PathBuf {
|
|||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -523,7 +523,7 @@ pub fn fetch_gist(client: &Client) -> Result<String, String> {
|
|||
println!("1. Live - OS");
|
||||
println!("2. Live - CN");
|
||||
println!("3. Beta - OS");
|
||||
println!("4. Beta - CN");
|
||||
println!("4. Beta - CN (wicked-waifus-rs)");
|
||||
|
||||
loop {
|
||||
print!("{} Select version: ", Status::question());
|
||||
|
|
Loading…
Reference in a new issue