refactor: improve alert error context and copy action

This commit is contained in:
世界
2026-02-08 18:25:55 +08:00
parent a86dfc26d1
commit 8897e6deeb
32 changed files with 125 additions and 82 deletions
+1 -1
View File
@@ -399,7 +399,7 @@ private struct LogContentInnerView: View {
cleanup()
logFileURL = nil
if case let .failure(error) = result {
alert = AlertState(error: error)
alert = AlertState(action: "export log file", error: error)
}
}
.sheet(isPresented: $showShareSheet) {
@@ -135,7 +135,7 @@ public class LogDataModel: ObservableObject {
try text.write(to: fileURL, atomically: true, encoding: .utf8)
logFileURL = fileURL
} catch {
viewModel?.alert = AlertState(error: error)
viewModel?.alert = AlertState(action: "prepare log file", error: error)
}
}
#endif