blob: 931a884a0d895d930cd8a9a34767dc2a8f2b0345 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//
// DashboardView.swift
// Jel
//
// Created by zerocool on 12/12/23.
//
import SwiftUI
import JellyfinKit
struct DashboardView: View {
@State var showingSettingsSheet: Bool = false
@ObservedObject var authState: AuthStateController = AuthStateController.shared
@State var refresh: Bool = true
var body: some View {
ScrollView {
LazyVStack {
Section {
NavigationStack {
DashboardLibraryView()
}
} header: {
DashboardSectionTitleView("Libraries")
.padding([.top, .leading])
}
}
}
.navigationTitle("Home")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
showingSettingsSheet.toggle()
} label: {
Label("Settings", systemImage: "gear")
}
}
}
.sheet(isPresented: $showingSettingsSheet) {
SettingsView(showingSettingsView: $showingSettingsSheet)
}
.onChange(of: authState.loggedIn, {
refresh = !authState.loggedIn
})
}
}
//#Preview {
// DashboardView()
//}
|