Rework path storage, add start screen
This commit is contained in:
@ -2,12 +2,6 @@ import Foundation
|
||||
|
||||
final class PathSettings: ObservableObject {
|
||||
|
||||
@Published
|
||||
var contentDirectoryPath: String
|
||||
|
||||
@Published
|
||||
var outputDirectoryPath: String
|
||||
|
||||
@Published
|
||||
var assetsOutputFolderPath: String
|
||||
|
||||
@ -27,9 +21,7 @@ final class PathSettings: ObservableObject {
|
||||
var tagsOutputFolderPath: String
|
||||
|
||||
init(file: PathSettingsFile) {
|
||||
self.contentDirectoryPath = file.contentDirectoryPath
|
||||
self.assetsOutputFolderPath = file.assetsOutputFolderPath
|
||||
self.outputDirectoryPath = file.outputDirectoryPath
|
||||
self.pagesOutputFolderPath = file.pagesOutputFolderPath
|
||||
self.imagesOutputFolderPath = file.imagesOutputFolderPath
|
||||
self.filesOutputFolderPath = file.filesOutputFolderPath
|
||||
@ -38,9 +30,7 @@ final class PathSettings: ObservableObject {
|
||||
}
|
||||
|
||||
var file: PathSettingsFile {
|
||||
.init(contentDirectoryPath: contentDirectoryPath,
|
||||
outputDirectoryPath: outputDirectoryPath,
|
||||
assetsOutputFolderPath: assetsOutputFolderPath,
|
||||
.init(assetsOutputFolderPath: assetsOutputFolderPath,
|
||||
pagesOutputFolderPath: pagesOutputFolderPath,
|
||||
imagesOutputFolderPath: imagesOutputFolderPath,
|
||||
filesOutputFolderPath: filesOutputFolderPath,
|
||||
|
@ -36,8 +36,4 @@ final class Settings: ObservableObject {
|
||||
case .german: return german
|
||||
}
|
||||
}
|
||||
|
||||
var outputDirectory: URL {
|
||||
URL(fileURLWithPath: paths.outputDirectoryPath)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user