Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Open edX app theming capability improvements (Option 2) #182

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import Core
import Theme
import Swinject

public struct SignInView: View {
Expand All @@ -26,7 +27,7 @@ public struct SignInView: View {
public var body: some View {
ZStack(alignment: .top) {
VStack {
CoreAssets.authBackground.swiftUIImage
ThemeAssets.authBackground.swiftUIImage
.resizable()
.edgesIgnoringSafeArea(.top)
}.frame(maxWidth: .infinity, maxHeight: 200)
Expand All @@ -45,7 +46,7 @@ public struct SignInView: View {
}

VStack(alignment: .center) {
CoreAssets.appLogo.swiftUIImage
ThemeAssets.appLogo.swiftUIImage
.resizable()
.frame(maxWidth: 189, maxHeight: 54)
.padding(.top, isHorizontal ? 20 : 40)
Expand Down Expand Up @@ -142,7 +143,7 @@ public struct SignInView: View {
VStack {
Text(viewModel.alertMessage ?? "")
.shadowCardStyle(bgColor: Theme.Colors.accentColor,
textColor: .white)
textColor: Theme.Colors.white)
.padding(.top, 80)
Spacer()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import Core
import Theme

public struct SignUpView: View {

Expand All @@ -28,7 +29,7 @@ public struct SignUpView: View {
public var body: some View {
ZStack(alignment: .top) {
VStack {
CoreAssets.authBackground.swiftUIImage
ThemeAssets.authBackground.swiftUIImage
.resizable()
.edgesIgnoringSafeArea(.top)
}.frame(maxWidth: .infinity, maxHeight: 200)
Expand All @@ -38,12 +39,12 @@ public struct SignUpView: View {
ZStack {
HStack {
Text(AuthLocalization.SignIn.registerBtn)
.titleSettings(color: .white)
.titleSettings(color: Theme.Colors.white)
}
VStack {
Button(action: { viewModel.router.back() }, label: {
CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template)
.backButtonStyle(color: .white)
.backButtonStyle(color: Theme.Colors.white)
})
.foregroundColor(Theme.Colors.styledButtonText)
.padding(.leading, isHorizontal ? 48 : 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import Core
import Theme

public struct ResetPasswordView: View {

Expand All @@ -26,15 +27,15 @@ public struct ResetPasswordView: View {
public var body: some View {
ZStack(alignment: .top) {
VStack {
CoreAssets.authBackground.swiftUIImage
ThemeAssets.authBackground.swiftUIImage
.resizable()
.edgesIgnoringSafeArea(.top)
}.frame(maxWidth: .infinity, maxHeight: 200)

VStack(alignment: .center) {
NavigationBar(title: AuthLocalization.Forgot.title,
titleColor: .white,
leftButtonColor: .white,
titleColor: Theme.Colors.white,
leftButtonColor: Theme.Colors.white,
leftButtonAction: {
viewModel.router.back()
}).padding(.leading, isHorizontal ? 48 : 0)
Expand Down Expand Up @@ -125,7 +126,7 @@ public struct ResetPasswordView: View {
VStack {
Text(viewModel.alertMessage ?? "")
.shadowCardStyle(bgColor: Theme.Colors.accentColor,
textColor: .white)
textColor: Theme.Colors.white)
.padding(.top, 80)
Spacer()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import SwiftUI
import Core
import Theme

public struct LogistrationBottomView: View {
@ObservedObject
Expand Down Expand Up @@ -43,6 +44,7 @@ public struct LogistrationBottomView: View {
}
}

#if DEBUG
struct LogistrationBottomView_Previews: PreviewProvider {
static var previews: some View {
let vm = StartupViewModel(
Expand All @@ -61,3 +63,4 @@ struct LogistrationBottomView_Previews: PreviewProvider {
.loadFonts()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import SwiftUI
import Core
import Theme

public struct StartupView: View {

Expand All @@ -25,7 +26,7 @@ public struct StartupView: View {
public var body: some View {
ZStack(alignment: .top) {
VStack(alignment: .leading) {
CoreAssets.appLogo.swiftUIImage
ThemeAssets.appLogo.swiftUIImage
.resizable()
.frame(maxWidth: 189, maxHeight: 54)
.padding(.top, isHorizontal ? 20 : 40)
Expand Down
Loading