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

@ -81,7 +81,7 @@ struct AddPageView: View {
urlString: "page",
title: "A Title"),
tags: [])
content.pages.insert(page, at: 0)
content.add(page)
selectedPage = page
dismissSheet()
}

View File

@ -82,11 +82,10 @@ struct PageDetailView: View {
}
private func generate() {
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")