mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-05 09:24:49 +01:00
Basic no stores view (#66)
This commit is contained in:
@@ -20,6 +20,7 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
if !agentStatusChecker.running {
|
||||
agentNotice()
|
||||
}
|
||||
if storeList.anyAvailable {
|
||||
NavigationView {
|
||||
List(selection: $active) {
|
||||
ForEach(storeList.stores) { store in
|
||||
@@ -68,6 +69,9 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
NoStoresView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
29
Secretive/Views/NoStoresView.swift
Normal file
29
Secretive/Views/NoStoresView.swift
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// NoStoresView.swift
|
||||
// Secretive
|
||||
//
|
||||
// Created by Max Goedjen on 3/20/20.
|
||||
// Copyright © 2020 Max Goedjen. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct NoStoresView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("No Secure Storage Available").bold()
|
||||
Text("Your Mac doesn't have a Secure Enclave, and there's not a compatible Smart Card inserted.")
|
||||
Button(action: {
|
||||
NSWorkspace.shared.open(URL(string: "https://www.yubico.com/products/compare-yubikey-5-series/")!)
|
||||
}) {
|
||||
Text("If you're looking to add one to your Mac, the YubiKey 5 Series are great.")
|
||||
}
|
||||
}.padding()
|
||||
}
|
||||
}
|
||||
|
||||
struct NoStoresView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NoStoresView()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user