Skip to content

Commit

Permalink
feat: Open edX app theming capability improvements (Option 2) (#182)
Browse files Browse the repository at this point in the history
* feat: openedX app theming capability improvements

* fix: mixup after rebasing with develop

* refactor: code refactor

* chore: Apply accentColor to tabbar items for theme configureable

* fix: fixup after merging the develop branch

* feat: openedX app theming capability improvements

* chore: remove configureable assets and font parser from Core

* chore: address review feedback(linked the Theme framework with Core framework)

* fix: fix broken code after conflicts resolve

* fix: fix the broken archive process

* refactor: remove unused old Environment file
  • Loading branch information
saeedbashir authored Dec 4, 2023
1 parent ec53c4c commit 153e195
Show file tree
Hide file tree
Showing 136 changed files with 2,352 additions and 473 deletions.
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

0 comments on commit 153e195

Please sign in to comment.