OSDN Git Service

page improved
authorZhiting Lin <zlin035@uottawa.ca>
Thu, 19 Apr 2018 08:58:13 +0000 (16:58 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Thu, 19 Apr 2018 08:58:13 +0000 (16:58 +0800)
src/features/app/components/Register/Register.jsx
src/features/app/components/Sync/Sync.jsx
src/features/mockhsm/components/List.jsx
src/features/mockhsm/components/Show.jsx
src/features/transactions/components/ListItem/ListItem.jsx
src/features/transactions/components/Summary/Summary.jsx
src/utility/environment.js

index 1bfdb16..5ca0ee3 100644 (file)
@@ -20,7 +20,6 @@ class Register extends React.Component {
   }
 
   render() {
-    let logo = require('images/logo-bytom-white.svg')
     const lang =this.props.lang
 
     const {
@@ -32,15 +31,18 @@ class Register extends React.Component {
 
     return (
       <div className={styles.main}>
-        {/*<img className={styles.image} src={logo} />*/}
         <h2 className={styles.title}>{lang==='zh'? '初始账户和密钥':'Init your account and key'}</h2>
         <div className={styles.form}>
           <form onSubmit={handleSubmit(this.submitWithErrors)}>
             <TextField
+              title={lang==='zh'? '账户别名':'Account Alias'}
+              placeholder={lang==='zh'? '请输入账户别名...':'Please enter the account alias...'}
+              fieldProps={accountAlias}
+              autoFocus={true} />
+            <TextField
               title={lang==='zh'? '密钥别名':'Key Alias'}
               placeholder={lang==='zh'? '请输入密钥别名...':'Please enter the key alias...'}
-              fieldProps={keyAlias}
-              autoFocus={true} />
+              fieldProps={keyAlias} />
             <TextField
               title={lang==='zh'? '密码':'Password'}
               placeholder={lang==='zh'? '请输入密钥密码...':'Please enter the key password...'}
@@ -51,10 +53,6 @@ class Register extends React.Component {
               placeholder={lang==='zh'? '请重复输入密钥密码...':'Please repeat the key password...'}
               fieldProps={repeatPassword}
               type='password' />
-            <TextField
-              title={lang==='zh'? '账户别名':'Account Alias'}
-              placeholder={lang==='zh'? '请输入账户别名...':'Please enter the account alias...'}
-              fieldProps={accountAlias} />
 
             {error &&
               <ErrorBanner
index 2941980..3a0a0f3 100644 (file)
@@ -18,8 +18,7 @@ class Sync extends React.Component {
 
     if (syncing) {
       return <ul className={`${navStyles.navigation} ${styles.main}`}>
-        <li key='sync-networkID' className={navStyles.navigationTitle}>{ networkID }</li>
-        <li key='sync-title' className={navStyles.navigationTitle}>{ lang === 'zh' ? '网络同步状态' : 'Network Sync Status'}</li>
+        <li key='sync-title' className={navStyles.navigationTitle}>{ networkID } { lang === 'zh' ? '同步状态' : 'Sync Status'}</li>
         <li key='sync-status'>{lang === 'zh' ? '同步中: ' : 'Synchronizing: '}  {currentBlock}/{highestBlock}</li>
         <li key='sync-peer-count'>{lang === 'zh' ? '节点数' : 'Peer Count'}: {peerCount}</li>
       </ul>
@@ -27,8 +26,8 @@ class Sync extends React.Component {
 
     const elems = []
 
-    elems.push(<li key='sync-networkID' className={navStyles.navigationTitle}>{ networkID }</li>)
-    elems.push(<li key='sync-title' className={navStyles.navigationTitle}>{ lang === 'zh' ? '网络同步状态' : 'Network Sync Status' }</li>)
+    // elems.push(<li key='sync-networkID' className={navStyles.navigationTitle}>{ networkID }</li>)
+    elems.push(<li key='sync-title' className={navStyles.navigationTitle}>{ networkID } { lang === 'zh' ? '同步状态' : 'Sync Status' }</li>)
 
     if(!syncing && currentBlock == highestBlock){
       elems.push(<li key='sync-done'>{lang === 'zh' ? '同步完成: ' : 'Fully synced: ' } <span className={styles.blockHightlight}>{currentBlock}/{highestBlock}</span></li>)
index 2747323..a3048b8 100644 (file)
@@ -9,7 +9,7 @@ class KeyList extends BaseList.ItemList {
 const mapStateToProps = (state) => {
   let titles
   if(state.core.lang === 'zh'){
-    titles = ['别名','扩展公钥']
+    titles = ['别名','公钥']
   }else{
     titles = ['Alias', 'xpub']
   }
index 00e4bc4..4486651 100644 (file)
@@ -54,7 +54,7 @@ class Show extends BaseShow {
             ]}
             items={[
               {label: (lang === 'zh' ? '别名' : 'Alias' ), value: item.alias},
-              {label: (lang === 'zh' ? '扩展公钥' : 'xpub'), value: item.xpub},
+              {label: (lang === 'zh' ? '公钥' : 'xpub'), value: item.xpub},
             ]}
             lang={lang}
           />
index 61e6f27..f5c74df 100644 (file)
@@ -21,7 +21,7 @@ class ListItem extends React.Component {
             </span>
 
             <span className={styles.timestamp}>
-              { `${confirmation} confirmation${confirmation > 1 ? 's' : ''}` }
+              {confirmation} {lang === 'zh' ? '确认数' :`confirmation${confirmation > 1 ? 's' : ''}`}
             </span>
 
           </div>
index 0462bf1..e9b6e81 100644 (file)
@@ -130,7 +130,7 @@ class Summary extends React.Component {
             {
               isCoinbase && <td className={styles.colAction}>
                 Coinbase
-                {!mature && <small className={styles.immature}>immature</small>}
+                {!mature && <small className={styles.immature}>{ lang === 'zh' ? '未成熟' : 'immature' }</small>}
               </td>
             }
             <td className={styles.colLabel}>{ lang === 'zh' ? '数量' : 'amount' }</td>
index fed5afd..fb5dd10 100644 (file)
@@ -28,7 +28,7 @@ export const history = useRouterHistory(createHistory)({
 })
 
 export const pageSize = 25
-export const UTXOpageSize = 4
+export const UTXOpageSize = 10
 
 export const testnetInfoUrl = process.env.TESTNET_INFO_URL || 'https://testnet-info.chain.com'
 export const testnetUrl = process.env.TESTNET_GENERATOR_URL || 'https://testnet.chain.com'