mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-18 23:22:08 +00:00
test
This commit is contained in:
parent
50bdc0c78a
commit
7c289eee8c
1 changed files with 38 additions and 59 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue