44 lines
883 B
Swift
44 lines
883 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()
|
|
}
|
|
}
|
|
}
|
|
.preferredColorScheme({
|
|
switch settingsController.appearance {
|
|
case .dark:
|
|
return ColorScheme.dark
|
|
case .light:
|
|
return ColorScheme.light
|
|
case .automatic:
|
|
return .none
|
|
}
|
|
}())
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentView()
|
|
}
|