release v2026.05.13.3: full-player seed + MediaSession expansion (Wear) #46

Merged
bvandeusen merged 262 commits from dev into main 2026-05-14 14:19:40 -04:00
Showing only changes of commit df026d8e74 - Show all commits
@@ -46,6 +46,22 @@ fun LoginScreen(
} }
Box(modifier = Modifier.fillMaxSize()) { Box(modifier = Modifier.fillMaxSize()) {
LoginForm(
state = state,
onUsernameChange = viewModel::setUsername,
onPasswordChange = viewModel::setPassword,
onSubmit = viewModel::submit,
)
}
}
@Composable
private fun LoginForm(
state: LoginFormState,
onUsernameChange: (String) -> Unit,
onPasswordChange: (String) -> Unit,
onSubmit: () -> Unit,
) {
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
@@ -60,7 +76,7 @@ fun LoginScreen(
) )
OutlinedTextField( OutlinedTextField(
value = state.username, value = state.username,
onValueChange = viewModel::setUsername, onValueChange = onUsernameChange,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
label = { Text("Username") }, label = { Text("Username") },
singleLine = true, singleLine = true,
@@ -72,7 +88,7 @@ fun LoginScreen(
) )
OutlinedTextField( OutlinedTextField(
value = state.password, value = state.password,
onValueChange = viewModel::setPassword, onValueChange = onPasswordChange,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
label = { Text("Password") }, label = { Text("Password") },
singleLine = true, singleLine = true,
@@ -82,17 +98,23 @@ fun LoginScreen(
keyboardType = KeyboardType.Password, keyboardType = KeyboardType.Password,
imeAction = ImeAction.Done, imeAction = ImeAction.Done,
), ),
keyboardActions = KeyboardActions(onDone = { viewModel.submit() }), keyboardActions = KeyboardActions(onDone = { onSubmit() }),
) )
if (state.errorMessage != null) { if (state.errorMessage != null) {
Text( Text(
text = state.errorMessage.orEmpty(), text = state.errorMessage,
color = MaterialTheme.colorScheme.error, color = MaterialTheme.colorScheme.error,
style = MaterialTheme.typography.bodySmall, style = MaterialTheme.typography.bodySmall,
) )
} }
SubmitButton(state = state, onSubmit = onSubmit)
}
}
@Composable
private fun SubmitButton(state: LoginFormState, onSubmit: () -> Unit) {
Button( Button(
onClick = viewModel::submit, onClick = onSubmit,
enabled = !state.isSubmitting && enabled = !state.isSubmitting &&
state.username.isNotBlank() && state.username.isNotBlank() &&
state.password.isNotBlank(), state.password.isNotBlank(),
@@ -108,6 +130,4 @@ fun LoginScreen(
Text("Sign in") Text("Sign in")
} }
} }
}
}
} }