• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-dashboard: Commit

dashboard of Bytom


Commit MetaInfo

Révisione56b0e138c0128014cf0a95dd40951106914206f (tree)
l'heure2019-10-23 17:00:22
AuteurZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Message de Log

update the chain transaction switcher for cross chain and vote.

Change Summary

Modification

--- a/src/features/transactions/components/New/CrossChain/CrossChainConfirmModal/CrossChainConfirmModal.jsx
+++ b/src/features/transactions/components/New/CrossChain/CrossChainConfirmModal/CrossChainConfirmModal.jsx
@@ -143,6 +143,7 @@ export default withNamespaces('translations') (reduxForm({
143143 'amount',
144144 'address',
145145 'gasLevel',
146+ 'isChainTx',
146147 'password'
147148 ],
148149 destroyOnUnmount: false,
--- a/src/features/transactions/components/New/CrossChain/CrossChainTransaction.jsx
+++ b/src/features/transactions/components/New/CrossChain/CrossChainTransaction.jsx
@@ -72,7 +72,7 @@ class CrossChainTransaction extends React.Component {
7272
7373 render() {
7474 const {
75- fields: {accountId, accountAlias,assetAlias, assetId, amount, address, gasLevel},
75+ fields: {accountId, accountAlias,assetAlias, assetId, amount, address, gasLevel, isChainTx},
7676 error,
7777 submitting
7878 } = this.props
@@ -137,6 +137,20 @@ class CrossChainTransaction extends React.Component {
137137 <TextField title={t('transaction.crossChain.address')} fieldProps={address} hint={t('transaction.crossChain.addressHint', {id: net})}/>
138138 </div>
139139
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>]}
140154
141155 {this.state.displayGas && [<label className={styles.title}>{t('transaction.normal.selectFee')}</label>,
142156 <div className={styles.txFeeBox}>
@@ -227,6 +241,7 @@ export default withNamespaces('translations') (BaseNew.connect(
227241 'amount',
228242 'address',
229243 'gasLevel',
244+ 'isChainTx'
230245 ],
231246 validate,
232247 touchOnChange: true
--- a/src/features/transactions/components/New/Vote.jsx
+++ b/src/features/transactions/components/New/Vote.jsx
@@ -73,11 +73,11 @@ class Vote extends React.Component {
7373
7474 render() {
7575 const {
76- fields: {action, accountId, accountAlias, nodePubkey, amount, gasLevel},
76+ fields: {action, accountId, accountAlias, nodePubkey, amount, gasLevel, isChainTx},
7777 error,
7878 submitting
7979 } = this.props
80- const t = this.props.t;
80+ const t = this.props.t
8181
8282 let submitLabel = t(`transaction.vote.${action.value}.submit`)
8383
@@ -127,6 +127,20 @@ class Vote extends React.Component {
127127 </div>
128128 </div>
129129
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>
130144
131145 {this.state.displayGas && [<label className={styles.title}>{t('transaction.normal.selectFee')}</label>,
132146 <div className={styles.txFeeBox}>
@@ -196,6 +210,7 @@ export default withNamespaces('translations') (BaseNew.connect(
196210 'nodePubkey',
197211 'amount',
198212 'gasLevel',
213+ 'isChainTx'
199214 ],
200215 validate,
201216 touchOnChange: true
--- a/src/features/transactions/components/New/VoteConfirmModal/VoteConfirmModal.jsx
+++ b/src/features/transactions/components/New/VoteConfirmModal/VoteConfirmModal.jsx
@@ -122,6 +122,7 @@ export default withNamespaces('translations') (reduxForm({
122122 'nodePubkey',
123123 'amount',
124124 'gasLevel',
125+ 'isChainTx',
125126 'password'
126127 ],
127128 destroyOnUnmount: false,
Afficher sur ancien navigateur de dépôt.