Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
0a28f55229
commit
04b44dcaad
@ -8,7 +8,7 @@
|
||||
import SwiftUI
|
||||
import LocalData
|
||||
|
||||
private enum DemoDestination: Hashable, CaseIterable {
|
||||
enum DemoDestination: Hashable, CaseIterable {
|
||||
case userDefaults
|
||||
case keychain
|
||||
case files
|
||||
@ -44,7 +44,7 @@ private enum DemoDestination: Hashable, CaseIterable {
|
||||
case .encrypted:
|
||||
return "Encrypted Storage"
|
||||
case .sync:
|
||||
return "Watch Sync"
|
||||
return "Platform & Sync"
|
||||
case .migration:
|
||||
return "Migrations"
|
||||
}
|
||||
@ -84,7 +84,9 @@ struct ContentView: View {
|
||||
.navigationTitle("Secure Storage")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.navigationDestination(for: DemoDestination.self) { destination in
|
||||
return destination.view
|
||||
return destination
|
||||
.view
|
||||
.navigationTitle(destination.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,7 +116,6 @@ struct EncryptedStorageDemo: View {
|
||||
LabeledContent("Platform", value: "Phone Only")
|
||||
}
|
||||
}
|
||||
.navigationTitle("Encrypted Storage")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
|
||||
@ -157,7 +157,6 @@ struct FileSystemDemo: View {
|
||||
LabeledContent("Platform", value: "Phone + Watch Sync")
|
||||
}
|
||||
}
|
||||
.navigationTitle("File System")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
|
||||
@ -102,7 +102,6 @@ struct KeychainDemo: View {
|
||||
LabeledContent("Platform", value: "Phone Only")
|
||||
}
|
||||
}
|
||||
.navigationTitle("Keychain")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
|
||||
@ -103,7 +103,6 @@ struct PlatformSyncDemo: View {
|
||||
LabeledContent("Max Auto-Sync Size", value: "100 KB")
|
||||
}
|
||||
}
|
||||
.navigationTitle("Platform & Sync")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
|
||||
@ -125,7 +125,6 @@ struct UserDefaultsDemo: View {
|
||||
LabeledContent("Sync Policy", value: "Automatic Small")
|
||||
}
|
||||
}
|
||||
.navigationTitle("UserDefaults")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user