2023-02-25 15:42:18 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct HideShortsButtons: View {
|
|
|
|
@Binding var hide: Bool
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
Button {
|
|
|
|
hide.toggle()
|
|
|
|
} label: {
|
|
|
|
Group {
|
|
|
|
if hide {
|
|
|
|
Label("Short videos: hidden", systemImage: "bolt.slash.fill")
|
|
|
|
.help("Short videos: hidden")
|
|
|
|
} else {
|
|
|
|
Label("Short videos: visible", systemImage: "bolt.fill")
|
|
|
|
.help("Short videos: visible")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if os(tvOS)
|
2023-04-22 19:07:30 +00:00
|
|
|
.font(.caption)
|
2023-02-25 15:42:18 +00:00
|
|
|
.imageScale(.small)
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct HideShortsButtons_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
VStack {
|
|
|
|
HideShortsButtons(hide: .constant(true))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|