diff --git a/Core/Core/View/Base/UnitButtonView.swift b/Core/Core/View/Base/UnitButtonView.swift index 6778bb8dd..b312c928d 100644 --- a/Core/Core/View/Base/UnitButtonView.swift +++ b/Core/Core/View/Base/UnitButtonView.swift @@ -145,7 +145,9 @@ public struct UnitButtonView: View { case .continueLesson, .nextSection: HStack { Text(type.stringValue()) - .foregroundColor(Theme.Colors.styledButtonText) + .foregroundColor( + type == .continueLesson ? Theme.Colors.accentColor : + Theme.Colors.styledButtonText) .padding(.leading, 20) .font(Theme.Fonts.labelLarge) CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template) @@ -180,7 +182,9 @@ public struct UnitButtonView: View { case .continueLesson, .nextSection, .reload, .finish, .custom: Theme.Shapes.buttonShape - .fill(bgColor ?? Theme.Colors.accentButtonColor) + .fill( + type == .continueLesson ? Theme.Colors.background : + bgColor ?? Theme.Colors.accentButtonColor) .shadow(color: (type == .first || type == .next @@ -199,7 +203,7 @@ public struct UnitButtonView: View { )) .foregroundColor( type == .continueLesson - ? Theme.Colors.accentButtonColor + ? Theme.Colors.accentColor : Theme.Colors.secondaryButtonBorderColor ) ) diff --git a/Course/Course/Presentation/Dates/DatesStatusInfoView.swift b/Course/Course/Presentation/Dates/DatesStatusInfoView.swift index b193dae22..996a35abd 100644 --- a/Course/Course/Presentation/Dates/DatesStatusInfoView.swift +++ b/Course/Course/Presentation/Dates/DatesStatusInfoView.swift @@ -27,7 +27,7 @@ struct DatesStatusInfoView: View { var body: some View { VStack(alignment: .leading, spacing: 8) { let header = datesBannerInfo.status?.header ?? "" - let button = datesBannerInfo.status?.buttonTitle ?? "" + let buttonTitle = datesBannerInfo.status?.buttonTitle ?? "" Spacer() if !header.isEmpty { Text(header) @@ -43,34 +43,40 @@ struct DatesStatusInfoView: View { .foregroundColor(Theme.Colors.textPrimary) .padding(.horizontal, 16) - if !button.isEmpty { - UnitButtonView(type: .custom(button)) { - guard !isLoading else { return } - isLoading = true - courseDatesViewModel?.trackPLSEvent( - .plsShiftDatesClicked, - bivalue: .plsShiftDatesClicked, - courseID: courseID, - screenName: screen.rawValue, - type: datesBannerInfo.status?.analyticsBannerType ?? "" - ) - Task { - if courseDatesViewModel != nil { - await courseDatesViewModel?.shiftDueDates( - courseID: courseID, - screen: screen, - type: datesBannerInfo.status?.analyticsBannerType ?? "" - ) - } else if courseContainerViewModel != nil { - await courseContainerViewModel?.shiftDueDates( - courseID: courseID, - screen: screen, - type: datesBannerInfo.status?.analyticsBannerType ?? "" - ) + if !buttonTitle.isEmpty { + StyledButton( + buttonTitle, + action: { + guard !isLoading else { return } + isLoading = true + courseDatesViewModel?.trackPLSEvent( + .plsShiftDatesClicked, + bivalue: .plsShiftDatesClicked, + courseID: courseID, + screenName: screen.rawValue, + type: datesBannerInfo.status?.analyticsBannerType ?? "" + ) + Task { + if courseDatesViewModel != nil { + await courseDatesViewModel?.shiftDueDates( + courseID: courseID, + screen: screen, + type: datesBannerInfo.status?.analyticsBannerType ?? "" + ) + } else if courseContainerViewModel != nil { + await courseContainerViewModel?.shiftDueDates( + courseID: courseID, + screen: screen, + type: datesBannerInfo.status?.analyticsBannerType ?? "" + ) + } + isLoading = false } - isLoading = false - } - } + + }, + color: Theme.Colors.accentColor, + textColor: Theme.Colors.primaryButtonTextColor + ) .padding([.leading, .trailing], 16) .disabled(isLoading) } diff --git a/Course/Course/Presentation/Subviews/CourseHeaderView.swift b/Course/Course/Presentation/Subviews/CourseHeaderView.swift index 514623754..59862105b 100644 --- a/Course/Course/Presentation/Subviews/CourseHeaderView.swift +++ b/Course/Course/Presentation/Subviews/CourseHeaderView.swift @@ -212,8 +212,8 @@ struct CourseHeaderView: View { action: { upgradeAction?() }, - color: Theme.Colors.accentColor, - textColor: Theme.Colors.primaryButtonTextColor, + color: Theme.Colors.accentButtonColor, + textColor: Theme.Colors.styledButtonText, leftImage: Image(systemName: "lock.fill"), imagesStyle: .attachedToText, isTitleTracking: false,