-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from wwWallet/verifier-revamp
Fix verifier admin panel
- Loading branch information
Showing
8 changed files
with
117 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function updateLayoutForExpiredCredentials(credentialPayloads) { | ||
const currentDate = new Date(); | ||
credentialPayloads.forEach((credential, index) => { | ||
const expirationDate = new Date(credential.expirationDate); | ||
if (expirationDate < currentDate) { | ||
const credentialBox = document.querySelectorAll('.credential-box')[index]; | ||
credentialBox.classList.add('expired-credential'); | ||
const expiredLabel = document.createElement('div'); | ||
expiredLabel.className = 'expired-label'; | ||
expiredLabel.textContent = 'Expired'; | ||
credentialBox.appendChild(expiredLabel); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
extends ../layout.pug | ||
block layout-content | ||
.container | ||
h1 Job positions | ||
h1 Verifiable Presentations | ||
.card-container | ||
for definition in presentationDefinitions | ||
.card | ||
.card-title Software Engineer - Core | ||
p.card-text Send your Bachelor Diploma to apply for "Software Engineer - Core" | ||
.card-title #{definition.title} | ||
p.card-text #{definition.description} | ||
.card-buttons | ||
button.btn.btn-primary(onclick=`window.location.href = "/verifier-panel/filter/by/definition/${definition.id}"`) See presentations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
extends ../layout.pug | ||
|
||
block layout-content | ||
.container | ||
h1 Detailed Presentation | ||
.card-container | ||
for inputDescriptor in view.descriptor_mapped_value | ||
div.table-container | ||
table | ||
tbody | ||
each row, index in inputDescriptor.vcView.rows | ||
tr(class= index % 2 === 0 ? 'even' : 'odd') | ||
td #{row.name} | ||
td #{row.value} | ||
#success-container | ||
.container2 | ||
.centered-layout | ||
h1 Detailed Presentation | ||
.inline-box-container(style="display: flex; gap:30px; flex-direction: row; flex-wrap: wrap;") | ||
// Iterate over each credential and display an inline box with dynamic background color and text color | ||
each credential, index in credentialPayloads | ||
- const branding = credential.credentialBranding || { backgroundColor: 'red', textColor: 'black' } | ||
- const imageUrl = credential.credentialBranding.image.url // Get the corresponding image URL | ||
.credential-box(style=`display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; position: relative; padding: 10px;`, id=`credential-box-${index}`) | ||
img(style="width: 240px; height: 150px; border-radius: 10px;")(src=imageUrl) | ||
|
||
h3 Requested claims extracted from credentials | ||
|
||
// Text area to display claims | ||
textarea#json-textarea.wide(style="border: 1px solid #ccc; padding: 10px; margin-bottom:20px; padding-top:0px; background-color: white; color: black; overflow: auto; resize: vertical; width:500px; min-height: 200px;") | ||
//- Display the 'credentialPayloads' JSON object | ||
| #{JSON.stringify(presentationClaims, null, 2)} | ||
|
||
h3 Credentials | ||
|
||
// Text area to display credentials JSON format | ||
textarea#json-textarea.wide(style="border: 1px solid #ccc; padding: 10px; margin-bottom:20px; padding-top:0px; background-color: white; color: black; overflow: auto; resize: vertical; width:500px; min-height: 200px;") | ||
//- Display the 'credentialPayloads' JSON object | ||
| #{JSON.stringify(credentialPayloads, null, 2)} | ||
|
||
script(src="/js/check-expired.js") | ||
script. | ||
var credentialPayloads = !{JSON.stringify(credentialPayloads)}; | ||
updateLayoutForExpiredCredentials(credentialPayloads); | ||
|
||
block footer | ||
include ../footer.pug | ||
|
||
link(rel="stylesheet" href="/styles/index.css") | ||
link(rel="stylesheet" href="/styles/detailed-presentation.css") | ||
script(src="/js/index.js") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters