This commit is contained in:
Francesco 2025-06-01 21:46:20 +02:00
parent 50bdc0c78a
commit 7c289eee8c

View file

@ -204,58 +204,52 @@ struct MediaInfoView: View {
isFetchingEpisode = false
showStreamLoadingView = false
}
.navigationViewStyle(StackNavigationViewStyle())
}
@ViewBuilder
private var mainScrollView: some View {
ScrollView {
ZStack(alignment: .top) {
KFImage(URL(string: imageUrl))
.placeholder {
Rectangle()
.fill(Color.gray.opacity(0.3))
.shimmering()
}
.setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1.5, sharpeningRadius: 0.8))
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: UIScreen.main.bounds.width, height: 700)
.clipped()
KFImage(URL(string: imageUrl))
.placeholder { EmptyView() }
.setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1.5, sharpeningRadius: 0.8))
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: UIScreen.main.bounds.width, height: 700)
.clipped()
.blur(radius: 30)
.mask(
LinearGradient(
gradient: Gradient(stops: [
.init(color: .clear, location: 0.0),
.init(color: .clear, location: 0.6),
.init(color: .black, location: 0.8),
.init(color: .black, location: 1.0)
]),
startPoint: .top,
endPoint: .bottom
GeometryReader { geometry in
KFImage(URL(string: imageUrl))
.placeholder {
Rectangle()
.fill(Color.gray.opacity(0.3))
.shimmering()
}
.setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1.5, sharpeningRadius: 0.8))
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: geometry.size.width, height: geometry.size.height + 100)
.blur(radius: 30)
.overlay(
LinearGradient(
gradient: Gradient(stops: [
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.0), location: 0.0),
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.3), location: 0.3),
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.8), location: 0.7),
.init(color: (colorScheme == .dark ? Color.black : Color.white), location: 1.0)
]),
startPoint: .top,
endPoint: .bottom
)
)
)
.overlay(
LinearGradient(
gradient: Gradient(stops: [
.init(color: .clear, location: 0.0),
.init(color: .clear, location: 0.7),
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.9), location: 1.0)
]),
startPoint: .top,
endPoint: .bottom
)
)
}
.ignoresSafeArea()
VStack(spacing: 0) {
Rectangle()
.fill(Color.clear)
.frame(height: 400)
KFImage(URL(string: imageUrl))
.placeholder {
Rectangle()
.fill(Color.gray.opacity(0.3))
.shimmering()
}
.setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1.5, sharpeningRadius: 0.8))
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: UIScreen.main.bounds.width, height: 700)
.clipped()
VStack(alignment: .leading, spacing: 16) {
headerSection
if !episodeLinks.isEmpty {
@ -265,22 +259,7 @@ struct MediaInfoView: View {
}
}
.padding()
.background(
LinearGradient(
gradient: Gradient(stops: [
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.0), location: 0.0),
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.5), location: 0.2),
.init(color: (colorScheme == .dark ? Color.black : Color.white).opacity(0.8), location: 0.5),
.init(color: (colorScheme == .dark ? Color.black : Color.white), location: 1.0)
]),
startPoint: .top,
endPoint: .bottom
)
.clipShape(RoundedRectangle(cornerRadius: 0))
.shadow(color: (colorScheme == .dark ? Color.black : Color.white).opacity(1), radius: 10, x: 0, y: 10)
)
}
.deviceScaled()
}
}
.onAppear {