string cleanup + add available balance to publish/channel create

This commit is contained in:
Sean Yesmunt 2021-01-22 11:08:11 -05:00
parent 18f1f983ae
commit 8552515e34
5 changed files with 38 additions and 18 deletions

View file

@ -502,11 +502,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%.", "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", "Your channels": "Your channels",
"Add Tags": "Add Tags", "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", "Add a tag": "Add a tag",
"Upload something totally wacky and wild.": "Upload something totally wacky and wild.", "Upload something totally wacky and wild.": "Upload something totally wacky and wild.",
"Available rewards": "Available rewards", "Available rewards": "Available rewards",
@ -583,8 +578,6 @@
"settings": "settings", "settings": "settings",
"Content may be hidden on this %type% because of your %settings%.": "Content may be hidden on this %type% because of your %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", "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.", "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.", "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", "Advanced Editor": "Advanced Editor",
@ -1566,9 +1559,12 @@
"Your total balance.": "Your total balance.", "Your total balance.": "Your total balance.",
"%lbc_amount% immediately spendable": "%lbc_amount% immediately spendable", "%lbc_amount% immediately spendable": "%lbc_amount% immediately spendable",
"%lbc_amount% contributing to content": "%lbc_amount% contributing to content", "%lbc_amount% contributing to content": "%lbc_amount% contributing to content",
"...earned from others (unlock to spend)": "...earned from others (unlock to spend)", "...earned from others": "...earned from others",
"...on initial publishes (delete or edit past content to spend)": "...on initial publishes (delete or edit past content to spend)", "...on initial publishes": "...on initial publishes",
"...supporting content (delete supports to spend)": "...supporting content (delete supports to spend)", "...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", "%lbc_amount% boosting content": "%lbc_amount% boosting content",
"--end--": "--end--" "--end--": "--end--"
} }

View file

@ -138,7 +138,9 @@ function ChannelForm(props: Props) {
if (bid <= 0.0 || isNaN(bid)) { if (bid <= 0.0 || isNaN(bid)) {
setBidError(__('Deposit cannot be 0')); setBidError(__('Deposit cannot be 0'));
} else if (totalAvailableBidAmount < bid) { } 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) { } else if (totalAvailableBidAmount - bid < ESTIMATED_FEE) {
setBidError(__('Please decrease your deposit to account for transaction fees')); setBidError(__('Please decrease your deposit to account for transaction fees'));
} else if (bid < MINIMUM_PUBLISH_BID) { } else if (bid < MINIMUM_PUBLISH_BID) {

View file

@ -88,7 +88,9 @@ function PublishName(props: Props) {
} else if (bid < MINIMUM_PUBLISH_BID) { } else if (bid < MINIMUM_PUBLISH_BID) {
bidError = __('Your deposit must be higher'); bidError = __('Your deposit must be higher');
} else if (totalAvailableBidAmount < bid) { } 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) { } else if (totalAvailableBidAmount <= bid + 0.05) {
bidError = __('Please decrease your deposit to account for transaction fees or acquire more LBRY Credits.'); bidError = __('Please decrease your deposit to account for transaction fees or acquire more LBRY Credits.');
} }

View file

@ -94,17 +94,26 @@ const WalletBalance = (props: Props) => {
{detailsExpanded && ( {detailsExpanded && (
<div className="section__subtitle"> <div className="section__subtitle">
<dl> <dl>
<dt>{__('...earned from others (unlock to spend)')}</dt> <dt>
{__('...earned from others')}
<span className="help--dt">({__('Unlock to spend')})</span>
</dt>
<dd> <dd>
<CreditAmount amount={tipsBalance} precision={8} /> <CreditAmount amount={tipsBalance} precision={8} />
</dd> </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> <dd>
<CreditAmount amount={claimsBalance} precision={8} /> <CreditAmount amount={claimsBalance} precision={8} />
</dd> </dd>
<dt>{__('...supporting content (delete supports to spend)')}</dt> <dt>
{__('...supporting content')}
<span className="help--dt">({__('Delete supports to spend')})</span>
</dt>
<dd> <dd>
<CreditAmount amount={supportsBalance} precision={8} /> <CreditAmount amount={supportsBalance} precision={8} />
</dd> </dd>

View file

@ -83,13 +83,13 @@ dl {
} }
dt { dt {
flex-basis: 45%; flex-basis: 50%;
text-align: left; text-align: left;
font-weight: bold; font-weight: bold;
} }
dd { dd {
flex-basis: 50%; flex-basis: 45%;
flex-grow: 1; flex-grow: 1;
margin: 0; margin: 0;
text-align: right; text-align: right;
@ -216,7 +216,7 @@ textarea {
.help { .help {
display: block; display: block;
font-size: var(--font-small); font-size: var(--font-xsmall);
color: var(--color-text-help); color: var(--color-text-help);
margin-top: var(--spacing-s); margin-top: var(--spacing-s);
@ -227,6 +227,10 @@ textarea {
.button--link ~ .button--link { .button--link ~ .button--link {
margin-left: var(--spacing-s); margin-left: var(--spacing-s);
} }
@media (min-width: $breakpoint-small) {
font-size: var(--font-small);
}
} }
.help--warning { .help--warning {
@ -259,6 +263,13 @@ textarea {
margin-top: var(--spacing-m); margin-top: var(--spacing-m);
} }
.help--dt {
@extend .help;
display: inline-block;
margin-top: 0;
margin-left: var(--spacing-s);
}
.empty { .empty {
color: var(--color-text-empty); color: var(--color-text-empty);
font-style: italic; font-style: italic;