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