@@ -46,6 +46,7 @@ import androidx.compose.ui.graphics.Color
4646import androidx.compose.ui.res.painterResource
4747import androidx.compose.ui.res.stringResource
4848import androidx.compose.ui.text.font.FontWeight
49+ import androidx.compose.ui.text.input.PasswordVisualTransformation
4950import androidx.compose.ui.text.style.TextAlign
5051import androidx.compose.ui.tooling.preview.Preview
5152import androidx.compose.ui.unit.dp
@@ -109,7 +110,13 @@ fun OnboardingContent(
109110 OnboardingStep .WELCOME -> WelcomePage ()
110111 OnboardingStep .CHOICE -> ChoicePage (state, onChoose, onLibera)
111112 OnboardingStep .SERVER -> ServerPage (state, onServerChange, onAuthChange, authOnly = false )
112- OnboardingStep .AUTH -> ServerPage (state, onServerChange, onAuthChange, authOnly = true )
113+ OnboardingStep .AUTH ->
114+ // soju always uses SASL PLAIN: show only user/password, no mechanism picker.
115+ if (state.isSoju) {
116+ SojuAuthPage (state, onAuthChange)
117+ } else {
118+ ServerPage (state, onServerChange, onAuthChange, authOnly = true )
119+ }
113120 OnboardingStep .CONNECT -> ConnectPage (state, onRetry, onToggleBouncer, onAddBouncer)
114121 OnboardingStep .FINISH -> FinishPage ()
115122 }
@@ -277,6 +284,42 @@ private fun ServerPage(
277284 }
278285}
279286
287+ /* *
288+ * Simplified AUTH page for the soju bouncer path: only username + password, always SASL PLAIN.
289+ * No mechanism picker (NONE/EXTERNAL are meaningless for soju login).
290+ */
291+ @Composable
292+ private fun SojuAuthPage (
293+ state : OnboardingState ,
294+ onAuthChange : (AuthForm ) -> Unit ,
295+ ) {
296+ Column (
297+ modifier = Modifier .fillMaxSize().verticalScroll(rememberScrollState()).padding(24 .dp),
298+ verticalArrangement = Arrangement .spacedBy(12 .dp),
299+ ) {
300+ Text (
301+ stringResource(R .string.onboarding_auth_title),
302+ style = MaterialTheme .typography.titleLarge,
303+ fontWeight = FontWeight .Bold ,
304+ )
305+ OutlinedTextField (
306+ value = state.auth.saslUser,
307+ onValueChange = { onAuthChange(state.auth.copy(saslUser = it)) },
308+ label = { Text (stringResource(R .string.onboarding_auth_soju_username)) },
309+ singleLine = true ,
310+ modifier = Modifier .fillMaxWidth(),
311+ )
312+ OutlinedTextField (
313+ value = state.auth.saslPassword,
314+ onValueChange = { onAuthChange(state.auth.copy(saslPassword = it)) },
315+ label = { Text (stringResource(R .string.onboarding_auth_soju_password)) },
316+ singleLine = true ,
317+ visualTransformation = PasswordVisualTransformation (),
318+ modifier = Modifier .fillMaxWidth(),
319+ )
320+ }
321+ }
322+
280323@Composable
281324private fun ConnectPage (
282325 state : OnboardingState ,
0 commit comments