mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-09-19 14:48:01 +02:00
Merge branch 'main' into auth_splitout
This commit is contained in:
@@ -4,10 +4,11 @@ import SecureEnclaveSecretKit
|
||||
import SmartCardSecretKit
|
||||
import Brief
|
||||
import CertificateKit
|
||||
import SettingsKit
|
||||
|
||||
@main
|
||||
struct Secretive: App {
|
||||
|
||||
|
||||
@Environment(\.agentLaunchController) var agentLaunchController
|
||||
@Environment(\.justUpdatedChecker) var justUpdatedChecker
|
||||
|
||||
@@ -16,6 +17,7 @@ struct Secretive: App {
|
||||
ContentView()
|
||||
.environment(EnvironmentValues._secretStoreList)
|
||||
.environment(EnvironmentValues._certificateStore)
|
||||
.environment(EnvironmentValues._settingsStore)
|
||||
.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in
|
||||
Task {
|
||||
@AppStorage("defaultsHasRunSetup") var hasRunSetup = false
|
||||
@@ -42,6 +44,9 @@ struct Secretive: App {
|
||||
}
|
||||
.windowStyle(.hiddenTitleBar)
|
||||
.windowResizability(.contentSize)
|
||||
Settings {
|
||||
SettingsView()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,8 +106,9 @@ extension EnvironmentValues {
|
||||
return list
|
||||
}()
|
||||
|
||||
@MainActor fileprivate static let _certificateStore: CertificateStore = CertificateStore()
|
||||
|
||||
@MainActor fileprivate static let _certificateStore = CertificateStore()
|
||||
@MainActor fileprivate static let _settingsStore = SettingsStore()
|
||||
|
||||
private static let _agentLaunchController = AgentLaunchController()
|
||||
@Entry var agentLaunchController: any AgentLaunchControllerProtocol = _agentLaunchController
|
||||
|
||||
@@ -122,6 +128,10 @@ extension EnvironmentValues {
|
||||
@MainActor var certificateStore: CertificateStore {
|
||||
EnvironmentValues._certificateStore
|
||||
}
|
||||
|
||||
@MainActor var settingsStore: SettingsStore {
|
||||
EnvironmentValues._settingsStore
|
||||
}
|
||||
}
|
||||
|
||||
extension FocusedValues {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import SwiftUI
|
||||
import SettingsKit
|
||||
|
||||
struct SettingsView: View {
|
||||
|
||||
@Environment(\.settingsStore) var settingsStore
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
}
|
||||
.padding()
|
||||
.frame(minWidth: 480, minHeight: 320)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user