@@ -304,35 +304,11 @@ fun WebEidScreen(
304304 } else if (signRequest != null ) {
305305 val responseUri = signRequest.responseUri.lowercase()
306306 val isCertificateFlow = responseUri.contains(" /certificate" ) && ! responseUri.contains(" /signature" )
307- Column (
308- horizontalAlignment = Alignment .CenterHorizontally ,
309- modifier = Modifier .fillMaxWidth(),
310- ) {
311- Text (
312- text = stringResource(R .string.web_eid_certificate_consent_text),
313- style = MaterialTheme .typography.bodySmall,
314- color = MaterialTheme .colorScheme.onBackground.copy(alpha = 0.8f ),
315- textAlign = TextAlign .Center ,
316- modifier = Modifier .padding(top = XSPadding ),
317- )
318- Text (
319- text = signRequest.origin.take(80 ),
320- style = MaterialTheme .typography.labelSmall,
321- color = MaterialTheme .colorScheme.onBackground,
322- textAlign = TextAlign .Center ,
323- maxLines = 1 ,
324- overflow = TextOverflow .Ellipsis ,
325- )
326- Text (
327- text =
328- if (isCertificateFlow) {
329- stringResource(R .string.web_eid_requests_certificate)
330- } else {
331- stringResource(R .string.web_eid_requests_signing)
332- },
333- style = MaterialTheme .typography.bodyMedium,
334- color = MaterialTheme .colorScheme.onBackground,
335- textAlign = TextAlign .Center ,
307+
308+ if (! isWebEidAuthenticating) {
309+ WebEidSignOrCertificateInfo (
310+ origin = signRequest.origin,
311+ isCertificateFlow = isCertificateFlow,
336312 )
337313 }
338314
@@ -372,6 +348,7 @@ fun WebEidScreen(
372348 isSigning = false ,
373349 isDecrypting = false ,
374350 isWebEidAuthenticating = isWebEidAuthenticating,
351+ canNumberReadOnly = true ,
375352 onError = {
376353 isWebEidAuthenticating = false
377354 cancelWebEidSignAction()
@@ -486,7 +463,7 @@ private fun WebEidAuthInfo(authRequest: WebEidAuthRequest) {
486463 Spacer (modifier = Modifier .height(16 .dp))
487464
488465 Text (
489- text = stringResource(R .string.web_eid_auth_details_forwarded ),
466+ text = stringResource(R .string.web_eid_details_forwarded ),
490467 style = MaterialTheme .typography.labelMedium,
491468 textAlign = TextAlign .Left ,
492469 )
@@ -511,6 +488,64 @@ private fun WebEidAuthInfo(authRequest: WebEidAuthRequest) {
511488 }
512489}
513490
491+ @Composable
492+ private fun WebEidSignOrCertificateInfo (
493+ origin : String ,
494+ isCertificateFlow : Boolean ,
495+ ) {
496+ Column (
497+ modifier = Modifier .fillMaxWidth(),
498+ ) {
499+ Text (
500+ text =
501+ if (isCertificateFlow) {
502+ stringResource(R .string.web_eid_cert_request_from)
503+ } else {
504+ stringResource(R .string.web_eid_sign_request_from)
505+ },
506+ style = MaterialTheme .typography.labelMedium,
507+ textAlign = TextAlign .Left ,
508+ )
509+
510+ Spacer (modifier = Modifier .height(2 .dp))
511+
512+ Text (
513+ text = origin.take(80 ),
514+ style = MaterialTheme .typography.bodySmall,
515+ fontWeight = FontWeight .Medium ,
516+ textAlign = TextAlign .Left ,
517+ maxLines = 2 ,
518+ overflow = TextOverflow .Ellipsis ,
519+ )
520+
521+ Spacer (modifier = Modifier .height(16 .dp))
522+
523+ Text (
524+ text = stringResource(R .string.web_eid_details_forwarded),
525+ style = MaterialTheme .typography.labelMedium,
526+ textAlign = TextAlign .Left ,
527+ )
528+
529+ Spacer (modifier = Modifier .height(2 .dp))
530+
531+ Text (
532+ text = " NAME, PERSONAL IDENTIFICATION CODE" ,
533+ style = MaterialTheme .typography.bodySmall,
534+ textAlign = TextAlign .Left ,
535+ )
536+
537+ Spacer (modifier = Modifier .height(16 .dp))
538+
539+ Text (
540+ text = stringResource(R .string.web_eid_certificate_consent_text),
541+ style = MaterialTheme .typography.bodySmall,
542+ color = MaterialTheme .colorScheme.onBackground,
543+ textAlign = TextAlign .Left ,
544+ modifier = Modifier .fillMaxWidth(),
545+ )
546+ }
547+ }
548+
514549@Composable
515550private fun WebEidRememberMe (
516551 rememberMe : Boolean ,
0 commit comments