consolidate tags, hide date

This commit is contained in:
Christoph Hagen
2025-01-05 12:19:32 +01:00
parent 93e642c3c9
commit 5ac5a7b000
26 changed files with 284 additions and 129 deletions

View File

@ -67,6 +67,18 @@ struct PageDetailView: View {
value: $page.isDraft,
footer: "Indicate a page as a draft to hide it from the website")
.disabled(page.isExternalUrl)
.onChange(of: page.externalLink) { _, newValue in
// Ensure that external pages are not drafts
if newValue != nil && page.isDraft {
page.isDraft = false
}
}
BoolPropertyView(
title: "Hide date",
value: $page.hideDate,
footer: "Do not show the date string on the page")
.disabled(page.isExternalUrl)
DatePropertyView(
title: "Start date",