Show linking posts on page content

This commit is contained in:
Christoph Hagen
2025-01-13 22:34:51 +01:00
parent e69486895f
commit 4131b483e6
7 changed files with 80 additions and 64 deletions

View File

@ -42,9 +42,17 @@ struct LocalizedPageContentView: View {
}
Spacer()
}
if let generationResults {
PageContentResultsView(results: generationResults)
}
HStack {
if let generationResults {
PageContentResultsView(results: generationResults)
}
let linkingPosts = content.posts.filter { $0.linkedPage == page }
TextWithPopup(
symbol: .ipadAndArrowForward,
text: "\(linkingPosts.count) linking posts",
items: linkingPosts.map { $0.title(in: language) })
}.foregroundStyle(.secondary)
HighlightedTextEditor(
text: $pageContent,
highlightRules: .markdown)