1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

merged compute into issue497-fetch-price-subgraph

This commit is contained in:
Bogdan Fazakas 2021-04-21 13:09:03 +03:00
commit d73b921a48
8 changed files with 43 additions and 42 deletions

14
package-lock.json generated
View File

@ -3622,14 +3622,14 @@
"integrity": "sha512-j4PEZSVtKSqxDYMVh/hd5vk088Bg6a6QkrUMTXN9Q6OIFAMfHM235f1AxaakNrEyK0FKMD908KuJEdfFLRn9Hw=="
},
"@oceanprotocol/contracts": {
"version": "0.5.14",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.14.tgz",
"integrity": "sha512-wGid/5/Ea+OLcgGa86LDLrIoyHtn2015m59LLHYpSXGD/vZTgqwkQO0Qx7LYzDRsKgAHaMVXwpACwjTDw1ratA=="
"version": "0.5.15",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.15.tgz",
"integrity": "sha512-16edzNeO2v5WLW9ClsZ9VvMH1w24fZZutCmDhZWPirCAIdojGWRHraompfICjY1fovDljnZ5MpJpffuQ6kgxOA=="
},
"@oceanprotocol/lib": {
"version": "0.14.3",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.14.3.tgz",
"integrity": "sha512-RN/NmYNiBQXtqs41iiUgcKKfXHwsewahr35LvnFzLx462MiuZwo42C8JotMy+sbK93KkHiHOiws0Yj39dpCF9w==",
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.14.4.tgz",
"integrity": "sha512-f6Wj6FLpYmuFSGtnDw0lex0Vru1tGgvZqtwrdBYtMD+hW6Bn3B51+F/9ACVYAiSRDADrqPTDZiZetT2Ji3QY7Q==",
"requires": {
"@ethereum-navigator/navigator": "^0.5.2",
"@oceanprotocol/contracts": "^0.5.10",
@ -18101,7 +18101,7 @@
}
},
"ethereumjs-abi": {
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1ce6a1d64235fabe2aaf827fd606def55693508f",
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e",
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
"requires": {
"bn.js": "^4.11.8",

View File

@ -27,7 +27,7 @@
"@coingecko/cryptoformat": "^0.4.2",
"@loadable/component": "^5.14.1",
"@oceanprotocol/art": "^3.0.0",
"@oceanprotocol/lib": "0.14.3",
"@oceanprotocol/lib": "^0.14.4",
"@oceanprotocol/typographies": "^0.1.0",
"@portis/web3": "^3.0.3",
"@sindresorhus/slugify": "^1.0.0",

View File

@ -1,9 +1,9 @@
.icon {
fill: var(--brand-grey-light);
width: 1.1em;
height: 1.1em;
fill: currentColor;
width: 1em;
height: 1em;
vertical-align: baseline;
margin-bottom: -0.2em;
margin-bottom: -0.1em;
display: inline-block;
}

View File

@ -3,6 +3,7 @@ import styles from './AssetType.module.css'
import classNames from 'classnames/bind'
import { ReactComponent as Compute } from '../../images/compute.svg'
import { ReactComponent as Download } from '../../images/download.svg'
import { ReactComponent as Lock } from '../../images/lock.svg'
const cx = classNames.bind(styles)
@ -25,6 +26,8 @@ export default function AssetType({
</div>
{accessType === 'access' ? (
<Download role="img" aria-label="Download" className={styles.icon} />
) : accessType === 'compute' && type === 'algorithm' ? (
<Lock role="img" aria-label="Private" className={styles.icon} />
) : (
<Compute role="img" aria-label="Compute" className={styles.icon} />
)}

View File

@ -289,7 +289,9 @@ export default function Compute({
ddo.id,
computeService.index,
computeAlgorithm,
marketFeeAddress
marketFeeAddress,
undefined,
false
)
assetOrderId &&

View File

@ -1,25 +1,18 @@
.meta {
margin-bottom: calc(var(--spacer) / 1.5);
color: var(--color-secondary);
font-size: var(--font-size-small);
}
.meta p {
margin-bottom: 0;
}
.date {
.published {
margin-top: calc(var(--spacer) / 2);
font-size: var(--font-size-small);
}
.typeAndDate {
margin-bottom: calc(var(--spacer) / 12);
display: flex;
}
.typeDetails {
border-right: 1px solid var(--border-color);
padding-right: calc(var(--spacer) / 3.5);
margin-right: calc(var(--spacer) / 4);
width: auto;
font-size: var(--font-size-small);
.updated {
font-size: var(--font-size-mini);
}

View File

@ -15,22 +15,7 @@ export default function MetaMain(): ReactElement {
return (
<aside className={styles.meta}>
<div className={styles.typeAndDate}>
<AssetType
type={type}
accessType={accessType}
className={styles.typeDetails}
/>
<p className={styles.date}>
<Time date={ddo?.created} relative />
{ddo?.created !== ddo?.updated && (
<>
{' — '}
updated <Time date={ddo?.updated} relative />
</>
)}
</p>
</div>
<AssetType type={type} accessType={accessType} />
<p>
<ExplorerLink
networkId={networkId}
@ -43,7 +28,21 @@ export default function MetaMain(): ReactElement {
{`${ddo?.dataTokenInfo.name}${ddo?.dataTokenInfo.symbol}`}
</ExplorerLink>
</p>
Published By <Publisher account={owner} />
<div className={styles.published}>
Published By <Publisher account={owner} />
<p>
<Time date={ddo?.created} relative />
{ddo?.created !== ddo?.updated && (
<>
{' — '}
<span className={styles.updated}>
updated <Time date={ddo?.updated} relative />
</span>
</>
)}
</p>
</div>
</aside>
)
}

4
src/images/lock.svg Normal file
View File

@ -0,0 +1,4 @@
<svg width="15" height="20" viewBox="0 0 15 20" xmlns="http://www.w3.org/2000/svg">
<path d="M8 13.9146C8.5826 13.7087 9 13.1531 9 12.5C9 11.6716 8.32843 11 7.5 11C6.67157 11 6 11.6716 6 12.5C6 13.1531 6.4174 13.7087 7 13.9146V17H8V13.9146Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 8V5.18395C13 2.33746 10.3486 0 7.5 0C4.65139 0 2 2.33746 2 5.18395V8H0.775862C0.347365 8 0 8.56848 0 8.99331V19.2308C0 19.6556 0.347365 20 0.775862 20H14.2241C14.6526 20 15 19.6556 15 19.2308V8.99331C15 8.56848 14.6526 8 14.2241 8H13ZM7.5 2C5.54204 2 4 3.15337 4 5.18395V8H11V5.18395C11 3.15337 9.45796 2 7.5 2ZM2 10V18H13V10H2Z" />
</svg>

After

Width:  |  Height:  |  Size: 638 B