From 7a8a5a5fcd65aab345e105529b0b3e8031821909 Mon Sep 17 00:00:00 2001 From: KY Lau Date: Fri, 11 Jun 2021 13:52:22 +0800 Subject: [PATCH] Enhance UI --- content/pages/editAdvancedSettings.json | 16 ++++++++-------- src/components/atoms/Input/InputElement.tsx | 6 +++--- .../molecules/FormFields/Credential/index.tsx | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/pages/editAdvancedSettings.json b/content/pages/editAdvancedSettings.json index 99a2abe3f..1e2282a30 100644 --- a/content/pages/editAdvancedSettings.json +++ b/content/pages/editAdvancedSettings.json @@ -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": { "success": "🎉 Successfully updated. 🎉", "successAction": "Close", @@ -7,22 +7,22 @@ "data": [ { "name": "allow", - "label": "Allow Credential", + "label": "Allow ETH Address", "placeholder": "e.g. 0x12345678901234567890abcd", - "help": "Enter wallet address and click ADD button to append the list", - "type": "credential" + "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": "credentials" }, { "name": "deny", - "label": "Deny Credential", + "label": "Deny ETH Address", "placeholder": "e.g. 0x12345678901234567890abcd", - "help": "Enter wallet address and click ADD button to append the list", - "type": "credential" + "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": "credentials" }, { "name": "isOrderDisabled", "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", "options": ["Disable"] } diff --git a/src/components/atoms/Input/InputElement.tsx b/src/components/atoms/Input/InputElement.tsx index f3e65d772..966407381 100644 --- a/src/components/atoms/Input/InputElement.tsx +++ b/src/components/atoms/Input/InputElement.tsx @@ -12,7 +12,7 @@ import classNames from 'classnames/bind' import AssetSelection, { AssetSelectionAsset } from '../../molecules/FormFields/AssetSelection' -import Credential from '../../molecules/FormFields/Credential' +import Credentials from '../../molecules/FormFields/Credential' const cx = classNames.bind(styles) @@ -138,8 +138,8 @@ export default function InputElement({ {...props} /> ) - case 'credential': - return + case 'credentials': + return default: return prefix || postfix ? (
diff --git a/src/components/molecules/FormFields/Credential/index.tsx b/src/components/molecules/FormFields/Credential/index.tsx index 17612aaef..2afc39420 100644 --- a/src/components/molecules/FormFields/Credential/index.tsx +++ b/src/components/molecules/FormFields/Credential/index.tsx @@ -8,7 +8,7 @@ import { isAddress } from 'web3-utils' import { toast } from 'react-toastify' 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 [arrayInput, setArrayInput] = useState(field.value || []) const [value, setValue] = useState('')