Replaced the main window for the PiperApp app in the Piper target with a menu bar.
This commit is contained in:
parent
fc974787e8
commit
a2d46fc0ea
@ -11,6 +11,9 @@ import SwiftData
|
|||||||
|
|
||||||
@main
|
@main
|
||||||
struct PiperApp: App {
|
struct PiperApp: App {
|
||||||
|
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
var sharedModelContainer: ModelContainer = {
|
var sharedModelContainer: ModelContainer = {
|
||||||
let schema = Schema([
|
let schema = Schema([
|
||||||
Item.self,
|
Item.self,
|
||||||
@ -23,11 +26,15 @@ struct PiperApp: App {
|
|||||||
fatalError("Could not create ModelContainer: \(error)")
|
fatalError("Could not create ModelContainer: \(error)")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// MARK: Body
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
MenuBarExtra {
|
||||||
ContentView()
|
EmptyView()
|
||||||
|
} label: {
|
||||||
|
Image(systemName: "circle.fill")
|
||||||
}
|
}
|
||||||
.modelContainer(sharedModelContainer)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user