This repository has been archived by the owner on Apr 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create QRCode for Verifiable credential
closes #46 Signed-off-by: talwinder.kaur <[email protected]>
- Loading branch information
1 parent
194d051
commit 75481fe
Showing
9 changed files
with
125 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
<template> | ||
<div> | ||
<div> Create QR Code </div> | ||
<br> | ||
<div> | ||
<select id="selectVC"> | ||
<option value="0" >Select VC</option> | ||
</select> | ||
<br> | ||
<br> | ||
<button id='getVCBtn'>Get QR Code</button> | ||
<br> | ||
<br> | ||
<img src="" id="qr-result"/> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
async function generateQRCode() { | ||
window.onload = function () { | ||
document.getElementById('getVCBtn').addEventListener('click', () => { | ||
var e = document.getElementById("selectVC"); | ||
var vcValue = e.options[e.selectedIndex].value; | ||
if (vcValue == 0) { | ||
alert("please select vc") | ||
return | ||
} | ||
window.createQRCode(vcValue); | ||
}); | ||
} | ||
} | ||
export default{ | ||
beforeCreate:function(){ | ||
// Add an event listener | ||
document.addEventListener("afterLoadingWasm", function() { | ||
var select = document.getElementById("selectVC"); | ||
window.populateVC(select) | ||
}); | ||
window.$webCredentialHandler=this.$webCredentialHandler | ||
generateQRCode() | ||
}, | ||
} | ||
</script> |
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