Moar fixes
This commit is contained in:
parent
de31591eba
commit
248d0bad83
2 changed files with 15 additions and 28 deletions
|
|
@ -56,7 +56,7 @@ import io.element.android.libraries.designsystem.theme.components.TopAppBar
|
||||||
fun ChangeAccountProviderView(
|
fun ChangeAccountProviderView(
|
||||||
state: ChangeAccountProviderState,
|
state: ChangeAccountProviderState,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
onBackPressed: () -> Unit,
|
onBackPressed: () -> Unit = {},
|
||||||
onAccountProviderClicked: (AccountProvider) -> Unit = {},
|
onAccountProviderClicked: (AccountProvider) -> Unit = {},
|
||||||
onOtherProviderClicked: () -> Unit = {},
|
onOtherProviderClicked: () -> Unit = {},
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
|
|
@ -133,11 +133,22 @@ fun LoginPasswordView(
|
||||||
subTitle = stringResource(id = R.string.screen_login_form_header)
|
subTitle = stringResource(id = R.string.screen_login_form_header)
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(32.dp))
|
Spacer(Modifier.height(32.dp))
|
||||||
ServerDetailForm(
|
LoginForm(state = state,
|
||||||
state = state,
|
|
||||||
isLoading = isLoading,
|
isLoading = isLoading,
|
||||||
submit = ::submit
|
onSubmit = ::submit
|
||||||
)
|
)
|
||||||
|
Spacer(Modifier.height(28.dp))
|
||||||
|
// Submit
|
||||||
|
ButtonWithProgress(
|
||||||
|
text = stringResource(R.string.screen_login_submit),
|
||||||
|
showProgress = isLoading,
|
||||||
|
onClick = ::submit,
|
||||||
|
enabled = state.submitEnabled,
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.testTag(TestTags.loginContinue)
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.height(32.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.loginAction is Async.Failure) {
|
if (state.loginAction is Async.Failure) {
|
||||||
|
|
@ -149,30 +160,6 @@ fun LoginPasswordView(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun ServerDetailForm(
|
|
||||||
state: LoginPasswordState,
|
|
||||||
isLoading: Boolean,
|
|
||||||
submit: () -> Unit,
|
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
) {
|
|
||||||
LoginForm(state = state, isLoading = isLoading, onSubmit = submit, modifier = modifier)
|
|
||||||
|
|
||||||
Spacer(Modifier.height(28.dp))
|
|
||||||
|
|
||||||
// Submit
|
|
||||||
ButtonWithProgress(
|
|
||||||
text = stringResource(R.string.screen_login_submit),
|
|
||||||
showProgress = isLoading,
|
|
||||||
onClick = submit,
|
|
||||||
enabled = state.submitEnabled,
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.testTag(TestTags.loginContinue)
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(32.dp))
|
|
||||||
}
|
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
internal fun LoginForm(
|
internal fun LoginForm(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue