mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 04:50:32 +00:00
made the ui look the same thruout the program
This commit is contained in:
@@ -21,16 +21,16 @@ pub fn chapter_selector(ln_url: &str, mut selected_page: u32) -> (String, u32) {
|
|||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
ln_chapters.into_iter().for_each(|chaprer| {
|
ln_chapters.into_iter().for_each(|chaprer| {
|
||||||
if count % 2 == 0 {
|
if count % 2 == 0 {
|
||||||
println!("({})\t{}", count, format_args!("{}", chaprer.blue()));
|
println!("({})\t{}", count.to_string().blue(), format_args!("{}", chaprer.blue()));
|
||||||
} else {
|
} else {
|
||||||
println!("({})\t{}", count, format_args!("{}", chaprer.yellow()));
|
println!("({})\t{}", count.to_string().yellow(), format_args!("{}", chaprer.yellow()));
|
||||||
}
|
}
|
||||||
count += 1;
|
count += 1;
|
||||||
});
|
});
|
||||||
println!("(n)\t{}", "Go to next page".green());
|
println!("{}\t{}","n:".green(), "Go to next page".green());
|
||||||
println!("(b)\t{}", "Go to previous page".yellow());
|
println!("{}\t{}","b:".yellow(), "Go to previous page".yellow());
|
||||||
println!("(s)\t{}", "Search another title".red());
|
println!("{}\t{}","s:".green(), "Search another title".green());
|
||||||
println!("(q)\t{}", "quit".red());
|
println!("{}\t{}","q:".red(), "quit".red());
|
||||||
let chapter_number = string_input("Which chapter do you want to read? ");
|
let chapter_number = string_input("Which chapter do you want to read? ");
|
||||||
if chapter_number == "n" && selected_page < ln_last_page.parse::<u32>().unwrap() {
|
if chapter_number == "n" && selected_page < ln_last_page.parse::<u32>().unwrap() {
|
||||||
selected_page += 1;
|
selected_page += 1;
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ pub fn search_ln() -> String {
|
|||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
ln_titles.into_iter().for_each(|ln| {
|
ln_titles.into_iter().for_each(|ln| {
|
||||||
if count % 2 == 0 {
|
if count % 2 == 0 {
|
||||||
println!("({})\t{}", count, format_args!("{}", ln.blue()));
|
println!("({})\t{}", count.to_string().blue(), format_args!("{}", ln.blue()));
|
||||||
} else {
|
} else {
|
||||||
println!("({})\t{}", count, format_args!("{}", ln.yellow()));
|
println!("({})\t{}", count.to_string().yellow(), format_args!("{}", ln.yellow()));
|
||||||
}
|
}
|
||||||
count += 1;
|
count += 1;
|
||||||
});
|
});
|
||||||
println!("(s)\t{}", "Search another title".green());
|
println!("{}\t{}","s:".green(), "Search another title".green());
|
||||||
let ln_number = string_input("Enter an option: ");
|
let ln_number = string_input("Enter an option: ");
|
||||||
if ln_number != "s" && ln_number.parse::<usize>().is_ok() {
|
if ln_number != "s" && ln_number.parse::<usize>().is_ok() {
|
||||||
let ln_number = ln_number.trim().to_string();
|
let ln_number = ln_number.trim().to_string();
|
||||||
|
|||||||
Reference in New Issue
Block a user