Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,42 @@
import SwiftUI
/// View for Safari via a WebKit view
struct EmbeddedSafariView: View {
// MARK: Properties
/// If the content is loading
@State private var isLoading: Bool = true
/// The view height
@State private var height: CGFloat = .zero
/// The url
let url: URL
/// If the view should resize itself to the height of the website content
var hasDynamicHeight: Bool = true
/// The actual view
var body: some View {
ZStack {
if hasDynamicHeight {
EmbeddedSafariViewContent(isLoading: $isLoading, height: $height, hasDynamicHeight: hasDynamicHeight, url: url)
.frame(height: .infinity)
.edgesIgnoringSafeArea(.all)
} else {
EmbeddedSafariViewContent(isLoading: $isLoading, height: $height, hasDynamicHeight: hasDynamicHeight, url: url)
.edgesIgnoringSafeArea(.all)
}
if isLoading {
ProgressView()
.controlSize(.large)
.frame(minHeight: 100)
}
}
}
}