Add tests for PrinterRequestManager , remove singleton implementation in favor of view constructor arguments
This commit is contained in:
@@ -13,6 +13,8 @@ struct SoyuzApp: App {
|
||||
|
||||
@State var currentIcon = "move.3d"
|
||||
|
||||
@ObservedObject var printerManager = PrinterRequestManager()
|
||||
|
||||
var body: some Scene {
|
||||
// WindowGroup(id: "floating-stats") {
|
||||
// KlipperMonMenuBarExtraView(currentMenuBarIcon: $currentIcon)
|
||||
@@ -20,13 +22,13 @@ struct SoyuzApp: App {
|
||||
// }
|
||||
|
||||
WindowGroup("Configuration", id: "soyuz_cfg", content: {
|
||||
PrinterConfigView()
|
||||
PrinterConfigView(printerManager: printerManager)
|
||||
//.frame(minWidth: 300, maxWidth: 600, minHeight: 60, maxHeight: 100)
|
||||
})
|
||||
.windowResizability(.contentSize)
|
||||
|
||||
MenuBarExtra("Soyuz", systemImage: currentIcon) {
|
||||
SoyuzMenuBarExtraView(currentMenuBarIcon: $currentIcon)
|
||||
SoyuzMenuBarExtraView(printerManager: printerManager, currentMenuBarIcon: $currentIcon)
|
||||
.padding([.top, .leading, .trailing], 8)
|
||||
.padding([.bottom], 6)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user