Reset data after folder change

This commit is contained in:
Christoph Hagen
2024-12-17 23:24:07 +01:00
parent 9a53e020a7
commit 9c828ff80a
9 changed files with 51 additions and 16 deletions

View File

@ -18,16 +18,15 @@ struct PathSettingsView: View {
FolderOnDiskPropertyView(
title: "Content Folder",
folder: $content.storage.contentPath,
isStale: $content.storage.contentPathUrlIsStale,
footer: "The folder where the raw content of the website is stored") { url in
guard content.storage.save(contentPath: url) else {
return
}
#warning("Reload database")
content.update(contentPath: url)
}
FolderOnDiskPropertyView(
title: "Output Folder",
folder: $content.storage.outputPath,
isStale: $content.storage.outputPathUrlIsStale,
footer: "The folder where the generated website is stored") { url in
content.storage.save(outputPath: url)
}