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