mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
Fixed stretchy header + episode cells
This commit is contained in:
parent
e27de30bae
commit
e1261678f8
2 changed files with 0 additions and 23 deletions
|
|
@ -156,7 +156,6 @@ struct EpisodeCell: View {
|
|||
}
|
||||
|
||||
private extension EpisodeCell {
|
||||
|
||||
var actionButtonsBackground: some View {
|
||||
HStack {
|
||||
Spacer()
|
||||
|
|
@ -216,14 +215,9 @@ private extension EpisodeCell {
|
|||
actionButtonsBackground
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 8)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(cellBackground)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 15))
|
||||
.contextMenu { contextMenuContent }
|
||||
.swipeActions(edge: .trailing) {
|
||||
|
||||
Button(action: { downloadEpisode() }) {
|
||||
Label("Download", systemImage: "arrow.down.circle")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ struct StretchyHeaderView: View {
|
|||
if case .success(let response) = result {
|
||||
let uiImage = response.image
|
||||
backdropImage = uiImage
|
||||
let extractedColor = Color.ambientColor(from: uiImage)
|
||||
localAmbientColor = extractedColor
|
||||
}
|
||||
},
|
||||
alignment: .center
|
||||
|
|
@ -50,19 +48,6 @@ struct StretchyHeaderView: View {
|
|||
.clipped()
|
||||
.frame(height: height)
|
||||
.offset(y: offset)
|
||||
|
||||
LinearGradient(
|
||||
gradient: Gradient(stops: [
|
||||
.init(color: localAmbientColor.opacity(0.0), location: 0.0),
|
||||
.init(color: localAmbientColor.opacity(0.1), location: 0.2),
|
||||
.init(color: localAmbientColor.opacity(0.3), location: 0.7),
|
||||
.init(color: localAmbientColor.opacity(0.6), location: 1.0)
|
||||
]),
|
||||
startPoint: .top,
|
||||
endPoint: .bottom
|
||||
)
|
||||
.frame(height: 100)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 0))
|
||||
}
|
||||
}
|
||||
.frame(height: headerHeight)
|
||||
|
|
@ -73,8 +58,6 @@ struct StretchyHeaderView: View {
|
|||
if let response = try? await ImagePipeline.shared.image(for: request) {
|
||||
await MainActor.run {
|
||||
backdropImage = response
|
||||
let extractedColor = Color.ambientColor(from: response)
|
||||
localAmbientColor = extractedColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue