Files
Nextcloud-Cookbook-iOS/Nextcloud Cookbook iOS Client/Nextcloud_Cookbook_iOS_ClientApp.swift
2025-05-26 15:52:24 +02:00

36 lines
986 B
Swift

//
// Nextcloud_Cookbook_iOS_ClientApp.swift
// Nextcloud Cookbook iOS Client
//
// Created by Vincent Meilinger on 06.09.23.
//
import SwiftUI
import SwiftData
@main
struct Nextcloud_Cookbook_iOS_ClientApp: App {
@AppStorage("onboarding") var onboarding = true
@AppStorage("language") var language = Locale.current.language.languageCode?.identifier ?? "en"
var body: some Scene {
WindowGroup {
ZStack {
if onboarding {
//OnboardingView()
EmptyView()
} else {
MainView()
.modelContainer(for: Recipe.self)
}
}
.transition(.slide)
.environment(
\.locale,
.init(identifier: language ==
SupportedLanguage.DEVICE.rawValue ? (Locale.current.language.languageCode?.identifier ?? "en") : language)
)
}
}
}