Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Reorder Brave Payments buttons to improve 1st-time flow #4040

Merged
merged 1 commit into from
Sep 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,18 +674,16 @@ class PaymentsTab extends ImmutableComponent {
return null
}

return <span id='fundsAmount'>
return <div>
{
!(this.props.ledgerData.get('balance') === undefined || this.props.ledgerData.get('balance') === null)
? <span>
{this.btcToCurrencyString(this.props.ledgerData.get('balance'))}
<a href='https://brave.com/Payments_FAQ.html' target='_blank'>
<span className='fa fa-question-circle fundsFAQ' />
</a>
</span>
? <input className='fundsAmount' readOnly value={this.btcToCurrencyString(this.props.ledgerData.get('balance'))} />
: <span><span data-l10n-id='accountBalanceLoading' /></span>
}
</span>
<a href='https://brave.com/Payments_FAQ.html' target='_blank'>
<span className='fa fa-question-circle fundsFAQ' />
</a>
</div>
}

get walletButton () {
Expand Down Expand Up @@ -820,24 +818,13 @@ class PaymentsTab extends ImmutableComponent {
<table>
<thead>
<tr>
<th data-l10n-id='accountBalance' />
<th data-l10n-id='monthlyBudget' />
<th data-l10n-id='accountBalance' />
<th data-l10n-id='status' />
</tr>
</thead>
<tbody>
<tr>
<td>
{
this.props.ledgerData.get('error') && this.props.ledgerData.get('error').get('caller') === 'getWalletProperties'
? <span data-l10n-id='accountBalanceConnectionError' />
: <span>
{this.fundsAmount}
{this.walletButton}
{this.paymentHistoryButton}
</span>
}
</td>
<td>
<SettingsList>
<SettingItem>
Expand All @@ -854,6 +841,21 @@ class PaymentsTab extends ImmutableComponent {
</SettingItem>
</SettingsList>
</td>
<td>
{
this.props.ledgerData.get('error') && this.props.ledgerData.get('error').get('caller') === 'getWalletProperties'
? <span data-l10n-id='accountBalanceConnectionError' />
: <span>
<SettingsList>
<SettingItem>
{this.fundsAmount}
{this.walletButton}
{this.paymentHistoryButton}
</SettingItem>
</SettingsList>
</span>
}
</td>
<td>
<div id='walletStatus' data-l10n-id={this.walletStatus.id} data-l10n-args={this.walletStatus.args ? JSON.stringify(this.walletStatus.args) : null} />
{this.nextReconcileDate}
Expand Down
38 changes: 19 additions & 19 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ body {
display: inline-block;
}

#fundsAmount {
margin-right: 10px;

.fundsFAQ {
position: relative;
margin: 0 10px;
top: -1px;
}
}

.bitcoinQRTitle {
color: @braveOrange;
margin-bottom: 70px;
Expand Down Expand Up @@ -410,8 +400,8 @@ span.browserButton.primaryButton {
margin-left: 10px;
}

> input,
> select {
input,
select {
display: block;
border-radius: @borderRadius;
height: 2.25em;
Expand All @@ -424,20 +414,20 @@ span.browserButton.primaryButton {
outline: none;
}

> input {
input {
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

> select {
select {
box-shadow: @lightBoxShadow;
}

> input[type="number"] {
input[type="number"] {
width: 50px;
min-width: 50px;
}

> select[disabled] {
select[disabled] {
color: #ccc
}

Expand Down Expand Up @@ -639,7 +629,6 @@ div.nextPaymentSubmission {
margin: 30px 0px;
th {
text-align: left;
font-weight: normal;
}
tr {
height: 1em;
Expand All @@ -652,10 +641,22 @@ div.nextPaymentSubmission {
span.browserButton.primaryButton.addFunds {
margin-right: 0;
}
.fundsAmount {
display: inline;
margin: 0;
width: auto;
}
.fundsFAQ {
display: inline;
position: relative;
top: 1px;
left: 5px;
}
.addFunds {
margin: 0;
height: 30px;
line-height: 30px;
line-height: 24px;
box-sizing: border-box;
}
.nextReconcileDate {
font-size: 14px;
Expand Down Expand Up @@ -1044,6 +1045,5 @@ div.nextPaymentSubmission {

#fundsSelectBox {
margin-top: 0px;
min-width: 130px;
width: auto;
}