mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-20 07:11:33 +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 {
|
tokio::spawn(async move {
|
||||||
let mut result = emit!(Input(InputOpt::top(format!(
|
let mut result =
|
||||||
"There are {tasks} tasks running, sure to quit? (y/N)"
|
emit!(Input(InputOpt::top(format!("{tasks} tasks running, sure to quit? (y/N)"))));
|
||||||
))));
|
|
||||||
|
|
||||||
if let Some(Ok(choice)) = result.recv().await {
|
if let Some(Ok(choice)) = result.recv().await {
|
||||||
if choice == "y" || choice == "Y" {
|
if choice == "y" || choice == "Y" {
|
||||||
|
@ -112,9 +112,9 @@ impl Tasks {
|
|||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let s = if targets.len() > 1 { "s" } else { "" };
|
let s = if targets.len() > 1 { "s" } else { "" };
|
||||||
let mut result = emit!(Input(InputOpt::hovered(if permanently {
|
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 {
|
} 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 {
|
if let Some(Ok(choice)) = result.recv().await {
|
||||||
|
Loading…
Reference in New Issue
Block a user