Rework path storage, add start screen
This commit is contained in:
@ -184,7 +184,7 @@ struct PageIssueView: View {
|
||||
isExternallyStored: true,
|
||||
en: "",
|
||||
de: "")
|
||||
content.files.append(file)
|
||||
content.add(file)
|
||||
|
||||
retryPageCheck()
|
||||
}
|
||||
|
@ -59,11 +59,10 @@ struct GenerationContentView: View {
|
||||
}
|
||||
|
||||
private func generateFeed() {
|
||||
guard content.settings.paths.outputDirectoryPath != "" else {
|
||||
guard let url = content.storage.outputPath else {
|
||||
print("Invalid output path")
|
||||
return
|
||||
}
|
||||
let url = content.settings.outputDirectory
|
||||
|
||||
guard FileManager.default.fileExists(atPath: url.path) else {
|
||||
print("Missing output folder")
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user