From f93ecb741646686cfc49ca924e9c267626d0eeff Mon Sep 17 00:00:00 2001 From: TheMisfit68 Date: Sat, 17 Feb 2024 22:01:07 +0100 Subject: [PATCH] Removed warnings from TODO's in favor of bookmarks --- .../Bookmarks/bookmarks.plist | 79 ++++++------------- HAPiNest/HomekitServer/HomeKitServer.swift | 56 ++++++------- HAPiNest/MainWindow/DashboardView.swift | 6 +- 3 files changed, 57 insertions(+), 84 deletions(-) diff --git a/HAPiNest.xcodeproj/project.xcworkspace/xcuserdata/janverrept.xcuserdatad/Bookmarks/bookmarks.plist b/HAPiNest.xcodeproj/project.xcworkspace/xcuserdata/janverrept.xcuserdatad/Bookmarks/bookmarks.plist index 9ec1e53ac..90f3f42fc 100644 --- a/HAPiNest.xcodeproj/project.xcworkspace/xcuserdata/janverrept.xcuserdatad/Bookmarks/bookmarks.plist +++ b/HAPiNest.xcodeproj/project.xcworkspace/xcuserdata/janverrept.xcuserdatad/Bookmarks/bookmarks.plist @@ -80,68 +80,41 @@ group - destination - - rebasable-url + children + - base - home-directory - payload + query-specification - relative-path - Documents/Development/Projects/Personal/Xcode/HomeAutomation/Drivers/LeafDriver/Sources/LeafDriver/BatteryChecker.swift + query + text + term + + text + // FIXME: + + type + batch-find-query - type - DVTDocumentLocation - - type - bookmark - - - destination - - location-parameters - - EndingColumnNumber - 0 - EndingLineNumber - 57 - StartingColumnNumber - 0 - StartingLineNumber - 56 - Timestamp - 725583443.55126 - - rebasable-url - base - home-directory - payload + query-specification - relative-path - Documents/Development/Projects/Personal/Xcode/HomeAutomation/Drivers/LeafDriver/Sources/LeafDriver/BatteryChecker.swift + query + text + term + + text + // TODO: + + type + batch-find-query - - text-context - - focused - private var updateIsOutdated:Bool{ - - leading - } - - - trailing - - let formatter = DateFormatter() - formatter.dateFormat = "yyyy/mm/dd HH:mm" - - + + title + TODO, FIXME, Prints type - bookmark + group diff --git a/HAPiNest/HomekitServer/HomeKitServer.swift b/HAPiNest/HomekitServer/HomeKitServer.swift index 23501feda..e9170abed 100644 --- a/HAPiNest/HomekitServer/HomeKitServer.swift +++ b/HAPiNest/HomekitServer/HomeKitServer.swift @@ -17,42 +17,42 @@ import SwiftUI import LeafDriver public class HomeKitServer:Singleton{ - - public static var shared: HomeKitServer = HomeKitServer() + + public static var shared: HomeKitServer = HomeKitServer() public var dashboard:HomeKitServerView? public var name:String - private var HAPserver:Server! - - + private var HAPserver:Server! + + var mainBridge:Bridge!{ - didSet{ + didSet{ let serverPort = MainConfiguration.HomeKitServer.ServerPort HAPserver = try? Server(device: mainBridge, listenPort: serverPort) - dashboard = HomeKitServerView(qrCode: Image(nsImage:mainBridge.setupQRCode.asNSImage!)) - } - } - + dashboard = HomeKitServerView(qrCode: Image(nsImage:mainBridge.setupQRCode.asNSImage!)) + } + } + // let gscNotifier = GSCNotifier() // let sunnyPortalReporter = SunnyPortalReporter() - - private init(){ - + + private init(){ + self.name = MainConfiguration.HomeKitServer.ServerName - #if DEBUG +#if DEBUG AppController(name: "Console", location: .systemUtilities, terminal: TerminalDriver()).startIfInstalled() AppController(name: "Home", location: .systemApps, terminal: TerminalDriver()).startIfInstalled() - #endif - let logger = Logger(subsystem: "be.oneclick.HAPiNest", category: "HomeKitServer") - logger.info("Initializing the server \(self.name, privacy: .public)...") - - - #warning("TODO") // TODO: - reimplement SMAInverter -// let _ = SMAInverter.CreateInverters() - - - } - - deinit{ - } - +#endif + let logger = Logger(subsystem: "be.oneclick.HAPiNest", category: "HomeKitServer") + logger.info("Initializing the server \(self.name, privacy: .public)...") + + + // TODO: - reimplement SMAInverter + // let _ = SMAInverter.CreateInverters() + + + } + + deinit{ + } + } diff --git a/HAPiNest/MainWindow/DashboardView.swift b/HAPiNest/MainWindow/DashboardView.swift index 4b3783d84..b3d67c7b0 100644 --- a/HAPiNest/MainWindow/DashboardView.swift +++ b/HAPiNest/MainWindow/DashboardView.swift @@ -11,9 +11,9 @@ struct DashboardView: View { let serverView:HomeKitServerView let plcView:SoftPLCView - #warning("TODO") // TODO: - Implement Inverter Display again + // TODO: - Implement Inverter Display again // let inverterView: - + var body: some View { TabView { @@ -41,5 +41,5 @@ struct DashboardView: View { } #Preview { - DashboardView.preview + DashboardView.preview }