Generate tag overview, add file action

This commit is contained in:
Christoph Hagen
2025-01-05 09:21:21 +01:00
parent 0dca633805
commit 01baf560ee
27 changed files with 501 additions and 137 deletions

View File

@ -4,11 +4,11 @@ struct GenericPropertyView<Content>: View where Content: View {
let title: LocalizedStringKey
let footer: LocalizedStringKey
let footer: LocalizedStringKey?
let content: Content
public init(title: LocalizedStringKey, footer: LocalizedStringKey, @ViewBuilder content: () -> Content) {
public init(title: LocalizedStringKey, footer: LocalizedStringKey? = nil, @ViewBuilder content: () -> Content) {
self.title = title
self.footer = footer
self.content = content()
@ -18,10 +18,16 @@ struct GenericPropertyView<Content>: View where Content: View {
VStack(alignment: .leading) {
Text(title)
.font(.headline)
content
Text(footer)
.foregroundStyle(.secondary)
.padding(.bottom)
if let footer {
content
Text(footer)
.foregroundStyle(.secondary)
.padding(.bottom)
} else {
content
.padding(.bottom)
}
}
}
}