dashboard of Bytom
Révision | e56b0e138c0128014cf0a95dd40951106914206f (tree) |
---|---|
l'heure | 2019-10-23 17:00:22 |
Auteur | Zhiting Lin <zlin035@uott...> |
Commiter | Zhiting Lin |
update the chain transaction switcher for cross chain and vote.
@@ -143,6 +143,7 @@ export default withNamespaces('translations') (reduxForm({ | ||
143 | 143 | 'amount', |
144 | 144 | 'address', |
145 | 145 | 'gasLevel', |
146 | + 'isChainTx', | |
146 | 147 | 'password' |
147 | 148 | ], |
148 | 149 | destroyOnUnmount: false, |
@@ -72,7 +72,7 @@ class CrossChainTransaction extends React.Component { | ||
72 | 72 | |
73 | 73 | render() { |
74 | 74 | const { |
75 | - fields: {accountId, accountAlias,assetAlias, assetId, amount, address, gasLevel}, | |
75 | + fields: {accountId, accountAlias,assetAlias, assetId, amount, address, gasLevel, isChainTx}, | |
76 | 76 | error, |
77 | 77 | submitting |
78 | 78 | } = this.props |
@@ -137,6 +137,20 @@ class CrossChainTransaction extends React.Component { | ||
137 | 137 | <TextField title={t('transaction.crossChain.address')} fieldProps={address} hint={t('transaction.crossChain.addressHint', {id: net})}/> |
138 | 138 | </div> |
139 | 139 | |
140 | + {showBtmAmountUnit && [<label className={styles.title}>{t('transaction.new.submitType')}</label>, | |
141 | + <div className={styles.submitSwitchSet}> | |
142 | + <div className={styles.submitSwitch}> | |
143 | + <div className={styles.label}>{t('transaction.new.chainTx')}</div> | |
144 | + <label className={styles.switch}> | |
145 | + <input | |
146 | + type='checkbox' | |
147 | + {...isChainTx} | |
148 | + /> | |
149 | + <span className={styles.slider}></span> | |
150 | + </label> | |
151 | + </div> | |
152 | + <div>{t('transaction.new.chainTxNote')}</div> | |
153 | + </div>]} | |
140 | 154 | |
141 | 155 | {this.state.displayGas && [<label className={styles.title}>{t('transaction.normal.selectFee')}</label>, |
142 | 156 | <div className={styles.txFeeBox}> |
@@ -227,6 +241,7 @@ export default withNamespaces('translations') (BaseNew.connect( | ||
227 | 241 | 'amount', |
228 | 242 | 'address', |
229 | 243 | 'gasLevel', |
244 | + 'isChainTx' | |
230 | 245 | ], |
231 | 246 | validate, |
232 | 247 | touchOnChange: true |
@@ -73,11 +73,11 @@ class Vote extends React.Component { | ||
73 | 73 | |
74 | 74 | render() { |
75 | 75 | const { |
76 | - fields: {action, accountId, accountAlias, nodePubkey, amount, gasLevel}, | |
76 | + fields: {action, accountId, accountAlias, nodePubkey, amount, gasLevel, isChainTx}, | |
77 | 77 | error, |
78 | 78 | submitting |
79 | 79 | } = this.props |
80 | - const t = this.props.t; | |
80 | + const t = this.props.t | |
81 | 81 | |
82 | 82 | let submitLabel = t(`transaction.vote.${action.value}.submit`) |
83 | 83 |
@@ -127,6 +127,20 @@ class Vote extends React.Component { | ||
127 | 127 | </div> |
128 | 128 | </div> |
129 | 129 | |
130 | + <label className={styles.title}>{t('transaction.new.submitType')}</label> | |
131 | + <div className={styles.submitSwitchSet}> | |
132 | + <div className={styles.submitSwitch}> | |
133 | + <div className={styles.label}>{t('transaction.new.chainTx')}</div> | |
134 | + <label className={styles.switch}> | |
135 | + <input | |
136 | + type='checkbox' | |
137 | + {...isChainTx} | |
138 | + /> | |
139 | + <span className={styles.slider}></span> | |
140 | + </label> | |
141 | + </div> | |
142 | + <div>{t('transaction.new.chainTxNote')}</div> | |
143 | + </div> | |
130 | 144 | |
131 | 145 | {this.state.displayGas && [<label className={styles.title}>{t('transaction.normal.selectFee')}</label>, |
132 | 146 | <div className={styles.txFeeBox}> |
@@ -196,6 +210,7 @@ export default withNamespaces('translations') (BaseNew.connect( | ||
196 | 210 | 'nodePubkey', |
197 | 211 | 'amount', |
198 | 212 | 'gasLevel', |
213 | + 'isChainTx' | |
199 | 214 | ], |
200 | 215 | validate, |
201 | 216 | touchOnChange: true |
@@ -122,6 +122,7 @@ export default withNamespaces('translations') (reduxForm({ | ||
122 | 122 | 'nodePubkey', |
123 | 123 | 'amount', |
124 | 124 | 'gasLevel', |
125 | + 'isChainTx', | |
125 | 126 | 'password' |
126 | 127 | ], |
127 | 128 | destroyOnUnmount: false, |