mirror of
https://git.sr.ht/~nixgoat/vento
synced 2024-11-16 12:02:49 +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:
parent
dadb0d721f
commit
833669af3c
25
src/item.rs
25
src/item.rs
|
@ -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()
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue