jel/Jel/Views/ContentView.swift

45 lines
898 B
Swift

//
// ContentView.swift
// Jel
//
// Created by zerocool on 12/11/23.
//
import SwiftUI
import PulseUI
struct ContentView: View {
@EnvironmentObject var jellyfinClient: JellyfinClientController
@StateObject var settingsController: SettingsController = SettingsController.shared
@StateObject var authState: AuthStateController = AuthStateController.shared
@State var showingConsoleSheet: Bool = false
var body: some View {
VStack {
if !authState.loggedIn {
SignInView()
} else {
NavigationStack {
DashboardView()
}
}
}
.padding()
.preferredColorScheme({
switch settingsController.appearance {
case .dark:
return ColorScheme.dark
case .light:
return ColorScheme.light
case .automatic:
return .none
}
}())
}
}
#Preview {
ContentView()
}