|
|
|
|
@ -13,12 +13,14 @@ struct CountdownDialView: View { |
|
|
|
|
|
|
|
|
|
@ObservedObject var countdown: Countdown |
|
|
|
|
|
|
|
|
|
@State var isEditing: Bool |
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
|
|
|
|
|
HStack { |
|
|
|
|
VStack(alignment: .leading) { |
|
|
|
|
Text(countdown.activity?.name?.uppercased() ?? "") |
|
|
|
|
.foregroundColor(.black) |
|
|
|
|
.foregroundColor(isEditing ? .white : .black) |
|
|
|
|
.multilineTextAlignment(.leading) |
|
|
|
|
Text(countdown.duration.minuteSecond) |
|
|
|
|
.fontWeight(.semibold) |
|
|
|
|
@ -32,6 +34,8 @@ struct CountdownDialView: View { |
|
|
|
|
|
|
|
|
|
struct CountdownLiveView_Previews: PreviewProvider { |
|
|
|
|
static var previews: some View { |
|
|
|
|
CountdownDialView(countdown: Countdown.fake(context: PersistenceController.preview.container.viewContext)).background(.cyan).environmentObject(Conductor.maestro) |
|
|
|
|
CountdownDialView(countdown: Countdown.fake(context: PersistenceController.preview.container.viewContext), isEditing: false) |
|
|
|
|
.background(.cyan) |
|
|
|
|
.environmentObject(Conductor.maestro) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|