Changed the button time
This commit is contained in:
@@ -23,6 +23,26 @@ struct AnkiView: View {
|
|||||||
// .font(.subheadline)
|
// .font(.subheadline)
|
||||||
// .foregroundStyle(.gray)
|
// .foregroundStyle(.gray)
|
||||||
HStack(alignment: .center) {
|
HStack(alignment: .center) {
|
||||||
|
NextRepetitionButtonView(
|
||||||
|
buttonText: "Wrong",
|
||||||
|
nextMilestone: word!.nextSpacedRepetitionMilestone,
|
||||||
|
wordId: word!.id,
|
||||||
|
width: geometry.size.width,
|
||||||
|
color: .red,
|
||||||
|
geometry: geometry,
|
||||||
|
timeText: "1m",
|
||||||
|
showDescription: $showDescription
|
||||||
|
)
|
||||||
|
NextRepetitionButtonView(
|
||||||
|
buttonText: "Correct",
|
||||||
|
nextMilestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: word!.nextSpacedRepetitionMilestone),
|
||||||
|
wordId: word!.id,
|
||||||
|
width:geometry.size.width,
|
||||||
|
color: .orange,
|
||||||
|
geometry: geometry,
|
||||||
|
timeText: "10m",
|
||||||
|
showDescription: $showDescription
|
||||||
|
)
|
||||||
NextRepetitionButtonView(
|
NextRepetitionButtonView(
|
||||||
buttonText: "Easy",
|
buttonText: "Easy",
|
||||||
nextMilestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: word!.nextSpacedRepetitionMilestone)),
|
nextMilestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: word!.nextSpacedRepetitionMilestone)),
|
||||||
@@ -30,23 +50,9 @@ struct AnkiView: View {
|
|||||||
width: geometry.size.width,
|
width: geometry.size.width,
|
||||||
color: .green,
|
color: .green,
|
||||||
geometry: geometry,
|
geometry: geometry,
|
||||||
showDescription: $showDescription)
|
timeText: "1h",
|
||||||
NextRepetitionButtonView(
|
showDescription: $showDescription
|
||||||
buttonText: "Normal",
|
)
|
||||||
nextMilestone: WordAX.SpacedRepetitionMilestoneEnum.getNext(milestone: word!.nextSpacedRepetitionMilestone),
|
|
||||||
wordId: word!.id,
|
|
||||||
width:geometry.size.width,
|
|
||||||
color: .orange,
|
|
||||||
geometry: geometry,
|
|
||||||
showDescription: $showDescription)
|
|
||||||
NextRepetitionButtonView(
|
|
||||||
buttonText: "Hard",
|
|
||||||
nextMilestone: word!.nextSpacedRepetitionMilestone,
|
|
||||||
wordId: word!.id,
|
|
||||||
width: geometry.size.width,
|
|
||||||
color: .red,
|
|
||||||
geometry: geometry,
|
|
||||||
showDescription: $showDescription)
|
|
||||||
}
|
}
|
||||||
.padding([.bottom, .trailing, .leading])
|
.padding([.bottom, .trailing, .leading])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct NextRepetitionButtonView: View {
|
|||||||
let width: CGFloat
|
let width: CGFloat
|
||||||
let color: Color
|
let color: Color
|
||||||
let geometry: GeometryProxy
|
let geometry: GeometryProxy
|
||||||
let newText: String = "1h"
|
let timeText: String
|
||||||
// { colorScheme == .light ? .cyan : .darkCyan }
|
// { colorScheme == .light ? .cyan : .darkCyan }
|
||||||
@Binding var showDescription: Bool
|
@Binding var showDescription: Bool
|
||||||
@EnvironmentObject var model: WordAXModelView
|
@EnvironmentObject var model: WordAXModelView
|
||||||
@@ -26,7 +26,7 @@ struct NextRepetitionButtonView: View {
|
|||||||
}) {
|
}) {
|
||||||
VStack {
|
VStack {
|
||||||
Text(buttonText)
|
Text(buttonText)
|
||||||
Text(">" + newText)
|
Text(">" + timeText)
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
.bold()
|
.bold()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user