Skip to content

Commit c64394e

Browse files
author
Maikel Maas
committed
VDX-278 Verify Credential Page, added the missing Text component
1 parent 5c51c26 commit c64394e

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

packages/oid4vci-demo-frontend/src/configs/kvk.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@
9090
"verifyRequest": {
9191
"bottomParagraph": "coc_credential_verify_request_right_pane_bottom_paragraph",
9292
"backgroundColor": "#005371",
93+
"showQRCodeTopTitle": true,
94+
"rightPaneLeftPane": {
95+
"qrCode": {
96+
"bottomText": {
97+
"credential_verify_request_right_pane_bottom_title": "",
98+
"credential_verify_request_right_pane_bottom_paragraph": "credential_verify_request_right_pane_bottom_paragraph"
99+
}
100+
}
101+
},
93102
"logo": {
94103
"src": "coc/logo.svg",
95104
"alt": "chamber of commerce logo",

packages/oid4vci-demo-frontend/src/ecosystem/ecosystem-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface SSICredentialVerifyRequestPageConfig extends PageConfig {
6262
rightPaneButtonStepId?: string
6363
downloadAppStepId?: string
6464
bottomParagraph?: string
65+
showQRCodeTopTitle?: boolean
6566
mobile?: {
6667
logo?: ImageProperties
6768
backgroundColor?: string

packages/oid4vci-demo-frontend/src/pages/SSICredentialVerifyRequestPage/index.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default function SSICredentialVerifyRequestPage(): React.ReactElement | n
1717
const flowRouter = useFlowRouter<SSICredentialVerifyRequestPageConfig>()
1818
const pageConfig = flowRouter.getPageConfig()
1919
const {t} = useTranslation()
20+
const credentialName = useEcosystem().getGeneralConfig().credentialName
2021
const [deepLink, setDeepLink] = useState<string>('')
2122
const isTabletOrMobile = useMediaQuery({query: '(max-width: 767px)'})
2223
const onSignInComplete = async (data: AuthorizationResponsePayload): Promise<void> => {
@@ -67,7 +68,18 @@ export default function SSICredentialVerifyRequestPage(): React.ReactElement | n
6768
height={pageConfig.mobile?.logo?.height ?? 150}
6869
/>
6970
}
70-
<div style={{
71+
{pageConfig.showQRCodeTopTitle && (<div style={{
72+
display: 'flex',
73+
flexDirection: 'column',
74+
marginTop: 'auto',
75+
maxHeight: '300px'
76+
}}>
77+
<Text style={{ textAlign: 'center'}}
78+
className={style.pReduceLineSpace}
79+
title={t('credential_verify_request_right_pane_top_title', {credentialName}).split('\n')}
80+
lines={t('credential_verify_request_right_pane_top_paragraph', {credentialName}).split('\n')}/>
81+
</div>)}
82+
{!pageConfig.showQRCodeTopTitle && <div style={{
7183
display: 'flex',
7284
flexGrow: 1,
7385
flexDirection: 'column',
@@ -85,8 +97,8 @@ export default function SSICredentialVerifyRequestPage(): React.ReactElement | n
8597
>
8698
{t('ssi_welcome_label')}
8799
</div>
88-
</div>
89-
<div style={{maxHeight: 356, width: '100%', display: 'flex', flexDirection: 'row', flexGrow: 1}}>
100+
</div>}
101+
<div style={{maxHeight: 356, width: '100%', display: 'flex', flexDirection: 'row', flexGrow: 1, ...(pageConfig.showQRCodeTopTitle && { marginBottom: 'auto'})}}>
90102
<div style={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', flexGrow: 1, ...(isTabletOrMobile && { gap: 24 })}}>
91103
<div>
92104
<NonMobileOS>

0 commit comments

Comments
 (0)