From ff746d81071622bd2d91037dfa61a9fcaa53a3e9 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 4 Oct 2022 16:54:43 -0700 Subject: [PATCH] verification ui: display publicKey if no verification domain, update CHANGES --- CHANGES.md | 4 ++-- src/embed-receipt.js | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 14ba9e5..0ef484a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ ## CHANGES v1.7.0 -- UI: Support showing WACZ verification stats on info tab, showing hashes verified, observer domain (or creation software), and certificate fingerprint, and WACZ package digest +- UI: Support showing WACZ verification stats on info tab, showing hashes verified, observer domain, (or public key and creation software), and certificate fingerprint, and WACZ package digest - Embed UI: Add `replay-with-info` embed mode which provides an information dropdown above replay, including verification info and link to download. - Embed UI: Add `hideOffscreen` attribute to enable hiding embed when offscreen (previously always enabled). - Embeds: add `newWindowBase" for configuring base replay for loading pages in new windows (default: https://replayweb.page/ or current page with deep links) @@ -11,7 +11,7 @@ v1.7.0 - Fidelity/Embeds: Redirect new windows from links / `window.open` to existing replay frame (only possible w/o 'sandbox'). - Embeds: Add 'requireSubdomainIframe' embed attribute to only allow embed if loaded from a cross-origin / subdomain iframe. - UI: improved formatting on 404 not found page. -- Loading: Fix IPFS loading, use auto-js-ipfs to load from gateway or existing local instance (don't run local node for now) +- Loading: Fix IPFS loading, use auto-js-ipfs to load from an IPFS gateway or existing local instance (don't run local node for now) - Dependencies: update to wabac.js 2.13.0 to support verification, latest wombat (3.3.9) v1.6.5 diff --git a/src/embed-receipt.js b/src/embed-receipt.js index 7d7aa7b..ad3a212 100644 --- a/src/embed-receipt.js +++ b/src/embed-receipt.js @@ -163,6 +163,13 @@ export class RWPEmbedReceipt extends LitElement font-family: monospace; } + .embed-info-drop .show-key { + text-overflow: ellipsis; + overflow: hidden; + whitespace: nowrap; + font-family: monospace; + } + .embed-globe { margin: 0.25rem; padding: 7px; @@ -177,7 +184,7 @@ export class RWPEmbedReceipt extends LitElement } render() { - let {numValid, numInvalid, domain, certFingerprint, datapackageHash, software} = this.collInfo.verify || {}; + let {numValid, numInvalid, domain, certFingerprint, datapackageHash, publicKey, software} = this.collInfo.verify || {}; numValid = numValid || 0; numInvalid = numInvalid || 0; @@ -215,11 +222,14 @@ export class RWPEmbedReceipt extends LitElement ${domain ? html`

Observed By:

${domain}

- ${certFingerprintUrl ? - html`

View Certificate

` : ""} + ${certFingerprintUrl ? html` +

View Certificate

` : ""} ` : software ? html`

Created With:

${software}

` : ""} + ${!domain && publicKey ? html` +

Observer Public Key:

+

${publicKey}

` : ``}

Validation:

${numValid > 0 || numInvalid > 0 ? html`

${numValid} hashes verified${numInvalid ? html`, ${numInvalid} invalid` : ""}

` : html`