Rework storage structs, link preview

This commit is contained in:
Christoph Hagen
2025-01-08 14:59:04 +01:00
parent b99c064d10
commit a7197b9628
75 changed files with 1365 additions and 1454 deletions

View File

@ -0,0 +1,29 @@
import SwiftUI
struct LinkPreviewDetailView: View {
@ObservedObject
var linkPreview: LinkPreview
let fallbackTitle: String?
var body: some View {
VStack(alignment: .leading) {
OptionalStringPropertyView(
title: "Preview Title",
text: $linkPreview.title,
prompt: fallbackTitle,
footer: "The title to use in a link preview")
OptionalImagePropertyView(
title: "Preview Image",
selectedImage: $linkPreview.image,
footer: "The image to show in a link preview")
OptionalTextFieldPropertyView(
title: "Preview Description",
text: $linkPreview.description,
footer: "The description to show in a link preview")
}
}
}