Промежуточный результат для 1.0.4 версии

This commit is contained in:
2026-02-22 08:54:46 +05:00
parent 3aa18fa9ac
commit 5b9b3f83f7
37 changed files with 5643 additions and 928 deletions

View File

@@ -25,6 +25,7 @@ fun AuthFlow(
hasExistingAccount: Boolean,
accounts: List<AccountInfo> = emptyList(),
accountManager: AccountManager,
startInCreateMode: Boolean = false,
onAuthComplete: (DecryptedAccount?) -> Unit,
onLogout: () -> Unit = {}
) {
@@ -42,6 +43,7 @@ fun AuthFlow(
var currentScreen by remember {
mutableStateOf(
when {
startInCreateMode -> AuthScreen.WELCOME
hasExistingAccount -> AuthScreen.UNLOCK
else -> AuthScreen.WELCOME
}
@@ -56,6 +58,13 @@ fun AuthFlow(
}
var showCreateModal by remember { mutableStateOf(false) }
var isImportMode by remember { mutableStateOf(false) }
// If parent requests create mode while AuthFlow is alive, jump to Welcome/Create path.
LaunchedEffect(startInCreateMode) {
if (startInCreateMode && currentScreen == AuthScreen.UNLOCK) {
currentScreen = AuthScreen.WELCOME
}
}
// Handle system back button
BackHandler(enabled = currentScreen != AuthScreen.UNLOCK && !(currentScreen == AuthScreen.WELCOME && !hasExistingAccount)) {