mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 14:50:32 +05:30
35 lines
866 B
Swift
35 lines
866 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct HideShortsButtons: View {
|
|
@Default(.hideShorts) private var hideShorts
|
|
|
|
var body: some View {
|
|
Button {
|
|
hideShorts.toggle()
|
|
} label: {
|
|
Group {
|
|
if hideShorts {
|
|
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(.caption)
|
|
.imageScale(.small)
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
|
|
struct HideShortsButtons_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
VStack {
|
|
HideShortsButtons()
|
|
}
|
|
}
|
|
}
|