Add navigation settings, fix page generation
This commit is contained in:
@ -60,6 +60,11 @@ struct GenerationContentView: View {
|
||||
Text("\(content.results.requiredFiles.count) files")
|
||||
}
|
||||
List {
|
||||
Section("Empty pages") {
|
||||
ForEach(content.results.emptyPages.sorted()) { id in
|
||||
Text("\(id.pageId) (\(id.language))")
|
||||
}
|
||||
}
|
||||
Section("Inaccessible files") {
|
||||
ForEach(content.results.inaccessibleFiles.sorted()) { file in
|
||||
Text(file.id)
|
||||
|
@ -0,0 +1,16 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LocalizedNavigationBarSettingsView: View {
|
||||
|
||||
@ObservedObject
|
||||
var settings: LocalizedNavigationSettings
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
StringPropertyView(
|
||||
title: "Root URL",
|
||||
text: $settings.rootUrl,
|
||||
footer: "The url leading to the root page for the language")
|
||||
}
|
||||
}
|
||||
}
|
@ -7,30 +7,20 @@ struct LocalizedPostFeedSettingsView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Title")
|
||||
.font(.headline)
|
||||
TextField("", text: $settings.title)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.frame(maxWidth: 400)
|
||||
Text("The title of all post feed pages.")
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom)
|
||||
StringPropertyView(
|
||||
title: "Title",
|
||||
text: $settings.title,
|
||||
footer: "The title of all post feed pages.")
|
||||
|
||||
Text("URL prefix")
|
||||
.font(.headline)
|
||||
TextField("", text: $settings.feedUrlPrefix)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.frame(maxWidth: 400)
|
||||
Text("The prefix to generate the urls for all post feed pages.")
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom)
|
||||
StringPropertyView(
|
||||
title: "URL prefix",
|
||||
text: $settings.feedUrlPrefix,
|
||||
footer: "The prefix to generate the urls for all post feed pages.")
|
||||
|
||||
Text("Description")
|
||||
.font(.headline)
|
||||
DescriptionField(text: $settings.description)
|
||||
Text("The description of all post feed pages.")
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom)
|
||||
TextFieldPropertyView(
|
||||
title: "Description",
|
||||
text: $settings.description,
|
||||
footer: "The description of all post feed pages.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,19 +35,21 @@ struct NavigationBarSettingsView: View {
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
ForEach(content.settings.navigationItems) { tag in
|
||||
ForEach(content.settings.navigation.navigationItems) { tag in
|
||||
TagView(text: tag.title(in: language))
|
||||
.foregroundStyle(.white)
|
||||
}
|
||||
Text("Select the tags to show in the navigation bar. The number should be even.")
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
LocalizedNavigationBarSettingsView(settings: content.settings.navigation.localized(in: language))
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.sheet(isPresented: $showItemPicker) {
|
||||
ItemSelectionView(
|
||||
isPresented: $showItemPicker,
|
||||
selectedItems: $content.settings.navigationItems)
|
||||
selectedItems: $content.settings.navigation.navigationItems)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user