Improve content saving, label editing

This commit is contained in:
Christoph Hagen
2025-05-02 22:11:43 +02:00
parent fea06a93b7
commit 1f4f32c9af
15 changed files with 274 additions and 150 deletions

View File

@ -6,9 +6,7 @@ import SwiftUI
including the title, url path and required resources
*/
final class LocalizedPage: ObservableObject {
unowned let content: Content
final class LocalizedPage: ChangeObservingItem {
/**
The string to use when creating the url for the page.
@ -50,13 +48,13 @@ final class LocalizedPage: ObservableObject {
originalUrl: String? = nil,
linkPreview: LinkPreview = .init(),
hideTitle: Bool = false) {
self.content = content
self.urlString = urlString
self.title = title
self.lastModified = lastModified
self.originalUrl = originalUrl
self.linkPreview = linkPreview
self.hideTitle = hideTitle
super.init(content: content)
}
func isValid(urlComponent: String) -> Bool {