This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move VC Cards to single component, add Selective Disclosure marking, …
…added listing of selectively disclosure-able properties
- Loading branch information
Showing
7 changed files
with
135 additions
and
72 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
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
47 changes: 47 additions & 0 deletions
47
web/src/components/credentials/VerifiableCredentialCard.vue
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,47 @@ | ||
<template> | ||
<div class="bg-white p-6 rounded-2xl shadow-2xl h-full"> | ||
<div class="flex justify-end gap-1.5"> | ||
<div | ||
:class="credential.expirationDate | ||
? (new Date(credential.expirationDate).getTime() > new Date().getTime() | ||
? 'bg-cyan-100' : 'bg-red-50') : 'bg-cyan-50' | ||
" | ||
class="rounded-lg px-3 mb-2" | ||
> | ||
<span | ||
:class=" | ||
credential.expirationDate | ||
? new Date(credential.expirationDate).getTime() > new Date().getTime() | ||
? 'text-cyan-900' | ||
: 'text-orange-900' | ||
: 'text-cyan-900' | ||
" | ||
>{{ credential.expirationDate ? | ||
(new Date(credential.expirationDate).getTime() > new Date().getTime() ? "Valid" : "Expired") | ||
: "Valid" }} | ||
</span> | ||
</div> | ||
|
||
<div class="rounded-lg px-3 mb-2 bg-cyan-100"> | ||
<span>SD</span> | ||
</div> | ||
</div> | ||
<h2 class="text-2xl font-bold text-gray-900 bold mb-8"> | ||
{{ credential.type[credential.type.length - 1].replace(/([a-z0-9])([A-Z])/g, "$1 $2") }} | ||
</h2> | ||
<div v-if="credential.issuer" class="flex items-center"> | ||
<img :src="credential.issuer?.image?.id ? credential.issuer?.image?.id : credential.issuer?.image" class="w-12" /> | ||
<div class="text-natural-600 ml-2 w-32"> | ||
{{ credential.issuer?.name }} | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
const props = defineProps(["credential"]); | ||
</script> | ||
<style scoped> | ||
</style> |
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