mirror of
https://github.com/yattee/yattee.git
synced 2025-10-14 11:28:13 +00:00
Add hiding short videos
This commit is contained in:
33
Shared/Views/HideShortsButtons.swift
Normal file
33
Shared/Views/HideShortsButtons.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
.font(.caption2)
|
||||
.imageScale(.small)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct HideShortsButtons_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
HideShortsButtons(hide: .constant(true))
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user