Remove all tags on create dialogs (#1348)
This commit is contained in:
parent
976af39f3e
commit
f9a28fc6ea
@ -13,7 +13,7 @@ import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { DEV_PHRASE } from '@polkadot/keyring/defaults';
|
||||
import { withApi, withMulti } from '@polkadot/ui-api';
|
||||
import { AddressRow, Button, Dropdown, Input, InputTags, Labelled, Modal, Password } from '@polkadot/ui-app';
|
||||
import { AddressRow, Button, Dropdown, Input, Labelled, Modal, Password } from '@polkadot/ui-app';
|
||||
import { InputAddress } from '@polkadot/ui-app/InputAddress';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
import uiSettings from '@polkadot/ui-settings';
|
||||
@ -151,7 +151,7 @@ class Create extends React.PureComponent<Props, State> {
|
||||
|
||||
private renderInput () {
|
||||
const { t } = this.props;
|
||||
const { address, deriveError, derivePath, isNameValid, isPassValid, isSeedValid, name, pairType, password, seed, seedOptions, seedType, tags } = this.state;
|
||||
const { address, deriveError, derivePath, isNameValid, isPassValid, isSeedValid, name, pairType, password, seed, seedOptions, seedType } = this.state;
|
||||
const seedLabel = (() => {
|
||||
switch (seedType) {
|
||||
case 'bip':
|
||||
@ -205,12 +205,6 @@ class Create extends React.PureComponent<Props, State> {
|
||||
onEnter={this.onCommit}
|
||||
value={password}
|
||||
/>
|
||||
<InputTags
|
||||
help={t('Additional user-specified tags that can be used to identify the account. Tags can be used for categorization and filtering.')}
|
||||
label={t('user-defined tags')}
|
||||
onChange={this.onChangeTags}
|
||||
value={tags}
|
||||
/>
|
||||
<details
|
||||
className='accounts--Creator-advanced'
|
||||
open
|
||||
@ -392,10 +386,6 @@ class Create extends React.PureComponent<Props, State> {
|
||||
this.nextState({ seed } as State);
|
||||
}
|
||||
|
||||
private onChangeTags = (tags: Array<string>): void => {
|
||||
this.setState({ tags });
|
||||
}
|
||||
|
||||
private onShowWarning = (): void => {
|
||||
this.nextState({ showWarning: true } as State);
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import { ModalProps } from '../types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { AddressRow, Button, Input, InputTags, Modal } from '@polkadot/ui-app';
|
||||
import { AddressRow, Button, Input, Modal } from '@polkadot/ui-app';
|
||||
import { InputAddress } from '@polkadot/ui-app/InputAddress';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
|
||||
@ -76,7 +76,7 @@ class Create extends React.PureComponent<Props, State> {
|
||||
|
||||
private renderContent () {
|
||||
const { t } = this.props;
|
||||
const { address, isAddressValid, isNameValid, name, tags } = this.state;
|
||||
const { address, isAddressValid, isNameValid, name } = this.state;
|
||||
|
||||
return (
|
||||
<Modal.Content>
|
||||
@ -103,12 +103,6 @@ class Create extends React.PureComponent<Props, State> {
|
||||
onEnter={this.onCommit}
|
||||
value={name}
|
||||
/>
|
||||
<InputTags
|
||||
help={t('Additional user-specified tags that can be used to identify the address. Tags can be used for categorization and filtering.')}
|
||||
label={t('user-defined tags')}
|
||||
onChange={this.onChangeTags}
|
||||
value={tags}
|
||||
/>
|
||||
</AddressRow>
|
||||
</Modal.Content>
|
||||
);
|
||||
@ -179,10 +173,6 @@ class Create extends React.PureComponent<Props, State> {
|
||||
this.nextState({ name } as State, true);
|
||||
}
|
||||
|
||||
private onChangeTags = (tags: Array<string>): void => {
|
||||
this.setState({ tags });
|
||||
}
|
||||
|
||||
private onCommit = (): void => {
|
||||
const { onClose, onStatusChange, t } = this.props;
|
||||
const { address, isAddressExisting, isValid, name, tags } = this.state;
|
||||
|
||||
@ -53,7 +53,6 @@ class Add extends ContractModal<Props, State> {
|
||||
onChange={this.onValidateCode}
|
||||
/>
|
||||
{this.renderInputName()}
|
||||
{this.renderInputTags()}
|
||||
{this.renderInputAbi()}
|
||||
</>
|
||||
);
|
||||
|
||||
@ -57,7 +57,6 @@ class Upload extends ContractModal<Props, State> {
|
||||
}
|
||||
/>
|
||||
{this.renderInputName()}
|
||||
{this.renderInputTags()}
|
||||
{this.renderInputAbi()}
|
||||
{this.renderInputGas()}
|
||||
</>
|
||||
|
||||
@ -63,7 +63,6 @@ class Add extends ContractModal<Props, State> {
|
||||
onChange={this.onValidateAddr}
|
||||
/>
|
||||
{this.renderInputName()}
|
||||
{this.renderInputTags()}
|
||||
{this.renderInputAbi()}
|
||||
</AddressRow>
|
||||
);
|
||||
|
||||
@ -92,7 +92,6 @@ class Deploy extends ContractModal<Props, State> {
|
||||
value={codeHash}
|
||||
/>
|
||||
{this.renderInputName()}
|
||||
{this.renderInputTags()}
|
||||
{
|
||||
isAbiSupplied
|
||||
? null
|
||||
|
||||
@ -7,7 +7,7 @@ import { I18nProps } from '@polkadot/ui-app/types';
|
||||
import BN from 'bn.js';
|
||||
import React from 'react';
|
||||
import { Abi } from '@polkadot/api-contract';
|
||||
import { Button, Input, InputAddress, InputNumber, InputTags, Modal, TxComponent } from '@polkadot/ui-app';
|
||||
import { Button, Input, InputAddress, InputNumber, Modal, TxComponent } from '@polkadot/ui-app';
|
||||
|
||||
import ABI from './ABI';
|
||||
|
||||
@ -147,21 +147,6 @@ class ContractModal<P extends ContractModalProps, S extends ContractModalState>
|
||||
);
|
||||
}
|
||||
|
||||
protected renderInputTags () {
|
||||
const { t } = this.props;
|
||||
const { isBusy, tags } = this.state;
|
||||
|
||||
return (
|
||||
<InputTags
|
||||
help={t(`Additional user-specified tags. Tags can be used for categorization and filtering.`)}
|
||||
isDisabled={isBusy}
|
||||
label={t('user-defined tags')}
|
||||
onChange={this.onChangeTags}
|
||||
value={tags}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
protected renderInputGas () {
|
||||
const { t } = this.props;
|
||||
const { gasLimit, isBusy } = this.state;
|
||||
@ -228,10 +213,6 @@ class ContractModal<P extends ContractModalProps, S extends ContractModalState>
|
||||
this.setState({ name, isNameValid: name.length !== 0 });
|
||||
}
|
||||
|
||||
protected onChangeTags = (tags: Array<string>): void => {
|
||||
this.setState({ tags });
|
||||
}
|
||||
|
||||
protected onChangeGas = (gasLimit: BN | undefined): void => {
|
||||
this.setState({ gasLimit: gasLimit || new BN(0) });
|
||||
}
|
||||
|
||||
@ -26,8 +26,11 @@ export const styles = `
|
||||
}
|
||||
|
||||
&.invalid {
|
||||
filter: grayscale(100);
|
||||
opacity: 0.5;
|
||||
.ui--Row-accountId,
|
||||
.ui--Row-icon {
|
||||
filter: grayscale(100);
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
button.ui.icon.editButton {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user