2020-02-19 03:36:41 +00:00
|
|
|
//
|
|
|
|
// ContentView.swift
|
|
|
|
// Secretive
|
|
|
|
//
|
|
|
|
// Created by Max Goedjen on 2/18/20.
|
|
|
|
// Copyright © 2020 Max Goedjen. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
2020-02-19 04:52:00 +00:00
|
|
|
import SecretKit
|
|
|
|
|
|
|
|
struct ContentView<StoreType: SecretStore>: View {
|
|
|
|
|
|
|
|
@ObservedObject var store: StoreType
|
|
|
|
|
|
|
|
@State var pk: String = ""
|
2020-02-19 03:36:41 +00:00
|
|
|
|
|
|
|
var body: some View {
|
2020-02-19 04:52:00 +00:00
|
|
|
HSplitView {
|
|
|
|
List {
|
|
|
|
ForEach(store.secrets) { secret in
|
|
|
|
Text(secret.id)
|
|
|
|
}
|
|
|
|
}.listStyle(SidebarListStyle())
|
|
|
|
Form {
|
|
|
|
Text("Public Key")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
2020-02-19 03:36:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2020-02-19 04:52:00 +00:00
|
|
|
ContentView(store: Preview.Store(numberOfRandomSecrets: 10))
|
2020-02-19 03:36:41 +00:00
|
|
|
}
|
|
|
|
}
|
2020-02-19 04:52:00 +00:00
|
|
|
|