-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PM-10242 PM-10243 PM-10244 PM-10245 PM-10246: Welcome carousel (#3657)
- Loading branch information
1 parent
e598fe5
commit f17289a
Showing
19 changed files
with
1,026 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/welcome/WelcomeNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.x8bit.bitwarden.ui.auth.feature.welcome | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.NavOptions | ||
import com.x8bit.bitwarden.ui.platform.base.util.composableWithStayTransitions | ||
|
||
private const val WELCOME_ROUTE: String = "welcome" | ||
|
||
/** | ||
* Navigate to the welcome screen. | ||
*/ | ||
fun NavController.navigateToWelcome(navOptions: NavOptions? = null) { | ||
this.navigate(WELCOME_ROUTE, navOptions) | ||
} | ||
|
||
/** | ||
* Add the Welcome screen to the nav graph. | ||
*/ | ||
fun NavGraphBuilder.welcomeDestination( | ||
onNavigateToCreateAccount: () -> Unit, | ||
onNavigateToLogin: () -> Unit, | ||
) { | ||
composableWithStayTransitions( | ||
route = WELCOME_ROUTE, | ||
) { | ||
WelcomeScreen( | ||
onNavigateToCreateAccount = onNavigateToCreateAccount, | ||
onNavigateToLogin = onNavigateToLogin, | ||
) | ||
} | ||
} |
Oops, something went wrong.