Basic network call implementation

This commit is contained in:
Madeline
2023-02-07 15:04:01 -05:00
parent 8876fc666a
commit dd4324e395
6 changed files with 133 additions and 4 deletions
+23
View File
@@ -7,7 +7,30 @@
import SwiftUI
@main
struct KlipperMonMenuBarApp: App {
let persistenceController = PersistenceController.shared
@State var currentIcon = "move.3d"
var body: some Scene {
WindowGroup {
ContentView()
.environment(\.managedObjectContext, persistenceController.container.viewContext)
}
MenuBarExtra("Soyuz", systemImage: currentIcon) {
KlipperMonMenuBarExtraView(currentMenuBarIcon: $currentIcon)
}
.menuBarExtraStyle(.window)
}
}
protocol MenuBarExtraIconUpdater {
func updateIcon(systemName: String)
}
struct KlipperMonApp: App {
let persistenceController = PersistenceController.shared