Add timestamp to exported application log filename

Exported logs were always named "Meshtastic Application Logs.csv",
making it difficult to differentiate between multiple exports. The
default filename now includes a timestamp in yyyy-MM-dd_HHmmss format.
This commit is contained in:
bnux 2026-04-11 17:15:26 -07:00
parent 24a7270e50
commit fac4b55242

View file

@ -171,7 +171,7 @@ struct AppLog: View {
isPresented: $isExporting,
document: CsvDocument(emptyCsv: exportString),
contentType: .commaSeparatedText,
defaultFilename: String("Meshtastic Application Logs"),
defaultFilename: "Meshtastic Application Logs \({ let f = DateFormatter(); f.dateFormat = "yyyy-MM-dd_HHmmss"; return f.string(from: .now) }())",
onCompletion: { result in
switch result {
case .success: