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

blur other elements when verification fails

parent f22af1fc
......@@ -94,7 +94,6 @@ if (window.hasRun) {
function renderTitle(type, content, result, signature){
let status = result["status"];
let fragment = document.createElement('div');
fragment.classList.add('pop-title');
......@@ -103,6 +102,8 @@ if (window.hasRun) {
let header = document.createElement('h1');
header.textContent = content;
let status = result["status"];
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
......@@ -120,11 +121,18 @@ if (window.hasRun) {
let fragment = document.createElement('div');
fragment.classList.add('pop-abstract');
appendLabel(fragment, type);
appendCopyButton(fragment,type,content,signature);
let p = document.createElement('pre');
p.textContent = content;
let status = result["status"];
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
else {
p.classList.add('blur');
}
fragment.appendChild(p);
appendProof(fragment,result);
document.body.appendChild(fragment);
......@@ -134,11 +142,18 @@ if (window.hasRun) {
let fragment = document.createElement('div');
fragment.classList.add('pop-body');
appendLabel(fragment, type);
appendCopyButton(fragment,type,content,signature);
let p = document.createElement('pre');
p.textContent = content;
let status = result["status"];
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
else {
p.classList.add('blur');
}
fragment.appendChild(p);
appendProof(fragment,result);
document.body.appendChild(fragment);
......@@ -148,11 +163,18 @@ if (window.hasRun) {
let fragment = document.createElement('div');
fragment.classList.add('pop-author');
appendLabel(fragment, type);
appendCopyButton(fragment,type,content,signature);
let p = document.createElement('pre');
p.textContent = content;
let status = result["status"];
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
else {
p.classList.add('blur');
}
fragment.appendChild(p);
appendProof(fragment,result);
document.body.appendChild(fragment);
......@@ -165,8 +187,15 @@ if (window.hasRun) {
let p = document.createElement('img');
p.src = content;
appendCopyButton(fragment,type,content,signature);
let status = result["status"];
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
else {
p.classList.add('blur');
}
fragment.appendChild(p);
appendProof(fragment,result);
document.body.appendChild(fragment);
......
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