mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Enhance UI
This commit is contained in:
parent
96131cba7d
commit
7a8a5a5fcd
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"description": "Update credential of this data set. Updating metadata will create an on-chain transaction you have to approve in your wallet.",
|
"description": "Update advanced settings of this data set. Updating these settings will create an on-chain transaction you have to approve in your wallet.",
|
||||||
"form": {
|
"form": {
|
||||||
"success": "🎉 Successfully updated. 🎉",
|
"success": "🎉 Successfully updated. 🎉",
|
||||||
"successAction": "Close",
|
"successAction": "Close",
|
||||||
@ -7,22 +7,22 @@
|
|||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
"name": "allow",
|
"name": "allow",
|
||||||
"label": "Allow Credential",
|
"label": "Allow ETH Address",
|
||||||
"placeholder": "e.g. 0x12345678901234567890abcd",
|
"placeholder": "e.g. 0x12345678901234567890abcd",
|
||||||
"help": "Enter wallet address and click ADD button to append the list",
|
"help": "Enter ETH address and click ADD button to append the list. Only ETH address in allow list can consume this asset. If the list is empty means anyone can download or compute this asset",
|
||||||
"type": "credential"
|
"type": "credentials"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "deny",
|
"name": "deny",
|
||||||
"label": "Deny Credential",
|
"label": "Deny ETH Address",
|
||||||
"placeholder": "e.g. 0x12345678901234567890abcd",
|
"placeholder": "e.g. 0x12345678901234567890abcd",
|
||||||
"help": "Enter wallet address and click ADD button to append the list",
|
"help": "Enter ETH address and click ADD button to append the list. If ETH address is fall under deny list, download or compute of this asset is denied",
|
||||||
"type": "credential"
|
"type": "credentials"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "isOrderDisabled",
|
"name": "isOrderDisabled",
|
||||||
"label": "Disable Consumption",
|
"label": "Disable Consumption",
|
||||||
"help": "Disable dataset being consume when dataset undergoing maintenance.",
|
"help": "Disable dataset being download or compute when dataset undergoing maintenance.",
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"options": ["Disable"]
|
"options": ["Disable"]
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import classNames from 'classnames/bind'
|
|||||||
import AssetSelection, {
|
import AssetSelection, {
|
||||||
AssetSelectionAsset
|
AssetSelectionAsset
|
||||||
} from '../../molecules/FormFields/AssetSelection'
|
} from '../../molecules/FormFields/AssetSelection'
|
||||||
import Credential from '../../molecules/FormFields/Credential'
|
import Credentials from '../../molecules/FormFields/Credential'
|
||||||
|
|
||||||
const cx = classNames.bind(styles)
|
const cx = classNames.bind(styles)
|
||||||
|
|
||||||
@ -138,8 +138,8 @@ export default function InputElement({
|
|||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
case 'credential':
|
case 'credentials':
|
||||||
return <Credential name={name} {...field} {...props} />
|
return <Credentials name={name} {...field} {...props} />
|
||||||
default:
|
default:
|
||||||
return prefix || postfix ? (
|
return prefix || postfix ? (
|
||||||
<div className={`${prefix ? styles.prefixGroup : styles.postfixGroup}`}>
|
<div className={`${prefix ? styles.prefixGroup : styles.postfixGroup}`}>
|
||||||
|
@ -8,7 +8,7 @@ import { isAddress } from 'web3-utils'
|
|||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
import { ReactComponent as Cross } from '../../../../images/cross.svg'
|
import { ReactComponent as Cross } from '../../../../images/cross.svg'
|
||||||
|
|
||||||
export default function Credential(props: InputProps) {
|
export default function Credentials(props: InputProps) {
|
||||||
const [field, meta, helpers] = useField(props.name)
|
const [field, meta, helpers] = useField(props.name)
|
||||||
const [arrayInput, setArrayInput] = useState<string[]>(field.value || [])
|
const [arrayInput, setArrayInput] = useState<string[]>(field.value || [])
|
||||||
const [value, setValue] = useState('')
|
const [value, setValue] = useState('')
|
||||||
|
Loading…
Reference in New Issue
Block a user