mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-15 20:10:30 +00:00
Show warning after Continue Anyway (#239)
This commit is contained in:
parent
afefeb1ff6
commit
2ca0b86364
1 changed files with 18 additions and 1 deletions
|
|
@ -454,6 +454,7 @@ struct HeartbeatApp: App {
|
|||
@State private var alert_title = ""
|
||||
@State private var showTimeoutError = false
|
||||
@State private var showLogs = false
|
||||
@State private var showContinueWarning = false
|
||||
@State private var timeoutTimer: Timer?
|
||||
@StateObject private var mount = MountingProgress.shared
|
||||
@StateObject private var dnsChecker = DNSChecker() // New DNS check state object
|
||||
|
|
@ -615,7 +616,7 @@ struct HeartbeatApp: App {
|
|||
primaryButtonText: "Continue Anyway",
|
||||
secondaryButtonText: "View Logs",
|
||||
onPrimaryButtonTap: {
|
||||
isLoading2 = false
|
||||
showContinueWarning = true
|
||||
},
|
||||
onSecondaryButtonTap: {
|
||||
showLogs = true
|
||||
|
|
@ -623,6 +624,22 @@ struct HeartbeatApp: App {
|
|||
showSecondaryButton: true
|
||||
)
|
||||
}
|
||||
|
||||
if showContinueWarning {
|
||||
CustomErrorView(
|
||||
title: "Proceeding Without Connection",
|
||||
message: "StikDebug will not function as expected if you choose to continue.",
|
||||
onDismiss: {
|
||||
showContinueWarning = false
|
||||
},
|
||||
showButton: true,
|
||||
primaryButtonText: "I Understand",
|
||||
onPrimaryButtonTap: {
|
||||
showContinueWarning = false
|
||||
isLoading2 = false
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
.sheet(isPresented: $showLogs, onDismiss: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue