BIT-722: Adding generator navigation to the nav bar (#83)

This commit is contained in:
joshua-livefront 2023-10-03 15:55:27 -04:00 committed by Álison Fernandes
parent 4f20dc611c
commit 84856a5c29
2 changed files with 4 additions and 2 deletions

View file

@ -28,6 +28,7 @@ import androidx.navigation.navOptions
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.components.PlaceholderComposable import com.x8bit.bitwarden.ui.platform.components.PlaceholderComposable
import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorScreen
import com.x8bit.bitwarden.ui.vault.feature.vault.VAULT_ROUTE import com.x8bit.bitwarden.ui.vault.feature.vault.VAULT_ROUTE
import com.x8bit.bitwarden.ui.vault.feature.vault.navigateToVault import com.x8bit.bitwarden.ui.vault.feature.vault.navigateToVault
import com.x8bit.bitwarden.ui.vault.feature.vault.vaultDestination import com.x8bit.bitwarden.ui.vault.feature.vault.vaultDestination
@ -283,7 +284,7 @@ private const val GENERATOR_ROUTE = "generator"
*/ */
private fun NavGraphBuilder.generatorDestination() { private fun NavGraphBuilder.generatorDestination() {
composable(GENERATOR_ROUTE) { composable(GENERATOR_ROUTE) {
PlaceholderComposable(text = "Generator") GeneratorScreen()
} }
} }

View file

@ -237,7 +237,8 @@ class GeneratorViewModel @Inject constructor(
val INITIAL_STATE: GeneratorState = GeneratorState( val INITIAL_STATE: GeneratorState = GeneratorState(
generatedText = PLACEHOLDER_GENERATED_TEXT, generatedText = PLACEHOLDER_GENERATED_TEXT,
selectedType = Passcode( selectedType = Passcode(
selectedType = Password(), // TODO (BIT-634): Update the initial state to Password
selectedType = Passphrase(),
), ),
) )
} }