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

mark invalid fragments in provenance view

parent 68115ef6
......@@ -25,7 +25,7 @@ browser.runtime.onMessage.addListener(function(msg, sender, sendResponse){
return "hash failed";
})
)).then(responses => {
console.log(responses);
//then replace the image urls with the calculated hashes
responses.forEach((hash, index) => {
let fragment_index = img_indices[index];
......
......@@ -22,6 +22,7 @@
width: 2rem;
}
.pop-proof {
text-align: center;
background-color: lightgray;
......@@ -29,6 +30,18 @@
font-family: monospace;
}
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
.invalid {
color: red;
}
.pop-image img {
max-width: 100%;
height: auto;
......
......@@ -85,18 +85,31 @@ if (window.hasRun) {
let proof = document.createElement('div');
proof.classList.add('pop-proof');
if(status != "VALID"){
proof.classList.add('invalid');
}
proof.textContent = proof_string;
fragment.appendChild(proof);
}
function renderTitle(type, content, result, signature){
let status = result["status"];
let fragment = document.createElement('div');
fragment.classList.add('pop-title');
appendLabel(fragment, type);
appendCopyButton(fragment,type,content,signature);
let header = document.createElement('h1');
header.textContent = content;
if(status == "VALID"){
appendCopyButton(fragment,type,content,signature);
}
else {
header.classList.add('blur');
}
fragment.appendChild(header);
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