Full page content, fixes, cleaner settings

This commit is contained in:
Christoph Hagen
2024-12-13 11:26:34 +01:00
parent efc9234917
commit b3b8c9a610
50 changed files with 1351 additions and 607 deletions

View File

@ -72,6 +72,8 @@ struct LocalizedPageDetailView: View {
.aspectRatio(contentMode: .fit)
.frame(maxWidth: 400, maxHeight: 300)
.cornerRadius(8)
Text(image.id)
.font(.headline)
}
Text("Link Preview Description")

View File

@ -93,11 +93,11 @@ struct PageContentResultsView: View {
items: results.missingFiles.sorted())
.foregroundStyle(.red)
}
if !results.warnings.isEmpty {
if !results.unknownCommands.isEmpty {
TextWithPopup(
symbol: .exclamationmarkTriangleFill,
text: "\(results.warnings.count) errors",
items: results.warnings.sorted())
text: "\(results.unknownCommands.count) unknown commands",
items: results.unknownCommands.sorted())
.foregroundStyle(.red)
}
if !results.invalidCommandArguments.isEmpty {

View File

@ -109,11 +109,11 @@ struct PageDetailView: View {
}
private func generate() {
guard content.settings.outputDirectoryPath != "" else {
guard content.settings.paths.outputDirectoryPath != "" else {
print("Invalid output path")
return
}
let url = URL(fileURLWithPath: content.settings.outputDirectoryPath)
let url = content.settings.outputDirectory
guard FileManager.default.fileExists(atPath: url.path) else {
print("Missing output folder")