Channel playlists support

This commit is contained in:
Arkadiusz Fal
2021-10-23 01:04:03 +02:00
parent 4307da57c5
commit 734bb31260
22 changed files with 402 additions and 89 deletions

View File

@@ -14,7 +14,7 @@ struct ChannelCell: View {
Button {
let recent = RecentItem(from: channel)
recents.add(recent)
navigation.isChannelOpen = true
navigation.presentingChannel = true
if navigationStyle == .sidebar {
navigation.sidebarSectionChanged.toggle()
@@ -30,10 +30,13 @@ struct ChannelCell: View {
var content: some View {
VStack {
Text("Channel".uppercased())
.foregroundColor(.secondary)
.fontWeight(.light)
.opacity(0.6)
HStack(alignment: .top, spacing: 3) {
Image(systemName: "person.crop.rectangle")
Text("Channel".uppercased())
.fontWeight(.light)
.opacity(0.6)
}
.foregroundColor(.secondary)
WebImage(url: channel.thumbnailURL)
.resizable()
@@ -44,20 +47,17 @@ struct ChannelCell: View {
.frame(width: 88, height: 88)
.clipShape(Circle())
Group {
DetailBadge(text: channel.name, style: .prominent)
DetailBadge(text: channel.name, style: .prominent)
Group {
if let subscriptions = channel.subscriptionsString {
Text("\(subscriptions) subscribers")
.foregroundColor(.secondary)
} else {
Text("")
}
Group {
if let subscriptions = channel.subscriptionsString {
Text("\(subscriptions) subscribers")
.foregroundColor(.secondary)
} else {
Text("")
}
.frame(height: 20)
}
.offset(x: 0, y: -15)
.frame(height: 20)
}
}
}