Skip to content

Commit

Permalink
change: Imported VerifiedBadge icon to use in ContentHeader component…
Browse files Browse the repository at this point in the history
…, corrections in OptionsSelectionViewModel, removed unused localizable keys.

Signed-off-by: Christos Kaitatzis <[email protected]>
  • Loading branch information
ckaitatzis committed Feb 5, 2025
1 parent d4de0ab commit 5c0e3c2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ enum class LocalizableKey {
CancelSignProcessPrimaryText,
SelectDocumentTitle,
SelectDocumentSubtitle,
SelectDocument,
Document,
ConfirmSelectionTitle,
SelectSigningService,
SelectSigningServiceSubtitle,
SelectServiceTitle,
SelectServiceSubtitle,
SelectCertificateTitle,
SelectCertificateSubtitle,
SelectSigningCertificateTitle,
SelectSigningCertificateSubtitle,
Expand All @@ -45,15 +41,12 @@ enum class LocalizableKey {
Success,
SuccessfullySignedDocument,
SuccessDescription,
SignedBy,
View,
Close,
Cancel,
Continue,
Done,
Save,
Share,
Sign,
SharingDocument,
CloseSharingMessage,
GenericErrorButtonRetry,
Expand All @@ -76,31 +69,24 @@ enum class LocalizableKey {
CancelSignProcessSubtitle -> "Cancel will redirect you back to the documents list without signing your document"
CancelSignProcessSecondaryText -> "Cancel signing"
CancelSignProcessPrimaryText -> "Continue signing"
SelectDocumentTitle -> "Select a document from your device to sign electronically."
SelectDocumentTitle -> "Document"
SelectDocumentSubtitle -> "Choose a document from your device to sign electronically."
SelectDocument -> "Select document"
Document -> "Document"
SigningService -> "Signing service"
ConfirmSelectionTitle -> "Please confirm signing of the following"
SelectSigningService -> "Select signing service"
SelectSigningServiceSubtitle -> "Remote Signing Service enables secure online document signing."
SelectServiceTitle -> "Signing services"
SelectServiceSubtitle -> "Select the Signing Service that will be used to issue a digital certificate"
SelectCertificateTitle -> "You have chosen to sign the following document:"
SelectSigningCertificateTitle -> "Select signing certificate"
SelectCertificateSubtitle -> "The signing certificate is used to verify your identity and is linked to your electronic signature."
Success -> "Success!"
SuccessfullySignedDocument -> "You successfully signed your document"
SuccessDescription -> "You have successfully signed your document."
SignedBy -> "Signed by: $ARGUMENTS_SEPARATOR"
View -> "VIEW"
Close -> "Close"
Cancel -> "Cancel"
Continue -> "Continue"
Done -> "Done"
Save -> "Save"
Share -> "Share"
Sign -> "Sign"
SharingDocument -> "Sharing document?"
CloseSharingMessage -> "Closing will redirect you back to the dashboard without saving or sharing the document."
GenericErrorButtonRetry -> "TRY AGAIN"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ internal object AppIcons {
imageVector = null
)

val VerifiedBadge: IconData = IconData(
resourceId = R.drawable.ic_verified_badge,
contentDescriptionId = R.string.content_description_verified_icon,
imageVector = null
)

val VerticalMore: IconData = IconData(
resourceId = null,
contentDescriptionId = R.string.content_description_more_vert_icon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fun RelyingParty(
if (isVerified) {
WrapIcon(
modifier = Modifier.size(20.dp),
iconData = AppIcons.Verified,
iconData = AppIcons.VerifiedBadge,
customTint = MaterialTheme.colorScheme.success,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ internal class OptionsSelectionViewModel(
setState {
copy(
documentSelectionItem = SelectionOptionUi(
overlineText = resourceProvider.getLocalizedString(LocalizableKey.Document),
overlineText = resourceProvider.getLocalizedString(LocalizableKey.SelectDocumentTitle),
mainText = response.file.documentName,
subtitle = resourceProvider.getLocalizedString(LocalizableKey.SelectDocumentSubtitle),
actionText = resourceProvider.getLocalizedString(LocalizableKey.View),
Expand Down Expand Up @@ -492,8 +492,8 @@ internal class OptionsSelectionViewModel(
setState {
copy(
certificateSelectionItem = SelectionOptionUi(
overlineText = resourceProvider.getLocalizedString(LocalizableKey.SelectSigningCertificateTitle),
mainText = null,
overlineText = null,
mainText = resourceProvider.getLocalizedString(LocalizableKey.SelectSigningCertificateTitle),
subtitle = resourceProvider.getLocalizedString(LocalizableKey.SelectCertificateSubtitle),
leadingIcon = AppIcons.StepThree,
trailingIcon = AppIcons.KeyboardArrowRight,
Expand Down
25 changes: 25 additions & 0 deletions rqes-ui-sdk/src/main/res/drawable/ic_verified_badge.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 European Commission
~
~ Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European
~ Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work
~ except in compliance with the Licence.
~
~ You may obtain a copy of the Licence at:
~ https://joinup.ec.europa.eu/software/page/eupl
~
~ Unless required by applicable law or agreed to in writing, software distributed under
~ the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF
~ ANY KIND, either express or implied. See the Licence for the specific language
~ governing permissions and limitations under the Licence.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="17dp"
android:viewportWidth="16"
android:viewportHeight="17">
<path
android:fillColor="#55953B"
android:pathData="M7.991,0.259C9.116,0.259 10.116,0.915 10.616,1.884C11.648,1.54 12.835,1.79 13.648,2.603C14.46,3.415 14.71,4.603 14.366,5.634C15.335,6.134 15.991,7.134 15.991,8.259C15.991,9.415 15.335,10.415 14.366,10.915C14.71,11.946 14.46,13.102 13.648,13.915C12.835,14.727 11.648,14.977 10.616,14.665C10.116,15.634 9.116,16.259 7.991,16.259C6.835,16.259 5.835,15.634 5.335,14.665C4.304,14.977 3.147,14.727 2.335,13.915C1.522,13.102 1.272,11.946 1.585,10.915C0.616,10.415 -0.009,9.415 -0.009,8.259C-0.009,7.134 0.616,6.134 1.585,5.634C1.272,4.603 1.522,3.415 2.335,2.603C3.147,1.79 4.304,1.54 5.335,1.884C5.835,0.915 6.835,0.259 7.991,0.259ZM11.023,7.29C11.304,7.009 11.304,6.54 11.023,6.259C10.71,5.946 10.241,5.946 9.96,6.259L6.991,9.228L5.772,8.009C5.46,7.696 4.991,7.696 4.71,8.009C4.397,8.29 4.397,8.759 4.71,9.04L6.46,10.79C6.741,11.102 7.21,11.102 7.522,10.79L11.023,7.29Z" />
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package eu.europa.ec.eudi.testrqes
import android.app.Application
import eu.europa.ec.eudi.rqes.HashAlgorithmOID
import eu.europa.ec.eudi.rqesui.domain.entities.localization.LocalizableKey
import eu.europa.ec.eudi.rqesui.domain.entities.localization.LocalizableKey.Companion.ARGUMENTS_SEPARATOR
import eu.europa.ec.eudi.rqesui.domain.extension.toUri
import eu.europa.ec.eudi.rqesui.infrastructure.EudiRQESUi
import eu.europa.ec.eudi.rqesui.infrastructure.config.EudiRQESUiConfig
Expand Down Expand Up @@ -63,7 +62,6 @@ private class DefaultConfig : EudiRQESUiConfig {
return mapOf(
"en" to mapOf(
LocalizableKey.View to "VIEW",
LocalizableKey.SignedBy to "Signed by: $ARGUMENTS_SEPARATOR",
)
)
}
Expand Down

0 comments on commit 5c0e3c2

Please sign in to comment.