Skip to content

Commit

Permalink
Fix layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
whphhg committed May 29, 2017
1 parent add997c commit 64f9968
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 149 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ the two with a dash `-`.
After you've created the correctly named translation directory, open
`src/stores/gui.js` and add the new translation to the
[languages](https://github.com/whphhg/vcash-electron/blob/master/src/stores/gui.js#L20-L24)
array (in alphabetical order).
array (in alphabetical order). Please use 6 spaces to indent the line below.

{ language: 'languageCode-countryCode', name: 'New language' },

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vcash-electron",
"productName": "Vcash Electron GUI",
"version": "0.31.7",
"version": "0.32.0",
"description": "Multi-platform and multi-node GUI for Vcash.",
"main": "src/electron.js",
"scripts": {
Expand Down Expand Up @@ -53,18 +53,18 @@
"dependencies": {
"antd": "2.10.2",
"electron-compile": "6.4.1",
"i18next": "8.3.0",
"i18next": "8.4.0",
"i18next-node-fs-backend": "1.0.0",
"mobx": "3.1.10",
"mobx-logger": "0.6.0",
"mobx-react": "4.1.8",
"mobx-react": "4.2.1",
"moment": "2.18.1",
"react": "15.5.4",
"react-dom": "15.5.4",
"react-i18next": "4.1.0",
"react-router-dom": "4.1.1",
"recharts": "0.22.4",
"ssh2": "0.5.4"
"ssh2": "0.5.5"
},
"devDependencies": {
"babel-core": "6.24.1",
Expand All @@ -75,7 +75,7 @@
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"babel-runtime": "6.23.0",
"electron-builder": "18.0.1",
"electron-builder": "18.1.0",
"electron-prebuilt-compile": "1.7.0",
"standard": "10.0.2"
}
Expand Down
86 changes: 44 additions & 42 deletions src/components/Address.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,50 +71,52 @@ export default class Address extends React.Component {
</div>
{
this.data.outputs.length > 0 && (
<Table
bordered
columns={[
{
dataIndex: 'txid',
title: this.t('wallet:transactionId'),
width: 275,
render: (txid, record) => (
<p className='text-mono'>
{
(
record.spentTxid === '' &&
txid.slice(0, 15) + '...' + txid.slice(49, 64)
) || (
record.spentTxid !== '' &&
<div style={{textAlign: 'center'}}>
<Table
bordered
columns={[
{
dataIndex: 'txid',
title: this.t('wallet:transactionId'),
width: 275,
render: (txid, record) => (
<p className='text-mono'>
{
(
record.spentTxid.slice(0, 15) + '...' +
record.spentTxid.slice(49, 64)
record.spentTxid === '' &&
txid.slice(0, 15) + '...' + txid.slice(49, 64)
) || (
record.spentTxid !== '' &&
(
record.spentTxid.slice(0, 15) + '...' +
record.spentTxid.slice(49, 64)
)
)
)
}
</p>
)
},
{
dataIndex: 'amount',
title: this.t('wallet:amount'),
render: (amount, record) => (
<p className={record.color} style={{textAlign: 'right'}}>
{
new Intl.NumberFormat(this.gui.language, {
minimumFractionDigits: 6,
maximumFractionDigits: 6
}).format(amount)
} XVC
</p>
)
}
]}
dataSource={this.data.outputs}
onRowClick={this.viewTransaction}
pagination={false}
size='small'
/>
}
</p>
)
},
{
dataIndex: 'amount',
title: this.t('wallet:amount'),
render: (amount, record) => (
<p className={record.color} style={{textAlign: 'right'}}>
{
new Intl.NumberFormat(this.gui.language, {
minimumFractionDigits: 6,
maximumFractionDigits: 6
}).format(amount)
} XVC
</p>
)
}
]}
dataSource={this.data.outputs}
onRowClick={this.viewTransaction}
pagination={this.data.outputs.length > 10}
size='small'
/>
</div>
)
}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Header extends React.Component {
</div>
{
this.wallet.pendingAmount > 0 && (
<div>
<div style={{margin: '0 10px 0 0'}}>
<p>{this.t('wallet:pending')}</p>
<p><span style={{fontWeight: '600'}}>
{
Expand All @@ -83,7 +83,7 @@ class Header extends React.Component {
}
{
newmint > 0 && (
<div style={{margin: '0 10px 0 10px'}}>
<div style={{margin: '0 10px 0 0'}}>
<p>{this.t('wallet:immature')}</p>
<p><span style={{fontWeight: '600'}}>
{
Expand Down
196 changes: 98 additions & 98 deletions src/components/Transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class Transaction extends React.Component {
width={1000}
>
<div className='flex-sb' style={{alignItems: 'flex-start'}}>
<div style={{margin: '0 36px 0 0'}}>
<div style={{lineHeight: '20px', margin: '0 36px 0 0'}}>
<div className='flex'>
<i className='material-icons md-16'>label</i>
<p>{this.t('wallet:transactionId')}</p>
Expand All @@ -76,11 +76,11 @@ export default class Transaction extends React.Component {
</div>
)
}
<div className='flex' style={{margin: '10px 0 0 0'}}>
<div className='flex'>
<i className='material-icons md-16'>folder</i>
<p>{this.t('wallet:category')}</p>
</div>
<div className='flex'>
<div className='flex' style={{margin: '10px 0 0 0'}}>
<i className='material-icons md-16'>monetization_on</i>
<p>{this.t('wallet:amount')}</p>
</div>
Expand All @@ -97,76 +97,74 @@ export default class Transaction extends React.Component {
<p>{this.t('wallet:confirmations')}</p>
</div>
</div>
<div style={{flex: 1}}>
<div style={{margin: '0 0 10px 0'}}>
<div className='flex-sb' style={{alignItems: 'flex-start'}}>
<div>
<p style={{fontWeight: '500'}}>{viewingTx.txid}</p>
{
viewingTx.hasOwnProperty('blockhash') === true && (
<p style={{fontWeight: '500'}}>{viewingTx.blockhash}</p>
)
}
<p>
{moment(viewingTx.time).format('L - LTS')} (
{moment().to(viewingTx.time)})
</p>
{
viewingTx.hasOwnProperty('blocktime') === true &&
viewingTx.blocktime > 0 && (
<p>{moment(viewingTx.blocktime).format('L - LTS')}</p>
)
}
</div>
<div style={{textAlign: 'right'}}>
<p>
<a
target='_blank'
href={'https://explorer.vchain.info/tx/' + viewingTx.txid}
>
{this.t('wallet:transactionOnExplorer')}
</a>
</p>
<p>
<a
target='_blank'
href={'https://explorer.vchain.info/block/' + viewingTx.blockhash}
disabled={
viewingTx.hasOwnProperty('blockhash') === false ||
viewingTx.blockhash === '0'.repeat(64)
}
>
{this.t('wallet:blockOnExplorer')}
</a>
</p>
{
viewingTx.hasOwnProperty('ztlock') === true &&
viewingTx.confirmations === 0 &&
viewingTx.hasOwnProperty('generated') === false &&
viewingTx.hasOwnProperty('blended') === false &&
(
<p>
<a
onClick={this.ztlock}
disabled={viewingTx.ztlock === true}
>
{
viewingTx.ztlock === true
? this.t('wallet:transactionLocked')
: this.t('wallet:transactionLock')
}
</a>
</p>
)
}
</div>
</div>
</div>
<div style={{flex: 1, lineHeight: '20px'}}>
<div className='flex-sb' style={{alignItems: 'flex-start'}}>
<div style={{margin: '0 36px 0 0'}}>
<div style={{margin: '0 0 10px 0'}}>
<p style={{fontWeight: '500'}}>{viewingTx.txid}</p>
{
viewingTx.hasOwnProperty('blockhash') === true && (
<p style={{fontWeight: '500'}}>{viewingTx.blockhash}</p>
)
}
<p>
{moment(viewingTx.time).format('L - LTS')} (
{moment().to(viewingTx.time)})
</p>
{
viewingTx.hasOwnProperty('blocktime') === true &&
viewingTx.blocktime > 0 && (
<p>{moment(viewingTx.blocktime).format('L - LTS')}</p>
)
}
<p style={{fontWeight: '500'}}>
{this.t('wallet:' + viewingTx.category)}
</p>
</div>
<div style={{textAlign: 'right'}}>
<p>
<a
target='_blank'
href={'https://explorer.vchain.info/tx/' + viewingTx.txid}
>
{this.t('wallet:transactionOnExplorer')}
</a>
</p>
<p>
<a
target='_blank'
href={'https://explorer.vchain.info/block/' + viewingTx.blockhash}
disabled={
viewingTx.hasOwnProperty('blockhash') === false ||
viewingTx.blockhash === '0'.repeat(64)
}
>
{this.t('wallet:blockOnExplorer')}
</a>
</p>
{
viewingTx.hasOwnProperty('ztlock') === true &&
viewingTx.confirmations === 0 &&
viewingTx.hasOwnProperty('generated') === false &&
viewingTx.hasOwnProperty('blended') === false &&
(
<p>
<a
onClick={this.ztlock}
disabled={viewingTx.ztlock === true}
>
{
viewingTx.ztlock === true
? this.t('wallet:transactionLocked')
: this.t('wallet:transactionLock')
}
</a>
</p>
)
}
</div>
</div>
<div className='flex-sb' style={{alignItems: 'flex-start'}}>
<div>
<p className={viewingTx.color}>
{
new Intl.NumberFormat(this.gui.language, {
Expand All @@ -193,35 +191,37 @@ export default class Transaction extends React.Component {
}
<p className={viewingTx.color}>{viewingTx.confirmations}</p>
</div>
<div style={{margin: '0 36px 0 36px'}}>
{
viewingTx.hasOwnProperty('to') === true && (
<div className='flex'>
<i className='material-icons md-16'>perm_identity</i>
<p>{this.t('wallet:recipient')}</p>
</div>
)
}
{
viewingTx.hasOwnProperty('comment') === true && (
<div className='flex'>
<i className='material-icons md-16'>create</i>
<p>{this.t('wallet:comment')}</p>
</div>
)
}
</div>
<div style={{flex: 1}}>
{
viewingTx.hasOwnProperty('to') === true && (
<p style={{fontWeight: '500'}}>{viewingTx.to}</p>
)
}
{
viewingTx.hasOwnProperty('comment') === true && (
<p style={{textAlign: 'justify'}}>{viewingTx.comment}</p>
)
}
<div className='flex-sb' style={{alignItems: 'flex-start', width: '467px'}}>
<div style={{margin: '0 36px 0 0'}}>
{
viewingTx.hasOwnProperty('to') === true && (
<div className='flex'>
<i className='material-icons md-16'>perm_identity</i>
<p>{this.t('wallet:recipient')}</p>
</div>
)
}
{
viewingTx.hasOwnProperty('comment') === true && (
<div className='flex'>
<i className='material-icons md-16'>create</i>
<p>{this.t('wallet:comment')}</p>
</div>
)
}
</div>
<div style={{flex: 1}}>
{
viewingTx.hasOwnProperty('to') === true && (
<p style={{fontWeight: '500'}}>{viewingTx.to}</p>
)
}
{
viewingTx.hasOwnProperty('comment') === true && (
<p style={{textAlign: 'justify'}}>{viewingTx.comment}</p>
)
}
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 64f9968

Please sign in to comment.