piper-app/Piper/Sources/App/PiperApp.swift

53 lines
1.1 KiB
Swift

//
// PiperApp.swift
// Piper ~ App
//
// Created by Javier Cicchelli on 04/10/2024.
// Copyright © 2024 Röck+Cöde. All rights reserved.
//
import SwiftUI
import SwiftData
@main
struct PiperApp: App {
// MARK: Properties
private var container = {
do {
return try ModelContainer(
for: .entities,
configurations: [ModelConfiguration()]
)
} catch {
fatalError("ERROR: ModelContainer has not been created => \(error)")
}
}()
// MARK: Body
var body: some Scene {
MenuBarExtra {
VStack(alignment: .leading) {
Text("Some text goes here...")
.foregroundStyle(.primary)
Divider()
Button {
// ...
} label: {
Text("Some text goes here...")
.frame(maxWidth: .infinity)
}
}
.padding()
} label: {
Image(systemName: "circle.fill")
}
.menuBarExtraStyle(.window)
}
}