added ios module
This commit is contained in:
31
ios/OralTrainer/Views/TrainingView.swift
Normal file
31
ios/OralTrainer/Views/TrainingView.swift
Normal file
@@ -0,0 +1,31 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TrainingView: View {
|
||||
@ObservedObject var controller: PlayerController
|
||||
@ObservedObject var catalogVM: CatalogViewModel
|
||||
@Binding var continuousPlayback: Bool
|
||||
let onFullscreen: () -> Void
|
||||
|
||||
var body: some View {
|
||||
ScrollView(showsIndicators: false) {
|
||||
VStack(spacing: 0) {
|
||||
PlayerSectionView(
|
||||
controller: controller,
|
||||
showsContinuousToggle: true,
|
||||
continuousPlayback: $continuousPlayback,
|
||||
onFullscreen: onFullscreen
|
||||
)
|
||||
CatalogView(vm: catalogVM)
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
}
|
||||
.onChange(of: continuousPlayback) { enabled in
|
||||
controller.setContinuousPlayback(enabled)
|
||||
controller.showTransientMessage(
|
||||
enabled
|
||||
? "已开启连续播放,将按句子顺序连续播放"
|
||||
: "已关闭连续播放,将循环播放当前句子"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user