summaryrefslogtreecommitdiff
path: root/Jel/Views/Dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'Jel/Views/Dashboard')
-rw-r--r--Jel/Views/Dashboard/DashboardLibraryView.swift1
-rw-r--r--Jel/Views/Dashboard/DashboardSectionTitleView.swift30
-rw-r--r--Jel/Views/Dashboard/DashboardView.swift23
3 files changed, 49 insertions, 5 deletions
diff --git a/Jel/Views/Dashboard/DashboardLibraryView.swift b/Jel/Views/Dashboard/DashboardLibraryView.swift
index 4a68013..7526dce 100644
--- a/Jel/Views/Dashboard/DashboardLibraryView.swift
+++ b/Jel/Views/Dashboard/DashboardLibraryView.swift
@@ -30,7 +30,6 @@ struct DashboardLibraryView: View {
} label: {
LibraryIconView(library: library, height: 150)
.setAspectRatio(library.primaryImageAspectRatio)
- .padding()
}
.buttonStyle(PlainButtonStyle())
}
diff --git a/Jel/Views/Dashboard/DashboardSectionTitleView.swift b/Jel/Views/Dashboard/DashboardSectionTitleView.swift
new file mode 100644
index 0000000..2456dc2
--- /dev/null
+++ b/Jel/Views/Dashboard/DashboardSectionTitleView.swift
@@ -0,0 +1,30 @@
+//
+// DashboardSectionTitleView.swift
+// Jel
+//
+// Created by zerocool on 12/27/23.
+//
+
+import SwiftUI
+
+struct DashboardSectionTitleView: View {
+ @State var titleText: String
+
+ init(_ title: String) {
+ self.titleText = title
+ }
+
+ var body: some View {
+ HStack {
+ Text(titleText)
+ .font(.title2)
+ .bold()
+ Spacer()
+ }
+ .padding(.top)
+ }
+}
+
+#Preview {
+ DashboardSectionTitleView("Title")
+}
diff --git a/Jel/Views/Dashboard/DashboardView.swift b/Jel/Views/Dashboard/DashboardView.swift
index b3c223b..279f056 100644
--- a/Jel/Views/Dashboard/DashboardView.swift
+++ b/Jel/Views/Dashboard/DashboardView.swift
@@ -12,12 +12,27 @@ struct DashboardView: View {
@State var showingSettingsSheet: Bool = false
var body: some View {
- VStack {
- NavigationStack {
- DashboardLibraryView()
- .navigationTitle("Home")
+ ScrollView {
+ LazyVStack {
+ Section {
+ NavigationStack {
+ DashboardLibraryView()
+ }
+ } header: {
+ DashboardSectionTitleView("Libraries")
+ }
+
+ Section {
+ NavigationStack {
+ DashboardLibraryView()
+ }
+ } header: {
+ DashboardSectionTitleView("Next up")
+ }
}
+ .padding()
}
+ .navigationTitle("Home")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {