diff --git a/content/pages/publish.json b/content/pages/publish.json index 11300e99d..1f397cd7a 100644 --- a/content/pages/publish.json +++ b/content/pages/publish.json @@ -100,14 +100,16 @@ "price": { "fixed": { "title": "Fixed", - "info": "Set your price for accessing this data set. A Data Token for this data set, worth the entered amount of OCEAN, will be created." + "info": "Set your price for accessing this data set. A Datatoken for this data set, worth the entered amount of OCEAN, will be created." }, "dynamic": { "title": "Dynamic", - "info": "Let's create a decentralized, automated market for your data set. A Data Token for this data set, worth the entered amount of OCEAN, will be created. Additionally, you will provide liquidity into a Data Token/OCEAN liquidity pool with Balancer.", + "info": "Let's create a decentralized, automated market for your data set. A Datatoken for this data set, worth the entered amount of OCEAN, will be created. Additionally, you will provide liquidity into a OCEAN/Datatoken liquidity pool with Balancer.", "tooltips": { - "poolInfo": "Help me", - "liquidityProviderFee": "Help me" + "poolInfo": "Explain what is going on here...", + "liquidityProviderFee": "Explain liquidity provider fee...", + "communityFee": "Explain community fee...", + "marketplaceFee": "Explain marketplace fee..." } } } diff --git a/src/@types/MetaData.d.ts b/src/@types/MetaData.d.ts index df787238c..8edf13e62 100644 --- a/src/@types/MetaData.d.ts +++ b/src/@types/MetaData.d.ts @@ -4,7 +4,7 @@ import { AdditionalInformation, ServiceMetadata } from '@oceanprotocol/lib' -import { PriceOptions } from '@oceanprotocol/react' +import { PriceOptions, DataTokenOptions } from '@oceanprotocol/react' export interface AdditionalInformationMarket extends AdditionalInformation { links?: File[] @@ -13,7 +13,17 @@ export interface AdditionalInformationMarket extends AdditionalInformation { } export interface MetadataMarket extends Metadata { - additionalInformation: AdditionalInformationMarket + // While required for this market, Aquarius/Plecos will keep this as optional + // allowing external pushes of assets without `additionalInformation`. + // Making it optional here helps safeguarding against those assets. + additionalInformation?: AdditionalInformationMarket +} + +export interface PriceOptionsMarket extends PriceOptions { + // easier to keep this as number for Yup input validation + liquidityProviderFee: number + // collect datatoken info for publishing + datatoken?: DataTokenOptions } export interface MetadataPublishForm { @@ -23,7 +33,7 @@ export interface MetadataPublishForm { files: string | File[] author: string license: string - price: PriceOptions + price: PriceOptionsMarket access: 'Download' | 'Compute' | string termsAndConditions: boolean // ---- optional fields ---- diff --git a/src/components/atoms/Input/InputElement.module.css b/src/components/atoms/Input/InputElement.module.css index 132db0897..902d55ef7 100644 --- a/src/components/atoms/Input/InputElement.module.css +++ b/src/components/atoms/Input/InputElement.module.css @@ -38,6 +38,15 @@ color: var(--brand-grey-light); cursor: not-allowed; pointer-events: none; + /* for hiding spin buttons in Firefox */ + -moz-appearance: textfield; +} + +.input[readonly]::-webkit-inner-spin-button, +.input[disabled]::-webkit-inner-spin-button, +.input[readonly]::-webkit-outer-spin-button, +.input[disabled]::-webkit-outer-spin-button { + display: none; } .select { @@ -207,6 +216,12 @@ font-size: var(--font-size-small); } +.prefix.small, +.postfix.small { + min-height: 34px; + font-size: var(--font-size-mini); +} + .selectSmall { composes: small; height: 34px; diff --git a/src/components/atoms/Input/InputElement.tsx b/src/components/atoms/Input/InputElement.tsx index eeb986242..8e106d005 100644 --- a/src/components/atoms/Input/InputElement.tsx +++ b/src/components/atoms/Input/InputElement.tsx @@ -6,8 +6,12 @@ import FilesInput from '../../molecules/FormFields/FilesInput' import Terms from '../../molecules/FormFields/Terms' import Price from '../../molecules/FormFields/Price' -const DefaultInput = (props: InputProps) => ( - +const DefaultInput = ({ small, ...props }: InputProps) => ( + ) export default function InputElement({ @@ -18,6 +22,10 @@ export default function InputElement({ postfix, small, field, + label, + help, + form, + additionalComponent, ...props }: InputProps): ReactElement { switch (type) { @@ -75,12 +83,30 @@ export default function InputElement({ default: return prefix || postfix ? (
-)}{JSON.stringify(field.value)}
+{JSON.stringify(field.value, null, 2)}
You will earn
-{dataToken}
}
diff --git a/src/components/organisms/AssetContent/MetaSecondary.tsx b/src/components/organisms/AssetContent/MetaSecondary.tsx
index cf4619628..152333fa0 100644
--- a/src/components/organisms/AssetContent/MetaSecondary.tsx
+++ b/src/components/organisms/AssetContent/MetaSecondary.tsx
@@ -10,7 +10,6 @@ export default function MetaSecondary({
}: {
metadata: MetadataMarket
}): ReactElement {
- console.log(metadata)
return (