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: Mail validation screen #254

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
980ed6a
feat: First try at OtpTextField
LunarX Dec 5, 2024
e5c16b6
feat: Basic structure of the user email validation screen
LunarX Dec 6, 2024
568f676
feat: Import strings
LunarX Dec 6, 2024
ebf0b13
feat: Control spacing between each character
LunarX Dec 10, 2024
b6c3053
refactor: Make it so otp text field always has a "focused" visual cue…
LunarX Dec 10, 2024
c2f0e7a
feat: Add isEnabled to OtpTextField
LunarX Dec 10, 2024
db1c674
feat: Make otp load when a code is entered
LunarX Dec 10, 2024
2225e9c
fix: Correctly filter out forbidden characters
LunarX Dec 10, 2024
95fa100
fix: System contextual menu not displaying at the correct coordinates
LunarX Dec 10, 2024
b2b0b5c
feat: Adapt layout for large screens
LunarX Dec 10, 2024
cbd70db
feat: Make email validation screen scrollable
LunarX Dec 11, 2024
d349dd4
refactor: Regroup layout style choice with its enum
LunarX Dec 11, 2024
682200b
refactor: Extract OtpTextField to its own file
LunarX Dec 11, 2024
04a427f
refactor: Clean the OtpTextField file and add missing doc/preview
LunarX Dec 11, 2024
15b7fa5
feat: Add actions when the topappbar buttons are clicked
LunarX Dec 11, 2024
033861c
refactor: Reorder enum at the end of the file
LunarX Dec 11, 2024
afcce96
refactor: Remove hardcoded values
LunarX Dec 11, 2024
8f531ab
refactor: Move validate user email files to their own package
LunarX Dec 11, 2024
2670b36
feat: Validate email otp code using the correct api route
LunarX Dec 11, 2024
9513e6b
Merge remote-tracking branch 'origin/main' into t3
LunarX Dec 12, 2024
76051d8
fix: Adapt to the new button argument signature
LunarX Dec 12, 2024
8cf9cfa
feat: Add resend email code button timer
LunarX Dec 12, 2024
09b8865
feat: Disable buttons while the code is being verified
LunarX Dec 12, 2024
642f23d
feat: Remove "select all" from the current text toolbar
LunarX Dec 16, 2024
d1ae597
feat: Show snackbar when unknown validation api error occurs
LunarX Dec 16, 2024
0bcbc2d
refactor: Keep logic contained inside the inner ValidateUserEmailScreen
LunarX Dec 16, 2024
b9cff14
Merge remote-tracking branch 'origin/main' into t2
LunarX Dec 16, 2024
838ec11
feat: Take user email as nav arg
LunarX Dec 16, 2024
c6954b0
refactor: Use a data class to pass named parameters to method's lambd…
LunarX Dec 16, 2024
d153401
feat: Extract CodeVerification to its own file
LunarX Dec 16, 2024
c09d04c
refactor: Extract ResendCodeCountDownButton to its own file
LunarX Dec 16, 2024
3c90939
Merge remote-tracking branch 'origin/main' into mail-validation-ui
LunarX Dec 16, 2024
e731a5a
feat: Automatically open email validation screen when catching the as…
LunarX Dec 16, 2024
c627352
feat: Open mail apps when clicking on the associated button
LunarX Dec 17, 2024
0a5806a
refactor: Use a UiState to define the ValidateUserEmailScreen state
LunarX Dec 17, 2024
69f9fdd
refactor: Shorten long lines
LunarX Dec 17, 2024
07fef3a
Merge remote-tracking branch 'origin/main' into mail-validation-ui
LunarX Dec 17, 2024
ec33f4e
feat: Add resend email code api call to the button
LunarX Dec 17, 2024
4a13692
Merge remote-tracking branch 'origin/main' into mail-validation-ui
LunarX Dec 18, 2024
e776e53
feat: Update verifyEmailCode call to new kmp version
LunarX Dec 18, 2024
3084096
Merge remote-tracking branch 'origin/main' into mail-validation-ui
LunarX Dec 18, 2024
6c98f9b
Merge remote-tracking branch 'origin/main' into mail-validation-ui
LunarX Dec 20, 2024
6ecf5a5
feat: Validate the user email, store its token and reuse it in every …
LunarX Dec 18, 2024
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
Prev Previous commit
Next Next commit
feat: Add actions when the topappbar buttons are clicked
  • Loading branch information
LunarX committed Dec 12, 2024
commit 15b7fa59600c5b620cc1314aef2e7fa18b43031d
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun NewTransferNavHost(navController: NavHostController, closeActivity: () -> Un
)
}
composable<ValidateUserEmailDestination> {
ValidateUserEmailScreen()
ValidateUserEmailScreen(closeActivity = closeActivity, navigateBack = { navController.popBackStack() })
}
composable<UploadProgressDestination> {
val args = it.toRoute<UploadProgressDestination>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ private const val OPT_LENGTH = 6
private val MAX_LAYOUT_WIDTH = 400.dp

@Composable
fun ValidateUserEmailScreen() {
fun ValidateUserEmailScreen(closeActivity: () -> Unit, navigateBack: () -> Unit) {
BottomStickyButtonScaffold(
topBar = {
SwissTransferTopAppBar(
titleRes = R.string.transferTypeScreenTitle,
navigationMenu = TopAppBarButton.backButton {},
TopAppBarButton.closeButton {}
navigationMenu = TopAppBarButton.backButton(navigateBack),
TopAppBarButton.closeButton(closeActivity)
)
},
topButton = { LargeButton(modifier = it, titleRes = R.string.buttonOpenMailApp, onClick = { }) },
Expand Down Expand Up @@ -193,7 +193,7 @@ private fun ColumnScope.CodeVerification() {
private fun Preview() {
SwissTransferTheme {
Surface {
ValidateUserEmailScreen()
ValidateUserEmailScreen({}) { }
}
}
}