Rework path storage, add start screen

This commit is contained in:
Christoph Hagen
2024-12-17 23:05:45 +01:00
parent 849585acc7
commit 9a53e020a7
21 changed files with 408 additions and 229 deletions

View File

@@ -17,22 +17,19 @@ struct PathSettingsView: View {
FolderOnDiskPropertyView(
title: "Content Folder",
folder: $content.settings.paths.contentDirectoryPath,
folder: $content.storage.contentPath,
footer: "The folder where the raw content of the website is stored") { url in
guard content.storage.save(folderUrl: url, in: .contentPath) else {
guard content.storage.save(contentPath: url) else {
return
}
content.settings.paths.contentDirectoryPath = url.path()
#warning("Reload database")
}
FolderOnDiskPropertyView(
title: "Output Folder",
folder: $content.settings.paths.outputDirectoryPath,
folder: $content.storage.outputPath,
footer: "The folder where the generated website is stored") { url in
guard content.storage.save(folderUrl: url, in: .outputPath) else {
return
}
content.settings.paths.outputDirectoryPath = url.path()
content.storage.save(outputPath: url)
}
StringPropertyView(