Add page settings, improve settings UI

This commit is contained in:
Christoph Hagen
2024-12-05 21:07:06 +01:00
parent f2d78aef93
commit 18eb64f289
17 changed files with 189 additions and 43 deletions

View File

@@ -15,7 +15,27 @@ struct PostFeedSettingsView: View {
.font(.largeTitle)
.bold()
Text("Change the way the posts are displayed")
.foregroundStyle(.secondary)
.padding(.bottom, 30)
Text("Content Width")
.font(.headline)
IntegerField("", number: $content.settings.posts.contentWidth)
.textFieldStyle(.roundedBorder)
.frame(maxWidth: 400)
Text("The maximum width of the content the post feed (in pixels)")
.foregroundStyle(.secondary)
.padding(.bottom)
Text("Posts Per Page")
.font(.headline)
IntegerField("", number: $content.settings.posts.postsPerPage)
.textFieldStyle(.roundedBorder)
.frame(maxWidth: 400)
Text("The maximum number of posts displayed on a single page")
.foregroundStyle(.secondary)
.padding(.bottom)
LocalizedPostFeedSettingsView(settings: content.settings.localized(in: language).posts)
}
}