44 lines
1 KiB
Swift
44 lines
1 KiB
Swift
//
|
|
// LibraryPage.swift
|
|
// Luminate
|
|
//
|
|
// Created by Brendan Szymanski on 6/11/26.
|
|
//
|
|
|
|
import Adwaita
|
|
import LuminateCore
|
|
import LuminateUI
|
|
|
|
public struct LibraryPage: View {
|
|
|
|
nonisolated public init(
|
|
title: String, items: [Components.Schemas.BaseItemDto],
|
|
navigation: Binding<NavigationStack<Page>>
|
|
) {
|
|
self.title = title
|
|
self.items = items
|
|
_navigation = navigation
|
|
}
|
|
|
|
private var items: [Components.Schemas.BaseItemDto]
|
|
private var title: String
|
|
@Binding var navigation: NavigationStack<Page>
|
|
|
|
public var view: Body {
|
|
ScrollView {
|
|
Clamp()
|
|
.maximumSize(1550)
|
|
.tighteningThreshold(550)
|
|
.child {
|
|
LibraryGrid(
|
|
libraries: items,
|
|
navigation: $navigation,
|
|
title: title
|
|
)
|
|
.padding(32, .bottom)
|
|
}
|
|
}
|
|
.hscrollbarPolicy(.never)
|
|
.propagateNaturalHeight()
|
|
}
|
|
}
|