1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 06:40:32 +05:30
yattee/Shared/Settings/ServicesSettings.swift
2021-10-23 14:15:42 +02:00

31 lines
766 B
Swift

import Defaults
import SwiftUI
struct ServicesSettings: View {
@Default(.sponsorBlockInstance) private var sponsorBlock
var body: some View {
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
}
}
}
struct ServicesSettings_Previews: PreviewProvider {
static var previews: some View {
ServicesSettings()
}
}