Files
omnivore/apple/OmnivoreKit/Sources/App/Views/Profile/TextToSpeechView.swift
2023-02-20 12:15:29 -07:00

36 lines
1.0 KiB
Swift

#if os(iOS)
import Models
import Services
import SwiftUI
import Views
// swiftlint:disable line_length
struct TextToSpeechView: View {
@EnvironmentObject var audioController: AudioController
var body: some View {
Group {
Form {
Section(LocalText.texttospeechSettingsAudio) {
Toggle(LocalText.texttospeechSettingsEnablePrefetch, isOn: $audioController.preloadEnabled)
}
NavigationLink(destination: TextToSpeechLanguageView().navigationTitle(LocalText.texttospeechLanguageDefault)) {
Text(LocalText.texttospeechLanguageDefault)
}
innerBody
}
}.navigationTitle(LocalText.textToSpeechGeneric)
}
private var innerBody: some View {
Section("Voices") {
ForEach(Voices.Languages, id: \.key) { language in
NavigationLink(destination: TextToSpeechVoiceSelectionView(forLanguage: language, showLanguageChanger: false)) {
Text(language.name)
}
}
}
}
}
#endif