34 lines
848 B
Swift
34 lines
848 B
Swift
//
|
|
// TitleView.swift
|
|
// Werkout_ios
|
|
//
|
|
// Created by Trey Tartt on 6/17/24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct TitleView: View {
|
|
@ObservedObject var bridgeModule = BridgeModule.shared
|
|
|
|
var body: some View {
|
|
HStack {
|
|
if let workout = bridgeModule.currentWorkoutInfo.workout {
|
|
Text(workout.name)
|
|
.font(Font.system(size: 100))
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
}
|
|
|
|
if bridgeModule.currentWorkoutRunTimeInSeconds > -1 {
|
|
Text("\(bridgeModule.currentWorkoutRunTimeInSeconds)")
|
|
.font(Font.system(size: 100))
|
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
.padding(.trailing, 100)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
TitleView()
|
|
}
|