-
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rust): fixes many papercuts and better avoid and handle state re…
…sets
- Loading branch information
1 parent
737ea00
commit 9adf6b4
Showing
12 changed files
with
143 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
implementations/swift/ockam/ockam_app/Ockam/BrokenStateView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Foundation | ||
|
||
import SwiftUI | ||
|
||
struct BrokenStateView: View { | ||
var body: some View { | ||
VStack { | ||
Text("The Ockam state is either corrupted or incompatible with the current version.\n\nYou can reset the state or quit the application and try another version.") | ||
.multilineTextAlignment(.center) | ||
.padding() | ||
Spacer() | ||
HStack { | ||
Spacer() | ||
Button( | ||
action: { | ||
restartCurrentProcess() | ||
}, | ||
label: { | ||
Text("Reset State") | ||
} | ||
) | ||
Button( | ||
action: { | ||
exit(1) | ||
}, | ||
label: { | ||
Text("Quit") | ||
} | ||
) | ||
.keyboardShortcut(.defaultAction) | ||
.padding(10) | ||
} | ||
.background(.black.opacity(0.1)) | ||
} | ||
.frame(width: 300, height: 160) | ||
} | ||
|
||
} | ||
|
||
struct BrokenState_Previews: PreviewProvider { | ||
static var previews: some View { | ||
BrokenStateView() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters