|
|
@ -10,10 +10,12 @@ import androidx.compose.foundation.background
|
|
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
|
import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
|
import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
import androidx.compose.foundation.layout.width
|
|
|
|
import androidx.compose.foundation.layout.width
|
|
|
|
import androidx.compose.foundation.pager.HorizontalPager
|
|
|
|
import androidx.compose.foundation.pager.HorizontalPager
|
|
|
|
import androidx.compose.foundation.pager.rememberPagerState
|
|
|
|
import androidx.compose.foundation.pager.rememberPagerState
|
|
|
|
|
|
|
|
import androidx.compose.material.LocalContentAlpha
|
|
|
|
import androidx.compose.material.MaterialTheme
|
|
|
|
import androidx.compose.material.MaterialTheme
|
|
|
|
import androidx.compose.material.Text
|
|
|
|
import androidx.compose.material.Text
|
|
|
|
import androidx.compose.material.primarySurface
|
|
|
|
import androidx.compose.material.primarySurface
|
|
|
@ -47,11 +49,13 @@ import org.thoughtcrime.securesms.dependencies.DatabaseComponent
|
|
|
|
import org.thoughtcrime.securesms.showOpenUrlDialog
|
|
|
|
import org.thoughtcrime.securesms.showOpenUrlDialog
|
|
|
|
import org.thoughtcrime.securesms.ui.AppTheme
|
|
|
|
import org.thoughtcrime.securesms.ui.AppTheme
|
|
|
|
import org.thoughtcrime.securesms.ui.LoadingArcOr
|
|
|
|
import org.thoughtcrime.securesms.ui.LoadingArcOr
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.ui.LocalDimensions
|
|
|
|
import org.thoughtcrime.securesms.ui.PreviewTheme
|
|
|
|
import org.thoughtcrime.securesms.ui.PreviewTheme
|
|
|
|
import org.thoughtcrime.securesms.ui.ThemeResPreviewParameterProvider
|
|
|
|
import org.thoughtcrime.securesms.ui.ThemeResPreviewParameterProvider
|
|
|
|
import org.thoughtcrime.securesms.ui.baseBold
|
|
|
|
import org.thoughtcrime.securesms.ui.baseBold
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.ui.classicDarkColors
|
|
|
|
import org.thoughtcrime.securesms.ui.components.AppBar
|
|
|
|
import org.thoughtcrime.securesms.ui.components.AppBar
|
|
|
|
import org.thoughtcrime.securesms.ui.components.BorderlessButtonSecondary
|
|
|
|
import org.thoughtcrime.securesms.ui.components.BorderlessButtonWithIcon
|
|
|
|
import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode
|
|
|
|
import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode
|
|
|
|
import org.thoughtcrime.securesms.ui.components.OutlineButton
|
|
|
|
import org.thoughtcrime.securesms.ui.components.OutlineButton
|
|
|
|
import org.thoughtcrime.securesms.ui.components.SessionButtonText
|
|
|
|
import org.thoughtcrime.securesms.ui.components.SessionButtonText
|
|
|
@ -154,7 +158,7 @@ fun EnterAccountId(
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
SessionOutlinedTextField(
|
|
|
|
SessionOutlinedTextField(
|
|
|
|
text = state.newMessageIdOrOns,
|
|
|
|
text = state.newMessageIdOrOns,
|
|
|
|
modifier = Modifier.padding(horizontal = 64.dp)
|
|
|
|
modifier = Modifier.padding(horizontal = LocalDimensions.current.marginSmall)
|
|
|
|
.contentDescription("Session id input box"),
|
|
|
|
.contentDescription("Session id input box"),
|
|
|
|
placeholder = stringResource(R.string.accountIdOrOnsEnter),
|
|
|
|
placeholder = stringResource(R.string.accountIdOrOnsEnter),
|
|
|
|
onChange = callbacks::onChange,
|
|
|
|
onChange = callbacks::onChange,
|
|
|
@ -164,15 +168,20 @@ fun EnterAccountId(
|
|
|
|
if (state.error == null) {
|
|
|
|
if (state.error == null) {
|
|
|
|
BorderlessButtonSecondary(
|
|
|
|
BorderlessButtonSecondary(
|
|
|
|
text = stringResource(R.string.messageNewDescription),
|
|
|
|
text = stringResource(R.string.messageNewDescription),
|
|
|
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_help_desk_link)
|
|
|
|
iconRes = R.drawable.ic_circle_question_mark,
|
|
|
|
|
|
|
|
contentColor = classicDarkColors[5],
|
|
|
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
|
|
|
.contentDescription(R.string.AccessibilityId_help_desk_link)
|
|
|
|
|
|
|
|
.fillMaxWidth()
|
|
|
|
|
|
|
|
.padding(horizontal = LocalDimensions.current.marginMedium),
|
|
|
|
) { onHelp() }
|
|
|
|
) { onHelp() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OutlineButton(
|
|
|
|
OutlineButton(
|
|
|
|
modifier = Modifier
|
|
|
|
modifier = Modifier
|
|
|
|
.align(Alignment.CenterHorizontally)
|
|
|
|
.align(Alignment.CenterHorizontally)
|
|
|
|
.padding(horizontal = 64.dp)
|
|
|
|
.padding(horizontal = LocalDimensions.current.marginLarge)
|
|
|
|
.width(200.dp)
|
|
|
|
.fillMaxWidth()
|
|
|
|
.contentDescription(R.string.next),
|
|
|
|
.contentDescription(R.string.next),
|
|
|
|
onClick = { callbacks.onContinue() }
|
|
|
|
onClick = { callbacks.onContinue() }
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|