app: keep the clip name out of the delete dialog

A long recording id pushed the wording past the panel's edge. The
dialog now says the deletion plainly and leaves the naming to the
card the dialog was opened from.
This commit is contained in:
vhaudiquet committed 2026-11-22 18:59:47 +01:00
1 parent e7c9c5b672
commit 146256714b
1 file changed
+4 -16
+4 -16
View File
@@ -301,13 +301,10 @@ pub fn delete_dialog(app: &App, p: Paint, layer: &mut Vec<El>) {
.color(p.t.text), .color(p.t.text),
) )
.child( .child(
text(format!( text("This will delete the file from disk. The recording stays.")
"\"{}.mp4\" is deleted from disk. The recording stays.", .key("delete-note")
delete_name(app) .font(body(12.0))
)) .color(p.muted()),
.key("delete-note")
.font(body(12.0))
.color(p.muted()),
) )
.child( .child(
row() row()
@@ -365,12 +362,3 @@ fn delete_confirmed(app: &mut App) {
} }
} }
} }
/// The clip the delete dialog is about, for the dialog's wording.
fn delete_name(app: &App) -> String {
app.confirm_clip_delete
.as_ref()
.and_then(|name| app.clips.iter().find(|clip| &clip.name == name))
.map(|clip| clip.name.clone())
.unwrap_or_default()
}