From a2d46fc0ea2fb1bff630f79eeddd0d469355bc70 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 4 Oct 2024 23:23:57 +0200 Subject: [PATCH] Replaced the main window for the PiperApp app in the Piper target with a menu bar. --- Piper/Sources/App/PiperApp.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Piper/Sources/App/PiperApp.swift b/Piper/Sources/App/PiperApp.swift index b783cb0..77789e4 100644 --- a/Piper/Sources/App/PiperApp.swift +++ b/Piper/Sources/App/PiperApp.swift @@ -11,6 +11,9 @@ import SwiftData @main struct PiperApp: App { + + // MARK: Properties + var sharedModelContainer: ModelContainer = { let schema = Schema([ Item.self, @@ -23,11 +26,15 @@ struct PiperApp: App { fatalError("Could not create ModelContainer: \(error)") } }() + + // MARK: Body var body: some Scene { - WindowGroup { - ContentView() + MenuBarExtra { + EmptyView() + } label: { + Image(systemName: "circle.fill") } - .modelContainer(sharedModelContainer) } + }