mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: shorten the alert on trashing/deleting
This commit is contained in:
parent
c40058ebfa
commit
ff42685ec9
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Reference in a new issue