mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-18 22:31:35 +03:00
feat: shorten the alert on trashing/deleting
This commit is contained in:
parent
c40058ebfa
commit
ff42685ec9
@ -182,11 +182,11 @@ impl Tasks {
|
||||
pub fn file_remove(&self, targets: Vec<Url>, permanently: bool) -> bool {
|
||||
let scheduler = self.scheduler.clone();
|
||||
tokio::spawn(async move {
|
||||
let s = if targets.len() > 1 { 's' } else { ' ' };
|
||||
let s = if targets.len() > 1 { "s" } else { "" };
|
||||
let result = emit!(Input(InputOpt::hovered(if permanently {
|
||||
format!("Sure to delete selected file{s} permanently? (y/N)")
|
||||
format!("Delete selected file{s} permanently? (y/N)")
|
||||
} else {
|
||||
format!("Sure to move selected file{s} to trash? (y/N)")
|
||||
format!("Move selected file{s} to trash? (y/N)")
|
||||
})));
|
||||
|
||||
if let Ok(choice) = result.await {
|
||||
|
Loading…
Reference in New Issue
Block a user