diff --git a/app/release/app-release.apk b/app/release/app-release.apk index f31dcbe0..8fc54edf 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm index c2397d4f..f4eeadd0 100644 Binary files a/app/release/baselineProfiles/0/app-release.dm and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm index 8c300a7d..c084df9c 100644 Binary files a/app/release/baselineProfiles/1/app-release.dm and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/src/main/java/com/pwhs/quickmem/App.kt b/app/src/main/java/com/pwhs/quickmem/App.kt index 4bdf7deb..e3f011b0 100644 --- a/app/src/main/java/com/pwhs/quickmem/App.kt +++ b/app/src/main/java/com/pwhs/quickmem/App.kt @@ -19,7 +19,6 @@ class App : Application() { val policy = StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() - .penaltyDialog() .build() StrictMode.setThreadPolicy(policy) } diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTextField.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTextField.kt index 20a12936..5ad37624 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTextField.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTextField.kt @@ -2,7 +2,10 @@ package com.pwhs.quickmem.presentation.auth.component import androidx.annotation.DrawableRes import androidx.annotation.StringRes +import androidx.compose.foundation.Image +import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -21,8 +24,13 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.ColorFilter +import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.painterResource @@ -53,7 +61,7 @@ fun AuthTextField( onClick: (() -> Unit)? = null, @StringRes error: Int? = null, imeAction: ImeAction = ImeAction.Next, - onDone: () -> Unit = {} + onDone: () -> Unit = {}, ) { var showPassword by rememberSaveable { mutableStateOf(false) } val keyboardController = LocalSoftwareKeyboardController.current @@ -93,12 +101,25 @@ fun AuthTextField( ), leadingIcon = { iconId?.let { - Icon( - painter = painterResource(id = iconId), - contentDescription = contentDescription, - modifier = Modifier.size(24.dp), - tint = colorScheme.onSurface - ) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .size(30.dp) + .clip(shapes.extraLarge) + .shadow( + elevation = 2.dp, + shape = shapes.extraLarge + ) + .background(colorScheme.surface, shapes.extraLarge) + ) { + Image( + painter = painterResource(id = iconId), + contentDescription = contentDescription, + modifier = Modifier.size(24.dp), + colorFilter = ColorFilter.tint(colorScheme.onSurface), + contentScale = ContentScale.Crop + ) + } } }, trailingIcon = { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTopAppBar.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTopAppBar.kt index 597caad6..89c77b1a 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTopAppBar.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/component/AuthTopAppBar.kt @@ -2,11 +2,11 @@ package com.pwhs.quickmem.presentation.auth.component import androidx.compose.material.icons.Icons.AutoMirrored.Filled import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material3.CenterAlignedTopAppBar import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.IconButtonDefaults.iconButtonColors -import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults.topAppBarColors import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color @@ -19,8 +19,9 @@ import com.pwhs.quickmem.ui.theme.QuickMemTheme @Composable fun AuthTopAppBar( onClick: () -> Unit = {}, + title: @Composable () -> Unit = {}, ) { - TopAppBar( + CenterAlignedTopAppBar( colors = topAppBarColors( containerColor = Color.Transparent, ), @@ -29,7 +30,7 @@ fun AuthTopAppBar( onClick = onClick, colors = iconButtonColors( contentColor = Color.White - ) + ), ) { Icon( imageVector = Filled.ArrowBack, @@ -37,12 +38,11 @@ fun AuthTopAppBar( ) } }, - title = { - }, + title = title, ) } -@Preview(showBackground = true) +@Preview(showSystemUi = true) @Composable private fun AuthTopAppBarPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/send_email/SendVerifyEmailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/send_email/SendVerifyEmailScreen.kt index 3f07a0f6..4a96e65f 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/send_email/SendVerifyEmailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/send_email/SendVerifyEmailScreen.kt @@ -6,9 +6,7 @@ import androidx.compose.animation.core.tween import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState @@ -28,6 +26,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -115,7 +114,19 @@ private fun SendVerifyEmail( modifier = modifier.gradientBackground(), containerColor = Color.Transparent, topBar = { - AuthTopAppBar(onClick = onNavigationIconClick) + AuthTopAppBar( + onClick = onNavigationIconClick, + title = { + Text( + text = stringResource(id = R.string.txt_forgot_your_password), + fontWeight = FontWeight.Bold, + color = Color.White, + textAlign = TextAlign.Center, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + }, + ) } ) { innerPadding -> Box { @@ -125,27 +136,14 @@ private fun SendVerifyEmail( .fillMaxSize() .padding(16.dp) .verticalScroll(scrollState) - .padding(top = 40.dp) .imePadding(), verticalArrangement = Arrangement.Top, horizontalAlignment = Alignment.CenterHorizontally ) { - Spacer(modifier = Modifier.height(26.dp)) - Text( - text = stringResource(id = R.string.txt_forgot_your_password), - style = typography.headlineLarge.copy( - fontWeight = FontWeight.Bold, - fontSize = 22.sp, - color = colorScheme.primary - ), - textAlign = TextAlign.Center, - modifier = Modifier.padding(horizontal = 16.dp) - ) - AuthTextField( value = email, onValueChange = onEmailChanged, - label = stringResource(id = R.string.txt_email_address), + label = stringResource(id = R.string.txt_enter_your_email), iconId = R.drawable.ic_email, contentDescription = stringResource(id = R.string.txt_email), type = TextFieldType.EMAIL, @@ -154,6 +152,16 @@ private fun SendVerifyEmail( onDone = onResetClick ) + Text( + text = stringResource(id = R.string.txt_reset_password_description), + style = typography.bodyMedium.copy( + fontSize = 16.sp, + color = colorScheme.onSurface, + textAlign = TextAlign.Start + ), + modifier = Modifier.padding(top = 16.dp, bottom = 10.dp) + ) + AuthButton( text = stringResource(id = R.string.txt_reset_password), onClick = onResetClick, @@ -168,6 +176,7 @@ private fun SendVerifyEmail( } } +@Preview(showSystemUi = true, locale = "vi") @Preview(showSystemUi = true) @Composable fun PreviewForgotPasswordVerifyEmailScreen() { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/set_new_password/SetNewPasswordScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/set_new_password/SetNewPasswordScreen.kt index 984fe374..0be3f701 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/set_new_password/SetNewPasswordScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/forgot_password/set_new_password/SetNewPasswordScreen.kt @@ -6,15 +6,12 @@ import androidx.compose.animation.core.tween import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.MaterialTheme.colorScheme -import androidx.compose.material3.MaterialTheme.typography import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -28,9 +25,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import com.pwhs.quickmem.R import com.pwhs.quickmem.core.data.enums.TextFieldType @@ -54,7 +51,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator fun SetNewPasswordScreen( modifier: Modifier = Modifier, navigator: DestinationsNavigator, - viewModel: SetNewPasswordViewModel = hiltViewModel() + viewModel: SetNewPasswordViewModel = hiltViewModel(), ) { val uiState = viewModel.uiState.collectAsState() val context = LocalContext.current @@ -115,11 +112,11 @@ private fun SetNewPassword( onNavigationIconClick: () -> Unit = {}, password: String = "", confirmPassword: String = "", - @StringRes passwordError: Int? = null, - @StringRes confirmPasswordError: Int? = null, + @StringRes passwordError: Int? = null, + @StringRes confirmPasswordError: Int? = null, onPasswordChanged: (String) -> Unit = {}, onConfirmPasswordChanged: (String) -> Unit = {}, - onSubmitClick: () -> Unit = {} + onSubmitClick: () -> Unit = {}, ) { val imeState = rememberImeState() val scrollState = rememberScrollState() @@ -133,7 +130,19 @@ private fun SetNewPassword( modifier = modifier.gradientBackground(), containerColor = Color.Transparent, topBar = { - AuthTopAppBar(onClick = onNavigationIconClick) + AuthTopAppBar( + onClick = onNavigationIconClick, + title = { + Text( + text = stringResource(R.string.txt_enter_new_password), + fontWeight = FontWeight.Bold, + color = Color.White, + textAlign = TextAlign.Center, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + }, + ) } ) { innerPadding -> Box { @@ -143,24 +152,10 @@ private fun SetNewPassword( .fillMaxSize() .padding(16.dp) .verticalScroll(scrollState) - .padding(top = 40.dp) .imePadding(), verticalArrangement = Arrangement.Top, horizontalAlignment = Alignment.CenterHorizontally ) { - Text( - text = stringResource(R.string.txt_please_enter_your_new_password), - style = typography.headlineLarge.copy( - fontWeight = FontWeight.Bold, - fontSize = 22.sp, - color = colorScheme.primary - ), - textAlign = TextAlign.Center, - modifier = Modifier.padding(horizontal = 16.dp) - ) - - Spacer(modifier = Modifier.height(26.dp)) - AuthTextField( value = password, onValueChange = onPasswordChanged, @@ -198,6 +193,7 @@ private fun SetNewPassword( } } +@Preview(showSystemUi = true, locale = "vi") @Preview(showSystemUi = true) @Composable fun PreviewForgotPasswordVerifyPasswordScreen() { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/LoginScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/LoginScreen.kt index 83850bac..d0e1d69e 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/LoginScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/LoginScreen.kt @@ -5,7 +5,9 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme.colorScheme @@ -22,6 +24,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.withStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -37,10 +41,8 @@ import com.ramcosta.composedestinations.annotation.RootGraph import com.ramcosta.composedestinations.generated.destinations.LoginScreenDestination import com.ramcosta.composedestinations.generated.destinations.LoginWithEmailScreenDestination import com.ramcosta.composedestinations.generated.destinations.SignupScreenDestination -import com.ramcosta.composedestinations.generated.destinations.WebViewAppDestination import com.ramcosta.composedestinations.generated.destinations.WelcomeScreenDestination import com.ramcosta.composedestinations.navigation.DestinationsNavigator -import timber.log.Timber @Destination @Composable @@ -135,6 +137,15 @@ fun Login( topBar = { AuthTopAppBar( onClick = onNavigationIconClick, + title = { + Text( + text = stringResource(R.string.txt_log_in), + style = typography.titleLarge.copy( + fontWeight = FontWeight.Bold, + color = Color.White + ) + ) + } ) } ) { innerPadding -> @@ -144,26 +155,19 @@ fun Login( .padding(horizontal = 16.dp) .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.Center ) { - Text( - text = stringResource(R.string.txt_log_in), - style = typography.headlineMedium.copy( - fontWeight = FontWeight.Bold, - color = colorScheme.primary - ) - ) + Spacer(modifier = Modifier.height(30.dp)) Text( text = stringResource(R.string.txt_login_description), - style = typography.bodyMedium.copy( + style = typography.bodyLarge.copy( color = colorScheme.onSurface, - fontSize = 16.sp + textAlign = TextAlign.Center ), modifier = Modifier .padding(top = 8.dp) - .padding(bottom = 30.dp) + .padding(bottom = 30.dp), ) AuthButton( @@ -223,9 +227,11 @@ fun Login( withStyle( style = SpanStyle( color = colorScheme.primary, - fontWeight = FontWeight.Bold + fontWeight = FontWeight.Bold, + textDecoration = TextDecoration.Underline ) ) { + append(" ") append(stringResource(R.string.txt_sign_up)) } } @@ -241,6 +247,7 @@ fun Login( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable private fun LoginScreenPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/email/LoginWithEmailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/email/LoginWithEmailScreen.kt index 82024353..02210e58 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/email/LoginWithEmailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/login/email/LoginWithEmailScreen.kt @@ -3,7 +3,6 @@ package com.pwhs.quickmem.presentation.auth.login.email import android.widget.Toast import androidx.annotation.StringRes import androidx.compose.animation.core.tween -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -11,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.MaterialTheme.colorScheme @@ -26,9 +24,7 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction @@ -58,7 +54,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator fun LoginWithEmailScreen( modifier: Modifier = Modifier, navigator: DestinationsNavigator, - viewModel: LoginWithEmailViewModel = hiltViewModel() + viewModel: LoginWithEmailViewModel = hiltViewModel(), ) { val uiState by viewModel.uiState.collectAsState() val context = LocalContext.current @@ -127,7 +123,7 @@ private fun LoginWithEmail( @StringRes passwordError: Int? = null, onPasswordChanged: (String) -> Unit = {}, onLoginClick: () -> Unit = {}, - onForgotPasswordClick: () -> Unit = {} + onForgotPasswordClick: () -> Unit = {}, ) { val imeState = rememberImeState() val scrollState = rememberScrollState() @@ -150,25 +146,19 @@ private fun LoginWithEmail( .fillMaxSize() .padding(16.dp) .verticalScroll(scrollState) - .padding(top = 40.dp) .imePadding(), verticalArrangement = Arrangement.Top, horizontalAlignment = Alignment.CenterHorizontally ) { - Image( - painter = painterResource(id = R.drawable.ic_logo), - contentDescription = "Logo", - contentScale = ContentScale.Crop, - modifier = Modifier.size(60.dp) - ) Text( text = stringResource(R.string.txt_login_with_email), - style = typography.headlineLarge.copy( + style = typography.titleLarge.copy( fontWeight = FontWeight.Bold, - color = colorScheme.primary + color = Color.White, + textAlign = TextAlign.Start ), - modifier = Modifier.padding(16.dp) + modifier = Modifier.fillMaxWidth() ) AuthTextField( @@ -206,10 +196,11 @@ private fun LoginWithEmail( text = stringResource(R.string.txt_forgot_password), style = typography.bodyLarge.copy( color = colorScheme.primary, - fontWeight = FontWeight.Bold + fontWeight = FontWeight.Bold, + textAlign = TextAlign.End, + textDecoration = TextDecoration.Underline ), - textAlign = TextAlign.End, - textDecoration = TextDecoration.Underline + modifier = Modifier.fillMaxWidth() ) } } @@ -234,7 +225,8 @@ private fun LoginWithEmail( } } -@Preview +@Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable fun PreviewLoginWithEmailScreen() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/SignupScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/SignupScreen.kt index 1b354179..a0e13dd8 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/SignupScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/SignupScreen.kt @@ -7,7 +7,9 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme.colorScheme @@ -25,6 +27,7 @@ import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.withStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -48,7 +51,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator fun SignupScreen( modifier: Modifier = Modifier, navigator: DestinationsNavigator, - viewModel: SignupViewModel = hiltViewModel() + viewModel: SignupViewModel = hiltViewModel(), ) { val context = LocalContext.current LaunchedEffect(key1 = true) { @@ -56,8 +59,10 @@ fun SignupScreen( when (event) { SignupUiEvent.SignupWithGoogle -> { // open web view - Toast.makeText(context, - context.getString(R.string.txt_currently_not_available), Toast.LENGTH_SHORT).show() + Toast.makeText( + context, + context.getString(R.string.txt_currently_not_available), Toast.LENGTH_SHORT + ).show() // navigator.navigate( // WebViewAppDestination( // oAuthLink = "https://api.quickmem.app/auth/google", @@ -67,7 +72,11 @@ fun SignupScreen( SignupUiEvent.SignupWithFacebook -> { // open web view - Toast.makeText(context, context.getString(R.string.txt_currently_not_available), Toast.LENGTH_SHORT).show() + Toast.makeText( + context, + context.getString(R.string.txt_currently_not_available), + Toast.LENGTH_SHORT + ).show() // navigator.navigate( // WebViewAppDestination( // oAuthLink = "https://api.quickmem.app/auth/facebook", @@ -121,7 +130,7 @@ fun Signup( onSignupWithEmail: () -> Unit = {}, onSignupWithGoogle: () -> Unit = {}, onSignupWithFacebook: () -> Unit = {}, - onPrivacyPolicyClick: () -> Unit = {} + onPrivacyPolicyClick: () -> Unit = {}, ) { Scaffold( modifier = modifier.gradientBackground(), @@ -129,6 +138,15 @@ fun Signup( topBar = { AuthTopAppBar( onClick = onNavigationIconClick, + title = { + Text( + text = stringResource(R.string.txt_sign_up), + style = typography.titleLarge.copy( + fontWeight = FontWeight.Bold, + color = Color.White + ) + ) + } ) } ) { innerPadding -> @@ -138,20 +156,12 @@ fun Signup( .padding(horizontal = 16.dp) .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.Center ) { - - Text( - text = stringResource(R.string.txt_sign_up), - style = typography.headlineMedium.copy( - fontWeight = FontWeight.Bold, - color = colorScheme.primary - ) - ) - + Spacer(modifier = Modifier.height(30.dp)) + Text( text = stringResource(R.string.txt_signup_description), - style = typography.bodyMedium.copy( + style = typography.bodyLarge.copy( color = colorScheme.onSurface ), modifier = Modifier @@ -216,7 +226,8 @@ fun Signup( withStyle( style = SpanStyle( color = colorScheme.primary, - fontWeight = FontWeight.Bold + fontWeight = FontWeight.Bold, + textDecoration = TextDecoration.Underline ) ) { append(stringResource(R.string.txt_terms_and_conditions)) @@ -225,7 +236,8 @@ fun Signup( withStyle( style = SpanStyle( color = colorScheme.primary, - fontWeight = FontWeight.Bold + fontWeight = FontWeight.Bold, + textDecoration = TextDecoration.Underline ) ) { append(stringResource(R.string.txt_privacy_policy)) @@ -253,7 +265,8 @@ fun Signup( withStyle( style = SpanStyle( color = colorScheme.primary, - fontWeight = FontWeight.Bold + fontWeight = FontWeight.Bold, + textDecoration = TextDecoration.Underline ) ) { append(" " + stringResource(R.string.txt_log_in)) @@ -271,6 +284,7 @@ fun Signup( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable private fun SignupScreenPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/email/SignupWithEmailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/email/SignupWithEmailScreen.kt index 3966c44d..e401ac51 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/email/SignupWithEmailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/signup/email/SignupWithEmailScreen.kt @@ -3,18 +3,15 @@ package com.pwhs.quickmem.presentation.auth.signup.email import android.widget.Toast import androidx.annotation.StringRes import androidx.compose.animation.core.tween -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.MaterialTheme.colorScheme +import androidx.compose.material3.MaterialTheme.typography import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -27,12 +24,11 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -61,7 +57,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator fun SignupWithEmailScreen( modifier: Modifier = Modifier, navigator: DestinationsNavigator, - viewModel: SignupWithEmailViewModel = hiltViewModel() + viewModel: SignupWithEmailViewModel = hiltViewModel(), ) { val uiState = viewModel.uiState.collectAsState() val context = LocalContext.current @@ -135,7 +131,7 @@ private fun SignupWithEmail( @StringRes birthdayError: Int? = null, onBirthdayChanged: (String) -> Unit = {}, onRoleChanged: (UserRole) -> Unit = {}, - onSignUpClick: () -> Unit = {} + onSignUpClick: () -> Unit = {}, ) { var isDatePickerVisible by rememberSaveable { mutableStateOf(false) } var isRoleVisible by rememberSaveable { mutableStateOf(false) } @@ -164,27 +160,19 @@ private fun SignupWithEmail( .padding(innerPadding) .padding(16.dp) .verticalScroll(scrollState) - .padding(top = 40.dp, bottom = 16.dp) + .padding(bottom = 16.dp) .imePadding(), verticalArrangement = Arrangement.Top, horizontalAlignment = Alignment.CenterHorizontally ) { - Image( - painter = painterResource(id = R.drawable.ic_logo), - contentDescription = "Logo", - contentScale = ContentScale.Crop, - modifier = Modifier - .size(60.dp) - ) - - Text( text = stringResource(R.string.txt_signup_with_email), - style = MaterialTheme.typography.headlineLarge.copy( + style = typography.titleLarge.copy( fontWeight = FontWeight.Bold, - color = colorScheme.primary + color = Color.White, + textAlign = TextAlign.Start ), - modifier = Modifier.padding(16.dp) + modifier = Modifier.fillMaxWidth() ) AuthTextField( value = birthday, @@ -212,7 +200,7 @@ private fun SignupWithEmail( onValueChange = onPasswordChanged, label = stringResource(R.string.txt_create_your_password), iconId = R.drawable.ic_lock, - contentDescription = stringResource(R.string.txt_password), + contentDescription = stringResource(R.string.txt_create_your_password), type = TextFieldType.PASSWORD, error = passwordError, imeAction = ImeAction.Done, @@ -258,6 +246,7 @@ private fun SignupWithEmail( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable fun PreviewSignupWithEmailScreen() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/social/AuthSocialScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/social/AuthSocialScreen.kt index 36064c91..d40fee67 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/social/AuthSocialScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/social/AuthSocialScreen.kt @@ -2,12 +2,13 @@ package com.pwhs.quickmem.presentation.auth.social import android.widget.Toast import androidx.annotation.StringRes -import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.material3.Scaffold @@ -19,14 +20,13 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.SpanStyle -import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.withStyle +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -136,6 +136,7 @@ fun AuthSocial( ) { var isDatePickerVisible by rememberSaveable { mutableStateOf(false) } var isRoleVisible by rememberSaveable { mutableStateOf(false) } + val scrollState = rememberScrollState() Scaffold( modifier = modifier.gradientBackground(), containerColor = Color.Transparent, @@ -148,26 +149,33 @@ fun AuthSocial( Column( modifier = Modifier .padding(innerPadding) - .fillMaxSize() .padding(16.dp) - .padding(top = 40.dp), + .verticalScroll(scrollState) + .padding(bottom = 16.dp) + .imePadding(), verticalArrangement = Arrangement.Top, + horizontalAlignment = Alignment.CenterHorizontally ) { Text( text = stringResource(R.string.txt_almost_done), - style = MaterialTheme.typography.headlineLarge.copy( + style = MaterialTheme.typography.titleLarge.copy( fontWeight = FontWeight.Bold, - color = colorScheme.primary - ) + color = Color.White, + textAlign = TextAlign.Start + ), + modifier = Modifier.fillMaxWidth() ) Text( text = stringResource(R.string.txt_enter_your_birthday_this_won_t_be_visible_to_others), - style = MaterialTheme.typography.headlineSmall.copy( + style = MaterialTheme.typography.bodyMedium.copy( fontSize = 16.sp, - color = colorScheme.primary + color = colorScheme.onSurface, + textAlign = TextAlign.Start ), - modifier = Modifier.padding(top = 16.dp, bottom = 22.dp) + modifier = Modifier + .fillMaxWidth() + .padding(top = 16.dp, bottom = 16.dp) ) AuthTextField( @@ -175,7 +183,7 @@ fun AuthSocial( onValueChange = onBirthdayChanged, label = stringResource(R.string.txt_select_your_birthday), iconId = R.drawable.ic_calendar, - contentDescription = "Birthday", + contentDescription = stringResource(R.string.txt_select_your_birthday), readOnly = true, enabled = false, onClick = { isDatePickerVisible = true }, @@ -189,41 +197,6 @@ fun AuthSocial( onRoleChanged = onRoleChanged ) } - - Text( - buildAnnotatedString { - withStyle( - style = SpanStyle( - color = colorScheme.onSurface, - fontSize = 16.sp, - ) - ) { - append(stringResource(R.string.txt_by_signing_up_you_agree_to_the)) - withStyle( - style = SpanStyle( - color = colorScheme.primary, - fontWeight = FontWeight.Bold - ) - ) { - append(stringResource(R.string.txt_terms_and_conditions)) - } - append(stringResource(R.string.txt_and_the)) - withStyle( - style = SpanStyle( - color = colorScheme.primary, - fontWeight = FontWeight.Bold - ) - ) { - append(stringResource(R.string.txt_privacy_policy)) - } - append(stringResource(R.string.txt_of_quickmem)) - } - }, - modifier = Modifier - .padding(top = 16.dp) - .clickable { }, - ) - if (isDatePickerVisible) { DatePickerModalInput( onDateSelected = { @@ -250,6 +223,7 @@ fun AuthSocial( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable fun PreviewSignupWithGoogleScreen() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/update_fullname/UpdateFullNameScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/update_fullname/UpdateFullNameScreen.kt index 891f6487..3d17c5b1 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/update_fullname/UpdateFullNameScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/update_fullname/UpdateFullNameScreen.kt @@ -18,7 +18,6 @@ import androidx.compose.material3.CenterAlignedTopAppBar import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton -import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.material3.MaterialTheme.typography import androidx.compose.material3.Scaffold import androidx.compose.material3.Text @@ -35,7 +34,6 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.tooling.preview.PreviewLightDark import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel @@ -57,7 +55,7 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator fun UpdateFullNameScreen( modifier: Modifier = Modifier, viewModel: UpdateFullNameViewModel = hiltViewModel(), - navigator: DestinationsNavigator + navigator: DestinationsNavigator, ) { val uiState by viewModel.uiState.collectAsState() val context = LocalContext.current @@ -114,7 +112,7 @@ fun UpdateFullName( onSubmitClick: () -> Unit = {}, onSkipClick: () -> Unit = {}, isLoading: Boolean = false, - @StringRes errorMessage: Int? = null + @StringRes errorMessage: Int? = null, ) { val imeState = rememberImeState() val scrollState = rememberScrollState() @@ -136,7 +134,7 @@ fun UpdateFullName( text = stringResource(R.string.txt_what_should_we_call_you), style = typography.titleMedium.copy( fontSize = 18.sp, - color = colorScheme.primary + color = Color.White ) ) }, @@ -147,7 +145,7 @@ fun UpdateFullName( IconButton(onClick = onSkipClick) { Icon( Icons.Filled.Close, - tint = colorScheme.primary, + tint = Color.White, contentDescription = stringResource(R.string.txt_close), ) } @@ -198,6 +196,7 @@ fun UpdateFullName( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable fun PreviewSetName() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/verify_email/VerifyEmailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/verify_email/VerifyEmailScreen.kt index c655d58d..f3ad3d9d 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/verify_email/VerifyEmailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/verify_email/VerifyEmailScreen.kt @@ -54,7 +54,6 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.withStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import com.pwhs.quickmem.R import com.pwhs.quickmem.presentation.auth.component.AuthButton @@ -212,7 +211,8 @@ private fun VerifyEmail( ) { Icon( imageVector = AutoMirrored.Filled.ArrowBack, - contentDescription = stringResource(R.string.txt_back) + contentDescription = stringResource(R.string.txt_back), + tint = Color.White ) } } @@ -240,8 +240,7 @@ private fun VerifyEmail( text = stringResource(R.string.txt_check_your_email), style = typography.titleLarge.copy( fontWeight = FontWeight.Bold, - fontSize = 24.sp, - color = colorScheme.primary + color = Color.White ), modifier = Modifier.padding(bottom = 10.dp) ) @@ -252,8 +251,8 @@ private fun VerifyEmail( append(" $email") } }, - style = typography.bodyMedium.copy( - fontSize = 16.sp, + style = typography.bodyLarge.copy( + color = colorScheme.onSurface, ), textAlign = TextAlign.Center, modifier = Modifier.padding(bottom = 10.dp) @@ -266,7 +265,7 @@ private fun VerifyEmail( OtpInputField( modifier = Modifier .focusRequester(focusRequester) - .padding(bottom = 20.dp), + .padding(bottom = 10.dp), otpText = otp, shouldCursorBlink = false, onOtpModified = { value, otpFilled -> @@ -285,6 +284,7 @@ private fun VerifyEmail( ) { Text( text = stringResource(R.string.txt_didn_t_receive_the_code), + style = typography.bodyMedium ) TextButton( onClick = onNavigationBack, @@ -294,8 +294,7 @@ private fun VerifyEmail( Text( text = stringResource(R.string.txt_update_email), style = typography.bodyMedium.copy( - color = colorScheme.primary, - fontSize = 16.sp, + color = Color.White, fontWeight = FontWeight.Bold ), textDecoration = TextDecoration.Underline @@ -307,7 +306,7 @@ private fun VerifyEmail( text = stringResource(R.string.txt_verify), onClick = onVerifyClick, modifier = Modifier - .padding(top = 20.dp, bottom = 15.dp) + .padding(vertical = 15.dp) .padding(horizontal = 32.dp) ) @@ -337,9 +336,8 @@ private fun VerifyEmail( ) { Text( text = stringResource(R.string.txt_resend), - style = typography.bodyMedium.copy( + style = typography.bodyLarge.copy( color = colorScheme.onSurface, - fontSize = 16.sp, fontWeight = FontWeight.Bold ) ) @@ -358,6 +356,7 @@ private fun VerifyEmail( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable fun VerifyEmailScreenPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/auth/welcome/WelcomeScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/auth/welcome/WelcomeScreen.kt index 4d6f2439..82e96e3a 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/auth/welcome/WelcomeScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/auth/welcome/WelcomeScreen.kt @@ -12,10 +12,12 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Check import androidx.compose.material.icons.filled.KeyboardArrowDown -import androidx.compose.material3.ButtonDefaults.buttonColors -import androidx.compose.material3.ElevatedButton +import androidx.compose.material.icons.filled.KeyboardArrowUp +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.material3.MaterialTheme.typography import androidx.compose.material3.ModalBottomSheet @@ -135,19 +137,27 @@ private fun WelCome( containerColor = Color.Transparent ), actions = { - ElevatedButton( + Card( onClick = { scope.launch { showBottomSheetLanguage = true sheetLanguageState.show() } }, - colors = buttonColors( - containerColor = colorScheme.primary.copy(alpha = 0.2f), - ) + colors = CardDefaults.cardColors( + containerColor = colorScheme.primary.copy(alpha = 0.8f), + contentColor = Color.White + ), + elevation = CardDefaults.elevatedCardElevation( + defaultElevation = 2.dp + ), + shape = MaterialTheme.shapes.large, ) { Row( verticalAlignment = Alignment.CenterVertically, + modifier = Modifier + .padding(horizontal = 10.dp) + .padding(vertical = 5.dp) ) { Text( when (language) { @@ -161,8 +171,13 @@ private fun WelCome( ) ) Icon( - imageVector = Icons.Default.KeyboardArrowDown, - contentDescription = "Arrow Down" + imageVector = if (showBottomSheetLanguage) { + Icons.Default.KeyboardArrowUp + } else { + Icons.Default.KeyboardArrowDown + }, + contentDescription = "Arrow Down", + tint = Color.White ) } } @@ -198,7 +213,7 @@ private fun WelCome( withStyle( style = SpanStyle( color = color, - fontSize = 30.sp, + fontSize = 26.sp, fontWeight = FontWeight.Black ) ) { @@ -345,6 +360,7 @@ private fun WelCome( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable private fun WelcomeScreenPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/onboarding/OnboardingScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/onboarding/OnboardingScreen.kt index a6703110..45a054b9 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/onboarding/OnboardingScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/onboarding/OnboardingScreen.kt @@ -162,6 +162,7 @@ private fun Onboarding( } @Preview(showSystemUi = true) +@Preview(showSystemUi = true, locale = "vi") @Composable private fun OnboardingScreenPreview() { QuickMemTheme { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/splash/SplashScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/splash/SplashScreen.kt index 678a6791..0a1ae195 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/splash/SplashScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/splash/SplashScreen.kt @@ -96,7 +96,10 @@ fun SplashScreen( is SplashUiEvent.NoInternet -> { // Show no internet dialog - Toast.makeText(context, "No internet", Toast.LENGTH_SHORT).show() + Toast.makeText( + context, + context.getString(R.string.txt_no_internet), Toast.LENGTH_SHORT + ).show() } } } @@ -138,7 +141,7 @@ fun AnimatedText(modifier: Modifier = Modifier) { ) { Image( painter = painterResource(id = R.drawable.ic_bear), - contentDescription = "Quick Mem Logo", + contentDescription = stringResource(id = R.string.app_name), modifier = modifier .size(48.dp) .padding(end = 8.dp) diff --git a/app/src/main/java/com/pwhs/quickmem/util/ModifierExtensions.kt b/app/src/main/java/com/pwhs/quickmem/util/ModifierExtensions.kt index 86338d2c..fe408124 100644 --- a/app/src/main/java/com/pwhs/quickmem/util/ModifierExtensions.kt +++ b/app/src/main/java/com/pwhs/quickmem/util/ModifierExtensions.kt @@ -1,26 +1,20 @@ package com.pwhs.quickmem.util -import android.graphics.Paint import androidx.compose.foundation.background -import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.TileMode -import androidx.compose.ui.graphics.drawscope.drawIntoCanvas -import androidx.compose.ui.graphics.nativeCanvas -import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.zIndex import com.pwhs.quickmem.ui.theme.primaryLight fun Modifier.gradientBackground(): Modifier { return this.background( brush = Brush.verticalGradient( colors = listOf( - Color(0xFF87A6F3), - Color(0x87A6F3FF), - Color(0xFFFFFFFF) + Color(0xFF92DFF3), + Color(0xFFB7E9F7), + Color(0xFFDBF3FA), + Color(0xFFF5FCFF), ), tileMode = TileMode.Mirror ) @@ -37,32 +31,4 @@ fun Modifier.splashBackground(): Modifier { tileMode = TileMode.Mirror ) ) -} - -fun Modifier.loadingOverlay(isLoading: Boolean): Modifier = this.then( - if (isLoading) { - Modifier - .fillMaxSize() - .background(Color.Black.copy(alpha = 0.5f)) - .zIndex(1f) - .drawWithContent { - this@drawWithContent.drawContent() - drawRect(Color.Black.copy(alpha = 0.5f)) - drawIntoCanvas { canvas -> - val centerX = size.width / 2 - val centerY = size.height / 2 - // Vẽ CircularProgressIndicator ở giữa - val radius = 50f - val paint = Paint().apply { - isAntiAlias = true - style = Paint.Style.STROKE - strokeWidth = 10f - color = Color.White.toArgb() - } - canvas.nativeCanvas.drawCircle(centerX, centerY, radius, paint) - } - } - } else { - Modifier - } -) \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_calendar.xml b/app/src/main/res/drawable/ic_calendar.xml index 0419f061..ee52fbf5 100644 --- a/app/src/main/res/drawable/ic_calendar.xml +++ b/app/src/main/res/drawable/ic_calendar.xml @@ -1,9 +1,9 @@ - + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index a52e7ec5..c84d455d 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -15,7 +15,7 @@ Xác minh email thất bại Đặt lại mật khẩu thất bại Đặt lại mật khẩu thành công - Vui lòng nhập mật khẩu mới của bạn + Nhập mật khẩu mới Mật khẩu mới Xác nhận mật khẩu Đăng nhập bằng email @@ -36,8 +36,8 @@ Bạn là giáo viên hay học sinh? Đăng ký thất bại Đăng ký bằng email - Chọn ngày sinh của bạn - example@email.com + Chọn ngày sinh nhé + vidu@email.com Tạo mật khẩu của bạn Đang đăng ký… Đăng nhập @@ -49,12 +49,12 @@ " Chính sách Bảo mật" " của QuickMem" Đã có tài khoản? - Gần xong! + Gần xong rồi! Nhập ngày sinh của bạn. Thông tin này sẽ không hiển thị với người khác. Đang cập nhật… Họ và Tên Đóng - Chúng tôi nên gọi bạn là gì? + Tên của bạn là gì nhỉ? Gửi Gửi lại email thất bại Vui lòng kiểm tra lại email của bạn @@ -64,7 +64,7 @@ Kiểm tra email của bạn Vui lòng nhập mã chúng tôi đã gửi tới email của bạn Chưa nhận được mã? - Cập nhật email + Sửa lại email Gửi lại Đang xác minh… Thẻ ghi nhớ @@ -253,7 +253,7 @@ Đã cập nhật vai trò thành công! Giáo viên Xin chào! Hãy bắt đầu nào. - Chào mừng trở lại! Đăng nhập vào tài khoản của bạn + Rất vui được gặp lại bạn! Hãy đăng nhập để tiếp tục nào Được tạo bởi AI Đúng Top Streaks @@ -660,4 +660,7 @@ Chuyển đổi hiển thị mật khẩu Mật khẩu mới phải khác mật khẩu hiện tại Vui lòng điền vào tất cả các trường + Ôi không! Bạn đang ngoại tuyến + Nhập địa chỉ email của bạn + Nhập email của bạn để nhận OTP đặt lại mật khẩu. \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2b88a2b4..c2367a06 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -11,11 +11,11 @@ QuickMem uses spaced repetition to help you remember what you learn. Reset Password Email Address - Forgot Your Password? + Forgot your password? Email verification failed Password reset failed Password reset successful - Please enter your new password + Enter new password New Password Confirm Password Log in with email @@ -23,7 +23,7 @@ Continue with Google Continue with Facebook Don\'t have an account? - " Sign up" + "Sign up" Login failure Login success Login with email @@ -74,7 +74,7 @@ Bear English (US) Get started for free - Tiếng việt + Tiếng Việt Change Language Back Settings @@ -255,7 +255,7 @@ Not Eligible You must be at least 20 years old to change role. Please come back on %1$s. Hello there! Let\'s get started. - Welcome back! Log in to your account + Great to see you again! Log in to continue AI Generated Yes Top Streak @@ -663,4 +663,7 @@ Toggle password visibility New password must be different from the current password Please fill in all fields + Oops! You\'re offline + Enter your email + We\'ll send you an email with an OTP to reset your password. \ No newline at end of file