Skip to content

Commit

Permalink
string cleanup + add available balance to publish/channel create
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Yesmunt committed Jan 22, 2021
1 parent d1ac8a8 commit e5855de
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 18 deletions.
16 changes: 6 additions & 10 deletions static/app-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,6 @@
"Access to these files are equivalent to having access to your Credits, channels, and publishes. Keep any copies you make of your wallet in a secure place. For more details on backing up and best practices %helpLink%.": "Access to these files are equivalent to having access to your Credits, channels, and publishes. Keep any copies you make of your wallet in a secure place. For more details on backing up and best practices %helpLink%.",
"Your channels": "Your channels",
"Add Tags": "Add Tags",
"available balance": "available balance",
"currently in use": "currently in use",
"... earned and bound in tips": "... earned and bound in tips",
"... in your publishes": "... in your publishes",
"... in your supports": "... in your supports",
"Add a tag": "Add a tag",
"Upload something totally wacky and wild.": "Upload something totally wacky and wild.",
"Available rewards": "Available rewards",
Expand Down Expand Up @@ -582,8 +577,6 @@
"settings": "settings",
"Content may be hidden on this %type% because of your %settings%.": "Content may be hidden on this %type% because of your %settings%.",
"Sync": "Sync",
"%lbc_amount% earned and bound in tips": "%lbc_amount% earned and bound in tips",
"%lbc_amount% currently staked": "%lbc_amount% currently staked",
"Sync balance and preferences across devices.": "Sync balance and preferences across devices.",
"By creating an account, you agree to our %terms% and confirm you're over the age of 13.": "By creating an account, you agree to our %terms% and confirm you're over the age of 13.",
"Advanced Editor": "Advanced Editor",
Expand Down Expand Up @@ -1562,9 +1555,12 @@
"Your total balance.": "Your total balance.",
"%lbc_amount% immediately spendable": "%lbc_amount% immediately spendable",
"%lbc_amount% contributing to content": "%lbc_amount% contributing to content",
"...earned from others (unlock to spend)": "...earned from others (unlock to spend)",
"...on initial publishes (delete or edit past content to spend)": "...on initial publishes (delete or edit past content to spend)",
"...supporting content (delete supports to spend)": "...supporting content (delete supports to spend)",
"...earned from others": "...earned from others",
"...on initial publishes": "...on initial publishes",
"...supporting content": "...supporting content",
"Unlock to spend": "Unlock to spend",
"Delete or edit past content to spend": "Delete or edit past content to spend",
"Delete supports to spend": "Delete supports to spend",
"%lbc_amount% boosting content": "%lbc_amount% boosting content",
"--end--": "--end--"
}
4 changes: 3 additions & 1 deletion ui/component/channelEdit/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ function ChannelForm(props: Props) {
if (bid <= 0.0 || isNaN(bid)) {
setBidError(__('Deposit cannot be 0'));
} else if (totalAvailableBidAmount < bid) {
setBidError(__('Deposit cannot be higher than your available balance'));
setBidError(
__('Deposit cannot be higher than your available balance: %balance%', { balance: totalAvailableBidAmount })
);
} else if (totalAvailableBidAmount - bid < ESTIMATED_FEE) {
setBidError(__('Please decrease your deposit to account for transaction fees'));
} else if (bid < MINIMUM_PUBLISH_BID) {
Expand Down
4 changes: 3 additions & 1 deletion ui/component/publishName/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ function PublishName(props: Props) {
} else if (bid < MINIMUM_PUBLISH_BID) {
bidError = __('Your deposit must be higher');
} else if (totalAvailableBidAmount < bid) {
bidError = __('Deposit cannot be higher than your available balance');
bidError = __('Deposit cannot be higher than your available balance: %balance%', {
balance: totalAvailableBidAmount,
});
} else if (totalAvailableBidAmount <= bid + 0.05) {
bidError = __('Please decrease your deposit to account for transaction fees or acquire more LBRY Credits.');
}
Expand Down
15 changes: 12 additions & 3 deletions ui/component/walletBalance/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,26 @@ const WalletBalance = (props: Props) => {
{detailsExpanded && (
<div className="section__subtitle">
<dl>
<dt>{__('...earned from others (unlock to spend)')}</dt>
<dt>
{__('...earned from others')}
<span className="help--dt">({__('Unlock to spend')})</span>
</dt>
<dd>
<CreditAmount amount={tipsBalance} precision={8} />
</dd>

<dt>{__('...on initial publishes (delete or edit past content to spend)')}</dt>
<dt>
{__('...on initial publishes')}
<span className="help--dt">({__('Delete or edit past content to spend')})</span>
</dt>
<dd>
<CreditAmount amount={claimsBalance} precision={8} />
</dd>

<dt>{__('...supporting content (delete supports to spend)')}</dt>
<dt>
{__('...supporting content')}
<span className="help--dt">({__('Delete supports to spend')})</span>
</dt>
<dd>
<CreditAmount amount={supportsBalance} precision={8} />
</dd>
Expand Down
17 changes: 14 additions & 3 deletions ui/scss/init/_gui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ dl {
}

dt {
flex-basis: 45%;
flex-basis: 50%;
text-align: left;
font-weight: bold;
}

dd {
flex-basis: 50%;
flex-basis: 45%;
flex-grow: 1;
margin: 0;
text-align: right;
Expand Down Expand Up @@ -216,7 +216,7 @@ textarea {

.help {
display: block;
font-size: var(--font-small);
font-size: var(--font-xsmall);
color: var(--color-text-help);
margin-top: var(--spacing-s);

Expand All @@ -227,6 +227,10 @@ textarea {
.button--link ~ .button--link {
margin-left: var(--spacing-s);
}

@media (min-width: $breakpoint-small) {
font-size: var(--font-small);
}
}

.help--warning {
Expand Down Expand Up @@ -259,6 +263,13 @@ textarea {
margin-top: var(--spacing-m);
}

.help--dt {
@extend .help;
display: inline-block;
margin-top: 0;
margin-left: var(--spacing-s);
}

.empty {
color: var(--color-text-empty);
font-style: italic;
Expand Down

0 comments on commit e5855de

Please sign in to comment.