mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-24 09:12:43 +03:00
feat: display the number of deleted files in the prompt (#359)
This commit is contained in:
parent
521c8b6bfe
commit
49919cc5f4
@ -24,9 +24,8 @@ impl Manager {
|
||||
}
|
||||
|
||||
tokio::spawn(async move {
|
||||
let mut result = emit!(Input(InputOpt::top(format!(
|
||||
"There are {tasks} tasks running, sure to quit? (y/N)"
|
||||
))));
|
||||
let mut result =
|
||||
emit!(Input(InputOpt::top(format!("{tasks} tasks running, sure to quit? (y/N)"))));
|
||||
|
||||
if let Some(Ok(choice)) = result.recv().await {
|
||||
if choice == "y" || choice == "Y" {
|
||||
|
@ -112,9 +112,9 @@ impl Tasks {
|
||||
tokio::spawn(async move {
|
||||
let s = if targets.len() > 1 { "s" } else { "" };
|
||||
let mut result = emit!(Input(InputOpt::hovered(if permanently {
|
||||
format!("Delete selected file{s} permanently? (y/N)")
|
||||
format!("Delete {} selected file{s} permanently? (y/N)", targets.len())
|
||||
} else {
|
||||
format!("Move selected file{s} to trash? (y/N)")
|
||||
format!("Move {} selected file{s} to trash? (y/N)", targets.len())
|
||||
})));
|
||||
|
||||
if let Some(Ok(choice)) = result.recv().await {
|
||||
|
Loading…
Reference in New Issue
Block a user