70 lines
2.4 KiB
Swift
70 lines
2.4 KiB
Swift
import SwiftUI
|
|
|
|
struct PageSettingsDetailView: View {
|
|
|
|
@Environment(\.language)
|
|
private var language
|
|
|
|
@EnvironmentObject
|
|
private var content: Content
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
VStack(alignment: .leading) {
|
|
Text("Page Settings")
|
|
.font(.largeTitle)
|
|
.bold()
|
|
Text("Change the way pages are displayed")
|
|
.padding(.bottom, 30)
|
|
|
|
Text("Content Width")
|
|
.font(.headline)
|
|
IntegerField("", number: $content.settings.pages.contentWidth)
|
|
.textFieldStyle(.roundedBorder)
|
|
Text("The maximum width of the content in pages (in pixels)")
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom)
|
|
|
|
Text("Fullscreen Image Width")
|
|
.font(.headline)
|
|
IntegerField("", number: $content.settings.pages.largeImageWidth)
|
|
.textFieldStyle(.roundedBorder)
|
|
Text("The maximum width of images that are diplayed fullscreen")
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom)
|
|
|
|
Text("Page Link Image Width")
|
|
.font(.headline)
|
|
IntegerField("", number: $content.settings.pages.pageLinkImageSize)
|
|
.textFieldStyle(.roundedBorder)
|
|
Text("The maximum width of images diplayed as thumbnails on page links")
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom)
|
|
|
|
Text("Page URL Prefix")
|
|
.font(.headline)
|
|
TextField("", text: $content.settings.pages.pageUrlPrefix)
|
|
.textFieldStyle(.roundedBorder)
|
|
Text("The URL prefix used for the links to pages")
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom)
|
|
|
|
Text("Javascript Files Path")
|
|
.font(.headline)
|
|
TextField("", text: $content.settings.pages.javascriptFilesPath)
|
|
.textFieldStyle(.roundedBorder)
|
|
Text("The path to the javascript files in the output folder")
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#Preview {
|
|
PageSettingsDetailView()
|
|
.environmentObject(Content.mock)
|
|
.padding()
|
|
}
|