1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2024-11-16 03:53:04 +00:00

item: Add slot to take/drop messages

To be more consistent with undo messages, I've added the slot in which
items are involved to take and drop messages. Simple as that.
This commit is contained in:
Lux Aliaga 2022-11-07 18:18:25 -03:00
parent dadb0d721f
commit 833669af3c
Signed by: lux
GPG key ID: B56C805968637437

View file

@ -90,10 +90,19 @@ pub fn take(file: &String, slot: &str, message: bool) -> Result<()> {
if message {
println!(
"✅ {} {} {} ",
"✅ {} {} {} {} {} {} {}",
"Took".green(),
&filename.bold(),
format!("from {}", &sourcelocation.to_str().unwrap()).green()
"from".green(),
&sourcelocation.to_str().unwrap(),
"to".green(),
match slot {
"active" => slot.green(),
"inactive" => slot.blue(),
_ => slot.red(),
}
.bold(),
"slot".green()
);
}
@ -168,10 +177,18 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<(
if message {
println!(
"✅ {} {} {} ",
"✅ {} {} {} {} {} {}",
"Dropped".green(),
&file.bold(),
format!("into {}", &destpath.to_str().unwrap()).green()
"from".green(),
match slot {
"active" => slot.green(),
"inactive" => slot.blue(),
_ => slot.red(),
}
.bold(),
"slot into".green(),
&destpath.to_str().unwrap()
);
};