Improve storage, paths
This commit is contained in:
@ -5,9 +5,6 @@ struct PathSettingsView: View {
|
||||
@Environment(\.language)
|
||||
private var language
|
||||
|
||||
@AppStorage("contentPath")
|
||||
private var contentPath: String = ""
|
||||
|
||||
@EnvironmentObject
|
||||
private var content: Content
|
||||
|
||||
@ -20,12 +17,12 @@ struct PathSettingsView: View {
|
||||
|
||||
FolderOnDiskPropertyView(
|
||||
title: "Content Folder",
|
||||
folder: $contentPath,
|
||||
folder: $content.settings.paths.contentDirectoryPath,
|
||||
footer: "The folder where the raw content of the website is stored") { url in
|
||||
guard content.storage.save(folderUrl: url, in: .contentPath) else {
|
||||
return
|
||||
}
|
||||
contentPath = url.path()
|
||||
content.settings.paths.contentDirectoryPath = url.path()
|
||||
}
|
||||
|
||||
FolderOnDiskPropertyView(
|
||||
|
Reference in New Issue
Block a user