1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 17:24:51 +01:00

Merge pull request #143 from oceanprotocol/fix/removeLicense

remove license
This commit is contained in:
Matthias Kretschmann 2020-10-27 13:18:08 +01:00 committed by GitHub
commit 7053530160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3 additions and 51 deletions

View File

@ -54,40 +54,12 @@
"help": "Give proper attribution for your data set.",
"required": true
},
{
"name": "copyrightHolder",
"label": "Copyright Holder",
"placeholder": "e.g. Marine Institute of Jellyfish",
"help": "Add this if the holder of the copyright is different from the author."
},
{
"name": "tags",
"label": "Tags",
"placeholder": "e.g. logistics, ai",
"help": "Separate tags with comma."
},
{
"name": "license",
"label": "License",
"type": "select",
"options": [
"Public Domain",
"PDDL: Public Domain Dedication and License",
"ODC-By: Attribution License",
"ODC-ODbL: Open Database License",
"CDLA-Sharing: Community Data License Agreement",
"CDLA-Permissive: Community Data License Agreement",
"CC0: Public Domain Dedication",
"CC BY: Attribution 4.0 International",
"CC BY-SA: Attribution-ShareAlike 4.0 International",
"CC BY-ND: Attribution-NoDerivatives 4.0 International",
"CC BY-NC: Attribution-NonCommercial 4.0 International",
"CC BY-NC-SA: Attribution-NonCommercial-ShareAlike 4.0 International",
"CC BY-NC-ND: Attribution-NonCommercial-NoDerivatives 4.0 International",
"No License Specified"
],
"required": true
},
{
"name": "termsAndConditions",
"label": "Terms & Conditions",

View File

@ -30,12 +30,10 @@ export interface MetadataPublishForm {
description: string
files: string | File[]
author: string
license: string
dataTokenOptions: DataTokenOptions
access: 'Download' | 'Compute' | string
termsAndConditions: boolean
// ---- optional fields ----
copyrightHolder?: string
tags?: string
links?: string | File[]
}

View File

@ -13,19 +13,11 @@ export default function MetaFull({
metadata: MetadataMarket
}): ReactElement {
const { id } = ddo
const { dateCreated, datePublished, license } = metadata.main
const { dateCreated, datePublished } = metadata.main
return (
<div className={styles.metaFull}>
<MetaItem title="Author" content={metadata?.main.author} />
{metadata?.additionalInformation?.copyrightHolder && (
<MetaItem
title="Copyright Holder"
content={metadata?.additionalInformation?.copyrightHolder}
/>
)}
<MetaItem title="License" content={license} />
{metadata?.additionalInformation?.categories && (
<MetaItem

View File

@ -39,10 +39,7 @@ export default function AssetContent({
<div className={styles.content}>
<aside className={styles.meta}>
<p className={styles.author}>
{metadata?.additionalInformation?.copyrightHolder ||
metadata?.main.author}
</p>
<p className={styles.author}>{metadata?.main.author}</p>
<p className={styles.datatoken}>
<EtherscanLink

View File

@ -17,9 +17,7 @@ export function transformPublishFormToMetadata(
const {
name,
author,
license,
description,
copyrightHolder,
tags,
links,
termsAndConditions,
@ -34,12 +32,11 @@ export function transformPublishFormToMetadata(
dateCreated: currentTime,
datePublished: currentTime,
files: typeof files !== 'string' && files,
license
license: 'https://market.oceanprotocol.com/terms'
},
additionalInformation: {
...AssetModel.additionalInformation,
description,
copyrightHolder,
tags: transformTags(tags),
links: typeof links !== 'string' && links,
termsAndConditions

View File

@ -14,14 +14,12 @@ export const validationSchema = Yup.object().shape<MetadataPublishForm>({
.required('Required'),
files: Yup.array<FileMetadata>().required('Required').nullable(),
description: Yup.string().required('Required'),
license: Yup.string().required('Required'),
access: Yup.string()
.matches(/Compute|Download/g)
.required('Required'),
termsAndConditions: Yup.boolean().required('Required'),
// ---- optional fields ----
copyrightHolder: Yup.string().nullable(),
tags: Yup.string().nullable(),
links: Yup.object<FileMetadata[]>().nullable()
})
@ -35,7 +33,6 @@ export const initialValues: Partial<MetadataPublishForm> = {
},
files: '',
description: '',
license: '',
access: '',
termsAndConditions: false
}

View File

@ -3,7 +3,6 @@ import { MetadataPublishForm } from '../../../src/@types/MetaData'
const testFormData: MetadataPublishForm = {
author: '',
files: [],
license: '',
dataTokenOptions: {
name: '',
symbol: ''