Commit 02d52a0f authored by taco@waag.org's avatar taco@waag.org
Browse files

format proof string

parent 9bd1898b
......@@ -71,8 +71,18 @@ if (window.hasRun) {
fragment.appendChild(label);
}
function appendProof(fragment,result){
let proof_string = JSON.stringify(result);
function appendProof(fragment, result){
let status = result["status"];
var proof_string = status;
if(status == "VALID"){
let email = result["email"];
let credential = result["id"];
let issuance_date = new Date(result["issuancetime"]*1000).toLocaleDateString("nl-NL");
proof_string = `${status} - signed using ${credential}: ${email} issued on ${issuance_date}.`
}
let proof = document.createElement('div');
proof.classList.add('pop-proof');
proof.textContent = proof_string;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment