1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 14:20:32 +05:30
yattee/Shared/Settings/ServicesSettings.swift

31 lines
766 B
Swift
Raw Normal View History

2021-10-23 17:42:53 +05:30
import Defaults
2021-10-23 17:21:02 +05:30
import SwiftUI
struct ServicesSettings: View {
2021-10-23 17:42:53 +05:30
@Default(.sponsorBlockInstance) private var sponsorBlock
2021-10-23 17:21:02 +05:30
var body: some View {
2021-10-23 17:42:53 +05:30
Section(header: Text("SponsorBlock API")) {
TextField(
"SponsorBlock API Instance",
text: $sponsorBlock,
prompt: Text("SponsorBlock API URL, leave blank to disable")
)
.labelsHidden()
#if !os(macOS)
.autocapitalization(.none)
.keyboardType(.URL)
#endif
#if os(macOS)
Spacer()
#endif
}
2021-10-23 17:21:02 +05:30
}
}
struct ServicesSettings_Previews: PreviewProvider {
static var previews: some View {
ServicesSettings()
}
}