Displaying that chipTanFlickercode is not supported
This commit is contained in:
parent
70aa32e1d6
commit
05181e5f25
|
@ -18,9 +18,7 @@ import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import kotlinx.datetime.TimeZone
|
import kotlinx.datetime.TimeZone
|
||||||
import kotlinx.datetime.toLocalDateTime
|
import kotlinx.datetime.toLocalDateTime
|
||||||
import net.codinux.banking.client.model.tan.ActionRequiringTan
|
import net.codinux.banking.client.model.tan.*
|
||||||
import net.codinux.banking.client.model.tan.AllowedTanFormat
|
|
||||||
import net.codinux.banking.client.model.tan.EnterTanResult
|
|
||||||
import net.codinux.banking.ui.composables.BankIcon
|
import net.codinux.banking.ui.composables.BankIcon
|
||||||
import net.codinux.banking.ui.config.DI
|
import net.codinux.banking.ui.config.DI
|
||||||
import net.codinux.banking.ui.config.Internationalization
|
import net.codinux.banking.ui.config.Internationalization
|
||||||
|
@ -30,7 +28,6 @@ import net.codinux.banking.ui.model.TanChallengeReceived
|
||||||
import net.codinux.banking.ui.model.error.ErroneousAction
|
import net.codinux.banking.ui.model.error.ErroneousAction
|
||||||
import net.codinux.banking.ui.service.createImageBitmap
|
import net.codinux.banking.ui.service.createImageBitmap
|
||||||
import net.codinux.log.Log
|
import net.codinux.log.Log
|
||||||
import org.jetbrains.compose.resources.imageResource
|
|
||||||
import kotlin.io.encoding.Base64
|
import kotlin.io.encoding.Base64
|
||||||
import kotlin.io.encoding.ExperimentalEncodingApi
|
import kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
|
|
||||||
|
@ -115,7 +112,13 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
challenge.selectedTanMethod,
|
challenge.selectedTanMethod,
|
||||||
{ Log.info { "User selected TanMethod $it" } }, // TODO: change TanMethod
|
{ Log.info { "User selected TanMethod $it" } }, // TODO: change TanMethod
|
||||||
{ it.displayName }
|
{ it.displayName }
|
||||||
)
|
) { tanMethod ->
|
||||||
|
if (tanMethod.type == TanMethodType.ChipTanFlickercode) {
|
||||||
|
Text(tanMethod.displayName + " (noch nicht implementiert)", color = MaterialTheme.colors.onSurface.copy(ContentAlpha.disabled))
|
||||||
|
} else {
|
||||||
|
Text(tanMethod.displayName)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (challenge.availableTanMedia.isNotEmpty()) {
|
if (challenge.availableTanMedia.isNotEmpty()) {
|
||||||
|
@ -135,7 +138,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
Column(Modifier.fillMaxWidth().padding(top = 6.dp)) {
|
Column(Modifier.fillMaxWidth().padding(top = 6.dp)) {
|
||||||
if (challenge.flickerCode != null) {
|
if (challenge.flickerCode != null) {
|
||||||
Text("Es tut uns Leid, für die TAN müsste ein Flickercode angezeigt werden, was wir noch nicht implementiert haben.")
|
Text("Es tut uns Leid, für die TAN müsste ein Flickercode angezeigt werden, was wir noch nicht implementiert haben.")
|
||||||
Text("Bitte wählen Sie ein anderes TAN Verfahren, z. B. manuelle TAN Eingabe wie chipTAN manuell.", Modifier.padding(top = 6.dp))
|
Text("Bitte wählen Sie ein anderes TAN Verfahren, z. B. chipTAN-QrCode oder manuelle TAN Eingabe wie chipTAN manuell.", Modifier.padding(top = 6.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
challenge.tanImage?.let { tanImage ->
|
challenge.tanImage?.let { tanImage ->
|
||||||
|
@ -167,7 +170,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
Text(challenge.messageToShowToUser)
|
Text(challenge.messageToShowToUser)
|
||||||
}
|
}
|
||||||
|
|
||||||
challenge.tanExpirationTime?.let { expirationTime ->
|
challenge.tanExpirationTime?.let { expirationTime -> // is almost never set
|
||||||
Row(Modifier.padding(top = 16.dp)) {
|
Row(Modifier.padding(top = 16.dp)) {
|
||||||
val time = expirationTime.toLocalDateTime(TimeZone.currentSystemDefault()).time
|
val time = expirationTime.toLocalDateTime(TimeZone.currentSystemDefault()).time
|
||||||
Text("TAN ist gültig bis:", Modifier.padding(end = 6.dp))
|
Text("TAN ist gültig bis:", Modifier.padding(end = 6.dp))
|
||||||
|
|
Loading…
Reference in New Issue