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
+2 -2
View File
@@ -45,7 +45,7 @@ public class MainViewModel: BaseViewModel {
var error: NSError?
importRemoteProfile = LibboxParseRemoteProfileImportLink(url.absoluteString, &error)
if let error {
alert = AlertState(error: error)
alert = AlertState(action: "parse remote profile import link", error: error)
}
} else if url.pathExtension == "bpf" {
Task {
@@ -62,7 +62,7 @@ public class MainViewModel: BaseViewModel {
try await .from(readURL(url))
}
} catch {
alert = AlertState(error: error)
alert = AlertState(action: "import profile from URL", error: error)
}
}