2024-10-04 20:43:37 +02:00
|
|
|
//
|
|
|
|
// PiperApp.swift
|
2024-10-04 20:02:48 +00:00
|
|
|
// Piper ~ App
|
2024-10-04 20:43:37 +02:00
|
|
|
//
|
|
|
|
// Created by Javier Cicchelli on 04/10/2024.
|
2024-10-04 20:02:48 +00:00
|
|
|
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
2024-10-04 20:43:37 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import SwiftData
|
|
|
|
|
|
|
|
@main
|
|
|
|
struct PiperApp: App {
|
2024-10-04 22:18:55 +00:00
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
2024-10-04 20:43:37 +02:00
|
|
|
var sharedModelContainer: ModelContainer = {
|
|
|
|
let schema = Schema([
|
|
|
|
Item.self,
|
|
|
|
])
|
|
|
|
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
|
|
|
|
|
|
|
|
do {
|
|
|
|
return try ModelContainer(for: schema, configurations: [modelConfiguration])
|
|
|
|
} catch {
|
|
|
|
fatalError("Could not create ModelContainer: \(error)")
|
|
|
|
}
|
|
|
|
}()
|
2024-10-04 22:18:55 +00:00
|
|
|
|
|
|
|
// MARK: Body
|
2024-10-04 20:43:37 +02:00
|
|
|
|
|
|
|
var body: some Scene {
|
2024-10-04 22:18:55 +00:00
|
|
|
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")
|
2024-10-04 20:43:37 +02:00
|
|
|
}
|
2024-10-04 22:18:55 +00:00
|
|
|
.menuBarExtraStyle(.window)
|
2024-10-04 20:43:37 +02:00
|
|
|
}
|
2024-10-04 22:18:55 +00:00
|
|
|
|
2024-10-04 20:43:37 +02:00
|
|
|
}
|