|
|
|
|
@ -26,7 +26,8 @@ struct SeparatorView: View { |
|
|
|
|
var body: some View { |
|
|
|
|
Spacer() |
|
|
|
|
.frame(minWidth: 0.0, maxWidth: .infinity, minHeight: 1.0, maxHeight: 1.0) |
|
|
|
|
.background(.gray) |
|
|
|
|
.background(Color(white: 0.85)) |
|
|
|
|
.padding(.vertical, 8.0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -130,28 +131,14 @@ struct LiveCountdownView: View { |
|
|
|
|
var date: Date |
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
// Spacer() |
|
|
|
|
|
|
|
|
|
TimelineView(.periodic(from: self.date, by: 0.01)) { context in |
|
|
|
|
VStack(alignment: .trailing) { |
|
|
|
|
|
|
|
|
|
let running = self.date > context.date |
|
|
|
|
|
|
|
|
|
if running { |
|
|
|
|
|
|
|
|
|
HStack { |
|
|
|
|
TimeView(text: self._formattedDuration(date: context.date)) |
|
|
|
|
// .padding(.trailing) |
|
|
|
|
// Button { |
|
|
|
|
// self._cancelCountdown() |
|
|
|
|
// } label: { |
|
|
|
|
// Image(systemName: "xmark.circle.fill") |
|
|
|
|
// .font(.title) |
|
|
|
|
// .foregroundColor(.white) |
|
|
|
|
// .cornerRadius(8.0) |
|
|
|
|
// .frame(minWidth: 0.0, maxWidth: 60.0, minHeight: 0.0, maxHeight: .infinity) |
|
|
|
|
// }.background(.red) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
TimeView(text: self._formattedDuration(date: context.date)) |
|
|
|
|
} else { |
|
|
|
|
TimeView(text: self.date.formatted(date: .omitted, time: .shortened)) |
|
|
|
|
} |
|
|
|
|
@ -160,7 +147,8 @@ struct LiveCountdownView: View { |
|
|
|
|
if !running { |
|
|
|
|
GreenCheckmarkView() |
|
|
|
|
} |
|
|
|
|
Text(self.countdown.displayName.uppercased()).padding(.top, 2.0) |
|
|
|
|
Text(self.countdown.displayName.uppercased()) |
|
|
|
|
// .padding(.top, 2.0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|