diff --git a/src/components/atoms/CertificateDetails/CertificateDetails.js b/src/components/atoms/CertificateDetails/CertificateDetails.js index 4965d3a78..37b3ce110 100644 --- a/src/components/atoms/CertificateDetails/CertificateDetails.js +++ b/src/components/atoms/CertificateDetails/CertificateDetails.js @@ -51,7 +51,9 @@ export default function CertificateDetails ({ transactionLink, transactionId, direction, - hideRecipientName + hideRecipientName, + issuerURL, + recordLink }) { const details = []; if (!hideRecipientName) { @@ -66,10 +68,18 @@ export default function CertificateDetails ({ title: getText('text.issueDate'), value: html`` }, + { + title: getText('text.certIdURL'), + value: recordLink + }, { title: getText('text.issuerName'), value: issuerName }, + { + title: getText('text.issuerURL'), + value: issuerURL + }, { title: getText('text.issuerPublicKey'), value: issuerPublicKey diff --git a/src/components/atoms/CertificateDetails/CertificateDetailsContainer.js b/src/components/atoms/CertificateDetails/CertificateDetailsContainer.js index dde3b67f6..5e2760ad3 100644 --- a/src/components/atoms/CertificateDetails/CertificateDetailsContainer.js +++ b/src/components/atoms/CertificateDetails/CertificateDetailsContainer.js @@ -8,7 +8,9 @@ import { getIssuerPublicKey, getRecipientName, getTransactionId, - getTransactionLink + getTransactionLink, + getIssuerURL, + getRecordLink } from '../../../selectors/certificate'; export const mapStateToProps = (state) => ({ @@ -19,7 +21,9 @@ export const mapStateToProps = (state) => ({ issuerLogo: getIssuerLogo(state), transactionLink: getTransactionLink(state), transactionId: getTransactionId(state), - issuerPublicKey: getIssuerPublicKey(state) + issuerPublicKey: getIssuerPublicKey(state), + issuerURL: getIssuerURL(state), + recordLink: getRecordLink(state) }); const ownProps = { diff --git a/src/i18n/lang/en.js b/src/i18n/lang/en.js index 19b301de2..22d5d09cf 100644 --- a/src/i18n/lang/en.js +++ b/src/i18n/lang/en.js @@ -15,6 +15,7 @@ export default { blockcertsHint: 'Visit Blockcerts website', by: 'by', certified: 'Certified by', + certIdURL: 'Record URL', closeButton: 'Click to close', downloadLink: 'Download Record in JSON format', dragAndDropHint: '(you can also drag & drop your file).', @@ -23,6 +24,7 @@ export default { issueDate: 'Issue Date', issuerName: 'Issuer', issuerPublicKey: 'Issuer\'s public key', + issuerURL: 'Issuer profile URL', item: 'Item', itemPlural: 'Items', metadataButton: 'View Metadata', diff --git a/src/i18n/lang/es.js b/src/i18n/lang/es.js index 7aab88756..bc2255016 100644 --- a/src/i18n/lang/es.js +++ b/src/i18n/lang/es.js @@ -15,6 +15,7 @@ export default { blockcertsHint: 'Visite el sitio web de Blockcerts', by: 'por', certified: 'Certificado por', + certIdURL: 'URL del Registro', closeButton: 'Haz Click para cerrar', downloadLink: 'Descarga el Registro en formato JSON', dragAndDropHint: '(también puedes arrastrar y soltar tu archivo).', @@ -23,6 +24,7 @@ export default { issueDate: 'Fecha de Emisión', issuerName: 'Emisor', issuerPublicKey: 'Llave publica del Emisor', + issuerURL: 'URL del emisor', item: 'Elemento', itemPlural: 'Elementos', metadataButton: 'Ver Metadata', diff --git a/src/i18n/lang/fr.js b/src/i18n/lang/fr.js index 752beee46..c326fdd03 100644 --- a/src/i18n/lang/fr.js +++ b/src/i18n/lang/fr.js @@ -15,6 +15,7 @@ export default { blockcertsHint: 'Visiter le site de Blockcerts', by: 'par', certified: 'Certifié par', + certIdURL: 'URL du certificat', closeButton: 'Cliquer pour fermer', downloadLink: 'Télécharger le certificat au format JSON', dragAndDropHint: '(vous pouvez aussi glisser et déposer votre fichier).', @@ -23,6 +24,7 @@ export default { issueDate: 'Date d\'émission', issuerName: 'Émetteur', issuerPublicKey: 'Clé publique de l\'émetteur', + issuerURL: 'URL de l\'émetteur', item: 'point contrôlé', itemPlural: 'points contrôlés', metadataButton: 'Voir les métadata', diff --git a/src/i18n/lang/it.js b/src/i18n/lang/it.js index c58317e0a..85ad3d52a 100644 --- a/src/i18n/lang/it.js +++ b/src/i18n/lang/it.js @@ -15,6 +15,7 @@ export default { blockcertsHint: 'Visita il sito Web Blockcerts', by: 'da', certified: 'Certificato da', + certIdURL: 'Record del certificato', closeButton: 'Fai clic per chiudere', downloadLink: 'Scarica il Record in formato JSON', dragAndDropHint: '(puoi anche trascinare il file).', @@ -23,6 +24,7 @@ export default { issueDate: 'Data', issuerName: 'Organizzazione Issuer', issuerPublicKey: 'Chiave pubblica del Issuer', + issuerURL: 'Issuer profile URL', item: 'Elemento', itemPlural: 'Elementi', metadataButton: 'Visualizza Metadata', diff --git a/src/i18n/lang/mt.js b/src/i18n/lang/mt.js index 95e4b857c..682f7cb73 100644 --- a/src/i18n/lang/mt.js +++ b/src/i18n/lang/mt.js @@ -15,6 +15,7 @@ export default { blockcertsHint: 'Visit Blockcerts website', by: 'by', certified: 'Certified by', + certIdURL: 'Record URL', closeButton: 'Click to close', downloadLink: 'Download Record in JSON format', dragAndDropHint: '(you can also drag & drop your file).', @@ -23,6 +24,7 @@ export default { issueDate: 'Issue Date', issuerName: 'Issuer', issuerPublicKey: 'Issuer\'s public key', + issuerURL: 'Issuer profile URL', item: 'Item', itemPlural: 'Items', metadataButton: 'View Metadata', diff --git a/src/selectors/certificate.js b/src/selectors/certificate.js index 8e90245f1..a8c86b954 100644 --- a/src/selectors/certificate.js +++ b/src/selectors/certificate.js @@ -58,6 +58,16 @@ export function getIssuerName (state) { return ''; } +export function getIssuerURL (state) { + const certificateDefinition = getCertificateDefinition(state); + + if (certificateDefinition) { + return certificateDefinition.issuer.id; + } + + return ''; +} + export function getIssuerLogo (state) { const certificateDefinition = getCertificateDefinition(state);