iOS - chapters header is a button now

This commit is contained in:
Toni Förster 2023-11-25 22:02:28 +01:00
parent a33a1d7658
commit b0d81cdefd
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -442,17 +442,33 @@ struct VideoDetails: View {
}
var chaptersHeader: some View {
HStack {
Text("Chapters".localized())
Spacer()
Button(action: { chaptersExpanded.toggle() }) {
Image(systemName: chaptersExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
#if canImport(UIKit)
Button(action: {
chaptersExpanded.toggle()
}) {
HStack {
Text("Chapters".localized())
Spacer()
Image(systemName: chaptersExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
}
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
#elseif canImport(AppKit)
HStack {
Text("Chapters".localized())
Spacer()
Button(action: { chaptersExpanded.toggle() }) {
Image(systemName: chaptersExpanded ? "chevron.up" : "chevron.down")
.imageScale(.small)
}
}
.padding(.horizontal)
.font(.caption)
.foregroundColor(.secondary)
#endif
}
}