From dc0651a1dd135a485e3f11e2253c847ffe1a87c3 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Fri, 13 Nov 2020 18:23:14 -0600 Subject: [PATCH] fix: Display repo links --- .../src/containers/panels/apps/AppRecords.js | 24 ++++++++++++++++--- packages/console-app/src/version.json | 4 ++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/console-app/src/containers/panels/apps/AppRecords.js b/packages/console-app/src/containers/panels/apps/AppRecords.js index b3576ee..062d949 100644 --- a/packages/console-app/src/containers/panels/apps/AppRecords.js +++ b/packages/console-app/src/containers/panels/apps/AppRecords.js @@ -9,6 +9,7 @@ import { useQuery } from '@apollo/react-hooks'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; +import Link from '@material-ui/core/Link'; import IPFS_STATUS from '../../../gql/ipfs_status.graphql'; import WNS_RECORDS from '../../../gql/wns_records.graphql'; @@ -45,22 +46,39 @@ const AppRecords = () => { Registered Names Version Name + Repository Created - {appData.sort(sorter).map(({ id, names, createTime, attributes: { name: displayName, version, package: packageLink } }) => { + {appData.sort(sorter).map(({ id, names, createTime, attributes: { name: displayName, description, version, + versionUrl, repositoryVersion, repository, homepage, package: packageLink } }) => { + const url = repository || homepage; + + // If this is a GitHub repo, it is trivial to construct the URL from the base repository and version. + if (!versionUrl && repository && repositoryVersion && repository.includes('github')) { + versionUrl = `${repository}/tree/${repositoryVersion}`.replace('-dirty', ''); + } + return ( {names.map(wrn =>
)}
- {version} + {versionUrl + ? {version} + : version + } - {displayName} + {displayName || description} + + + {url && + {url} + } {moment.utc(createTime).fromNow()} diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index 96fec0e..910b91d 100644 --- a/packages/console-app/src/version.json +++ b/packages/console-app/src/version.json @@ -1,7 +1,7 @@ { "build": { "name": "@dxos/console-app", - "buildDate": "2020-10-30T22:38:24.913Z", - "version": "1.1.0-beta.12" + "buildDate": "2020-11-14T00:20:27.039Z", + "version": "1.1.0-beta.15" } }