mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-10 11:37:23 +01:00
.
This commit is contained in:
@@ -18,6 +18,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}()
|
||||
private let updater = Updater(checkOnLaunch: false)
|
||||
private let notifier = Notifier()
|
||||
private let publicKeyFileStoreController = PublicKeyFileStoreController()
|
||||
private lazy var agent: Agent = {
|
||||
Agent(storeList: storeList, witness: notifier)
|
||||
}()
|
||||
@@ -25,10 +26,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
let path = (NSHomeDirectory() as NSString).appendingPathComponent("socket.ssh") as String
|
||||
return SocketController(path: path)
|
||||
}()
|
||||
// TODO: CLEANUP
|
||||
private lazy var fakeFile: PublicKeyStandinFileStoreController = {
|
||||
PublicKeyStandinFileStoreController(secrets: storeList.stores.flatMap({ $0.secrets }))
|
||||
}()
|
||||
private var updateSink: AnyCancellable?
|
||||
|
||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||
@@ -41,12 +38,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
guard let update = update else { return }
|
||||
self.notifier.notify(update: update, ignore: self.updater.ignore(release:))
|
||||
}
|
||||
// TODO: CLEANUP
|
||||
DispatchQueue.main.async {
|
||||
print(self.fakeFile)
|
||||
}
|
||||
}
|
||||
|
||||
func reloadKeys() {
|
||||
// TODO: This
|
||||
// storeList.reloadAll()
|
||||
try? publicKeyFileStoreController.clear()
|
||||
try? publicKeyFileStoreController.generatePublicKeys(for: storeList.stores.flatMap({ $0.secrets }))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user