Skip to content

Commit

Permalink
fix: Import credential button and credentials order
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-dee7 committed Nov 10, 2022
1 parent a77f863 commit 6d5e711
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
"title": "Get a credential",
"description": "Get a new credential issued by cheqd",
"get": "Get social media credential",
"getTicket": "Get an IIW event ticket",
"getTicket": "Import Eventbrite QR code",
"importIIW": "Import IIW credential",
"connections": {
"title": "Connected social media accounts",
Expand Down
140 changes: 70 additions & 70 deletions src/screens/Identity/Identity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,47 @@ const Identity = (): JSX.Element => {
<div className="mt-4">
<div className="container">
<div className="row gy-4">
<div className="col-12">
<Card className="d-flex flex-column h-100 justify-content-between">
<div className="d-flex justify-content-between">
<div>
<h2>{t('identity.wallet.title')}</h2>
<div className="my-4">{t('identity.wallet.description')}</div>
</div>
<div>
{
selectedCredentials.size > 0 ?
<CustomButton className="px-5" onClick={handleCreatePresentation}>
Create Presentation
</CustomButton> :
<CustomButton className="px-5" onClick={handleCredentialMode}>
Share Credentials
</CustomButton>
}
</div>
</div>
<CredentialList
handleRemoveCredential={handleRemoveCredential}
handleShowCredential={handleShowCredential}
credentialList={identityWallet?.credentials}
handleSelectCredential={handleSelectedCredentials}
isCredentialSelected={isCredentialSelected}
mode={credentialMode}
/>
<div className="d-flex flex-row justify-content-start mt-4 gap-4">
{identityWallet == null && (
<CustomButton className="px-5" onClick={handleUnlock}>
{t('identity.wallet.unlock')}
</CustomButton>
)}
{identityWallet != null && (
<CustomButton className="px-5" onClick={handleLock}>
{t('identity.wallet.lock')}
</CustomButton>
)}
</div>
</Card>
</div>
<div className="col-12">
<Card className="d-flex flex-row h-100 justify-content-between">
<div className="d-flex flex-column h-100 justify-content-between gap-4">
Expand Down Expand Up @@ -434,47 +475,6 @@ const Identity = (): JSX.Element => {
</div>
</Card >
</div >
<div className="col-12">
<Card className="d-flex flex-column h-100 justify-content-between">
<div className="d-flex justify-content-between">
<div>
<h2>{t('identity.wallet.title')}</h2>
<div className="my-4">{t('identity.wallet.description')}</div>
</div>
<div>
{
selectedCredentials.size > 0 ?
<CustomButton className="px-5" onClick={handleCreatePresentation}>
Create Presentation
</CustomButton> :
<CustomButton className="px-5" onClick={handleCredentialMode}>
Share Credentials
</CustomButton>
}
</div>
</div>
<CredentialList
handleRemoveCredential={handleRemoveCredential}
handleShowCredential={handleShowCredential}
credentialList={identityWallet?.credentials}
handleSelectCredential={handleSelectedCredentials}
isCredentialSelected={isCredentialSelected}
mode={credentialMode}
/>
<div className="d-flex flex-row justify-content-start mt-4 gap-4">
{identityWallet == null && (
<CustomButton className="px-5" onClick={handleUnlock}>
{t('identity.wallet.unlock')}
</CustomButton>
)}
{identityWallet != null && (
<CustomButton className="px-5" onClick={handleLock}>
{t('identity.wallet.lock')}
</CustomButton>
)}
</div>
</Card>
</div>
</div >
</div >
</div >
Expand Down Expand Up @@ -613,10 +613,10 @@ const Identity = (): JSX.Element => {
{t('identity.credential.title')}
</h2>
<DetailsPopup formatted={{
type: activeVC.type,
issuanceDate: new Date(activeVC.issuanceDate!).toUTCString(),
issuer: activeVC.issuer.id
}}
type: activeVC.type,
issuanceDate: new Date(activeVC.issuanceDate!).toUTCString(),
issuer: activeVC.issuer.id
}}
data={activeVC}
qr={activeVC.proof.jwt}
/>
Expand All @@ -640,34 +640,34 @@ const Identity = (): JSX.Element => {
dataBsKeyboard={false}
contentClassName="p-3 w-auto"
>
<div className="d-flex flex-column align-items-center">
<h2 className="text-center">
<img src={Assets.images.cheqdRoundLogo} height="28" className="me-3" />
{t('identity.presentation.title')}
</h2>
{ presentation &&
(<DetailsPopup
formatted={{
type: presentation.type,
issuanceDate: new Date(presentation.issuanceDate!).toUTCString(),
subject: presentation.holder
}}
data={presentation}
qr={presentation.proof.jwt}
/>) }
<div className="d-flex flex-row gap-4 align-items-center justify-content-center">
<CustomButton
className="mt-5"
onClick={() => showModal('presentationDetails', false)}
>
{t('identity.presentation.close')}
</CustomButton>
<div className="d-flex flex-column align-items-center">
<h2 className="text-center">
<img src={Assets.images.cheqdRoundLogo} height="28" className="me-3" />
{t('identity.presentation.title')}
</h2>
{presentation &&
(<DetailsPopup
formatted={{
type: presentation.type,
issuanceDate: new Date(presentation.issuanceDate!).toUTCString(),
subject: presentation.holder
}}
data={presentation}
qr={presentation.proof.jwt}
/>)}
<div className="d-flex flex-row gap-4 align-items-center justify-content-center">
<CustomButton
className="mt-5"
onClick={() => showModal('presentationDetails', false)}
>
{t('identity.presentation.close')}
</CustomButton>
</div>
</div>
</div>
</Modal>
</Modal>
</>
</>
);
};

export default Identity;
export default Identity;

0 comments on commit 6d5e711

Please sign in to comment.