2021-10-23 12:12:53 +00:00
|
|
|
import Defaults
|
2021-10-23 11:51:02 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct ServicesSettings: View {
|
2021-10-23 12:12:53 +00:00
|
|
|
@Default(.sponsorBlockInstance) private var sponsorBlock
|
2021-10-23 11:51:02 +00:00
|
|
|
var body: some View {
|
2021-10-23 12:12:53 +00:00
|
|
|
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 11:51:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ServicesSettings_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
ServicesSettings()
|
|
|
|
}
|
|
|
|
}
|