mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-20 23:31:44 +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 {
|
pub fn file_remove(&self, targets: Vec<Url>, permanently: bool) -> bool {
|
||||||
let scheduler = self.scheduler.clone();
|
let scheduler = self.scheduler.clone();
|
||||||
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 result = emit!(Input(InputOpt::hovered(if permanently {
|
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 {
|
} 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 {
|
if let Ok(choice) = result.await {
|
||||||
|
Loading…
Reference in New Issue
Block a user