mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-26 02:57:22 +01:00
Merge branch 'master' into fix_115
This commit is contained in:
@@ -9,9 +9,9 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
@ObservedObject var agentStatusChecker: AgentStatusCheckerType
|
||||
var runSetupBlock: (() -> Void)?
|
||||
|
||||
@State fileprivate var active: AnySecret.ID?
|
||||
@State fileprivate var showingDeletion = false
|
||||
@State fileprivate var deletingSecret: AnySecret?
|
||||
@State private var active: AnySecret.ID?
|
||||
@State private var showingDeletion = false
|
||||
@State private var deletingSecret: AnySecret?
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
@@ -110,12 +110,12 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
} else {
|
||||
fallback = Constants.emptyStoreTag
|
||||
}
|
||||
return self.storeList.stores.compactMap { $0.secrets.first }.first?.id ?? fallback
|
||||
return self.storeList.stores.compactMap(\.secrets.first).first?.id ?? fallback
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fileprivate enum Constants {
|
||||
private enum Constants {
|
||||
static let emptyStoreModifiableTag: AnyHashable = "emptyStoreModifiableTag"
|
||||
static let emptyStoreTag: AnyHashable = "emptyStoreModifiableTag"
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ struct DeleteSecretView<StoreType: SecretStoreModifiable>: View {
|
||||
|
||||
@State var confirm = ""
|
||||
|
||||
fileprivate var dismissalBlock: (Bool) -> ()
|
||||
private var dismissalBlock: (Bool) -> ()
|
||||
|
||||
init(secret: StoreType.SecretType, store: StoreType, dismissalBlock: @escaping (Bool) -> ()) {
|
||||
self.secret = secret
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import ServiceManagement
|
||||
|
||||
struct SetupView: View {
|
||||
|
||||
@@ -117,7 +116,7 @@ struct SetupStepCommandView: View {
|
||||
extension SetupView {
|
||||
|
||||
func installLaunchAgent() -> Bool {
|
||||
SMLoginItemSetEnabled("com.maxgoedjen.Secretive.SecretAgent" as CFString, true)
|
||||
LaunchAgentController().install()
|
||||
}
|
||||
|
||||
func markAsDone() -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user