Skip to content

Commit 8779a3c

Browse files
Merge remote-tracking branch 'origin/develop' into feat/dashboard
# Conflicts: # app/src/main/res/layout/fragment_main.xml # course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt
2 parents 31b3843 + a712170 commit 8779a3c

File tree

39 files changed

+354
-346
lines changed

39 files changed

+354
-346
lines changed

app/src/main/res/layout/fragment_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
android:layout_height="wrap_content"
2121
app:itemIconTint="@color/bottom_nav_color"
2222
app:itemTextColor="@color/bottom_nav_color"
23+
android:background="@color/background"
2324
app:labelVisibilityMode="labeled"
2425
app:layout_constraintBottom_toBottomOf="parent"
2526
app:layout_constraintEnd_toEndOf="parent"

auth/src/main/java/org/openedx/auth/presentation/logistration/LogistrationFragment.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import androidx.compose.ui.res.stringResource
3333
import androidx.compose.ui.semantics.semantics
3434
import androidx.compose.ui.semantics.testTagsAsResourceId
3535
import androidx.compose.ui.text.input.TextFieldValue
36+
import androidx.compose.ui.text.style.TextDecoration
3637
import androidx.compose.ui.tooling.preview.Devices
3738
import androidx.compose.ui.tooling.preview.Preview
3839
import androidx.compose.ui.unit.dp
@@ -131,7 +132,6 @@ private fun LogistrationScreen(
131132
LogistrationLogoView()
132133
Text(
133134
text = stringResource(id = R.string.pre_auth_title),
134-
color = MaterialTheme.appColors.textPrimary,
135135
style = MaterialTheme.appTypography.headlineSmall,
136136
modifier = Modifier
137137
.testTag("txt_screen_title")
@@ -177,7 +177,8 @@ private fun LogistrationScreen(
177177
},
178178
text = stringResource(id = R.string.pre_auth_explore_all_courses),
179179
color = MaterialTheme.appColors.primary,
180-
style = MaterialTheme.appTypography.labelLarge
180+
style = MaterialTheme.appTypography.labelLarge,
181+
textDecoration = TextDecoration.Underline
181182
)
182183

183184
Spacer(modifier = Modifier.weight(1f))

auth/src/main/java/org/openedx/auth/presentation/signin/compose/SignInView.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import androidx.compose.ui.text.input.ImeAction
4949
import androidx.compose.ui.text.input.KeyboardType
5050
import androidx.compose.ui.text.input.PasswordVisualTransformation
5151
import androidx.compose.ui.text.input.TextFieldValue
52+
import androidx.compose.ui.text.style.TextDecoration
5253
import androidx.compose.ui.tooling.preview.Devices
5354
import androidx.compose.ui.tooling.preview.Preview
5455
import androidx.compose.ui.unit.Dp
@@ -195,7 +196,8 @@ internal fun LoginScreen(
195196
modifier = Modifier.testTag("txt_${state.agreement.name}"),
196197
fullText = linkedText.text,
197198
hyperLinks = linkedText.links,
198-
linkTextColor = MaterialTheme.appColors.primary,
199+
linkTextColor = MaterialTheme.appColors.textHyperLink,
200+
linkTextDecoration = TextDecoration.Underline,
199201
action = { link ->
200202
onEvent(AuthEvent.OpenLink(linkedText.links, link))
201203
},
@@ -264,7 +266,7 @@ private fun AuthForm(
264266
onEvent(AuthEvent.ForgotPasswordClick)
265267
},
266268
text = stringResource(id = R.string.auth_forgot_password),
267-
color = MaterialTheme.appColors.primary,
269+
color = MaterialTheme.appColors.info_variant,
268270
style = MaterialTheme.appTypography.labelLarge
269271
)
270272
}
@@ -275,6 +277,8 @@ private fun AuthForm(
275277
OpenEdXButton(
276278
modifier = buttonWidth.testTag("btn_sign_in"),
277279
text = stringResource(id = coreR.string.core_sign_in),
280+
textColor = MaterialTheme.appColors.primaryButtonText,
281+
backgroundColor = MaterialTheme.appColors.secondaryButtonBackground,
278282
onClick = {
279283
onEvent(AuthEvent.SignIn(login = login, password = password))
280284
}
@@ -323,8 +327,10 @@ private fun PasswordTextField(
323327
onValueChanged(it.text.trim())
324328
},
325329
colors = TextFieldDefaults.outlinedTextFieldColors(
330+
textColor = MaterialTheme.appColors.textFieldText,
331+
backgroundColor = MaterialTheme.appColors.textFieldBackground,
326332
unfocusedBorderColor = MaterialTheme.appColors.textFieldBorder,
327-
backgroundColor = MaterialTheme.appColors.textFieldBackground
333+
cursorColor = MaterialTheme.appColors.textFieldText,
328334
),
329335
shape = MaterialTheme.appShapes.textFieldShape,
330336
placeholder = {

auth/src/main/java/org/openedx/auth/presentation/signup/compose/SignUpView.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ internal fun SignUpView(
329329
modifier = Modifier
330330
.testTag("txt_sign_up_title")
331331
.fillMaxWidth(),
332-
text = stringResource(id = R.string.auth_sign_up),
332+
text = stringResource(id = coreR.string.core_register),
333333
color = MaterialTheme.appColors.textPrimary,
334334
style = MaterialTheme.appTypography.displaySmall
335335
)
@@ -437,6 +437,8 @@ internal fun SignUpView(
437437
OpenEdXButton(
438438
modifier = buttonWidth.testTag("btn_create_account"),
439439
text = stringResource(id = R.string.auth_create_account),
440+
textColor = MaterialTheme.appColors.primaryButtonText,
441+
backgroundColor = MaterialTheme.appColors.secondaryButtonBackground,
440442
onClick = {
441443
showErrorMap.clear()
442444
onRegisterClick(AuthType.PASSWORD)

auth/src/main/java/org/openedx/auth/presentation/ui/AuthUI.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import androidx.compose.ui.text.input.KeyboardType
4444
import androidx.compose.ui.text.input.PasswordVisualTransformation
4545
import androidx.compose.ui.text.input.TextFieldValue
4646
import androidx.compose.ui.text.input.VisualTransformation
47+
import androidx.compose.ui.text.style.TextDecoration
4748
import androidx.compose.ui.tooling.preview.Preview
4849
import androidx.compose.ui.unit.dp
4950
import org.openedx.auth.R
@@ -170,7 +171,8 @@ fun OptionalFields(
170171
HyperlinkText(
171172
fullText = linkedText.text,
172173
hyperLinks = linkedText.links,
173-
linkTextColor = MaterialTheme.appColors.primary,
174+
linkTextColor = MaterialTheme.appColors.textHyperLink,
175+
linkTextDecoration = TextDecoration.Underline,
174176
action = {
175177
hyperLinkAction?.invoke(linkedText.links, it)
176178
},
@@ -250,8 +252,10 @@ fun LoginTextField(
250252
onValueChanged(it.text.trim())
251253
},
252254
colors = TextFieldDefaults.outlinedTextFieldColors(
255+
textColor = MaterialTheme.appColors.textFieldText,
256+
backgroundColor = MaterialTheme.appColors.textFieldBackground,
253257
unfocusedBorderColor = MaterialTheme.appColors.textFieldBorder,
254-
backgroundColor = MaterialTheme.appColors.textFieldBackground
258+
cursorColor = MaterialTheme.appColors.textFieldText,
255259
),
256260
shape = MaterialTheme.appShapes.textFieldShape,
257261
placeholder = {
@@ -332,8 +336,11 @@ fun InputRegistrationField(
332336
}
333337
},
334338
colors = TextFieldDefaults.outlinedTextFieldColors(
339+
textColor = MaterialTheme.appColors.textFieldText,
340+
backgroundColor = MaterialTheme.appColors.textFieldBackground,
341+
focusedBorderColor = MaterialTheme.appColors.textFieldBorder,
335342
unfocusedBorderColor = MaterialTheme.appColors.textFieldBorder,
336-
backgroundColor = MaterialTheme.appColors.textFieldBackground
343+
cursorColor = MaterialTheme.appColors.textFieldText,
337344
),
338345
shape = MaterialTheme.appShapes.textFieldShape,
339346
placeholder = {

auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal fun SocialAuthView(
4545
.testTag("btn_google_auth")
4646
.padding(top = 24.dp)
4747
.fillMaxWidth(),
48-
backgroundColor = MaterialTheme.appColors.background,
48+
backgroundColor = MaterialTheme.appColors.authGoogleButtonBackground,
4949
borderColor = MaterialTheme.appColors.primary,
5050
textColor = Color.Unspecified,
5151
onClick = {
@@ -62,7 +62,8 @@ internal fun SocialAuthView(
6262
modifier = Modifier
6363
.testTag("txt_google_auth")
6464
.padding(start = 10.dp),
65-
text = stringResource(id = stringRes)
65+
text = stringResource(id = stringRes),
66+
color = MaterialTheme.appColors.primaryButtonBorderedText,
6667
)
6768
}
6869
}
@@ -87,13 +88,13 @@ internal fun SocialAuthView(
8788
Icon(
8889
painter = painterResource(id = R.drawable.ic_auth_facebook),
8990
contentDescription = null,
90-
tint = MaterialTheme.appColors.buttonText,
91+
tint = MaterialTheme.appColors.primaryButtonText,
9192
)
9293
Text(
9394
modifier = Modifier
9495
.testTag("txt_facebook_auth")
9596
.padding(start = 10.dp),
96-
color = MaterialTheme.appColors.buttonText,
97+
color = MaterialTheme.appColors.primaryButtonText,
9798
text = stringResource(id = stringRes)
9899
)
99100
}
@@ -125,7 +126,7 @@ internal fun SocialAuthView(
125126
modifier = Modifier
126127
.testTag("txt_microsoft_auth")
127128
.padding(start = 10.dp),
128-
color = MaterialTheme.appColors.buttonText,
129+
color = MaterialTheme.appColors.primaryButtonText,
129130
text = stringResource(id = stringRes)
130131
)
131132
}

auth/src/main/res/values-uk/strings.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<string name="auth_email">Електронна пошта</string>
66
<string name="auth_invalid_email">Неправильна E-mail адреса</string>
77
<string name="auth_invalid_password">Пароль занадто короткий</string>
8-
<string name="auth_welcome_back">Ласкаво просимо! Будь ласка, авторизуйтесь, щоб продовжити.</string>
98
<string name="auth_show_optional_fields">Показати додаткові поля</string>
109
<string name="auth_hide_optional_fields">Приховати додаткові поля</string>
1110
<string name="auth_create_account">Створити акаунт</string>
@@ -15,6 +14,5 @@
1514
<string name="auth_check_your_email">Перевірте свою електронну пошту</string>
1615
<string name="auth_restore_password_success">Ми надіслали інструкції щодо відновлення пароля на вашу електронну пошту %s</string>
1716
<string name="auth_enter_password">Введіть пароль</string>
18-
<string name="auth_create_new_account">Створити новий аккаунт.</string>
1917

2018
</resources>

auth/src/main/res/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<string name="auth_email_username" tools:ignore="MissingTranslation">Email or Username</string>
1212
<string name="auth_invalid_email_username" tools:ignore="MissingTranslation">Invalid email or username</string>
1313
<string name="auth_invalid_password">Password is too short</string>
14-
<string name="auth_welcome_back">Welcome back! Please authorize to continue.</string>
14+
<string name="auth_welcome_back">Welcome back! Sign in to access your courses.</string>
1515
<string name="auth_show_optional_fields">Show optional fields</string>
1616
<string name="auth_hide_optional_fields">Hide optional fields</string>
1717
<string name="auth_create_account">Create account</string>
@@ -23,7 +23,7 @@
2323
<string name="auth_example_email" translatable="false">[email protected]</string>
2424
<string name="auth_enter_email_username" tools:ignore="MissingTranslation">Enter email or username</string>
2525
<string name="auth_enter_password">Enter password</string>
26-
<string name="auth_create_new_account">Create new account.</string>
26+
<string name="auth_create_new_account">Create an account to start learning today!</string>
2727
<string name="auth_compete_registration" translatable="false">Complete your registration</string>
2828
<string name="auth_google" tools:ignore="ExtraTranslation">Sign in with Google</string>
2929
<string name="auth_facebook" tools:ignore="ExtraTranslation">Sign in with Facebook</string>

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ ext {
5656

5757
extented_spans_version = "1.3.0"
5858

59+
webkit_version = "1.11.0"
60+
5961
configHelper = new ConfigHelper(projectDir, getCurrentFlavor())
6062

6163
//testing

core/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ dependencies {
154154
//Play In-App Review
155155
api "com.google.android.play:review-ktx:$in_app_review"
156156

157+
api "androidx.webkit:webkit:$webkit_version"
158+
157159
testImplementation 'junit:junit:4.13.2'
158160
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
159161
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

0 commit comments

Comments
 (0)