Merge branch 'master' into css_patch

This commit is contained in:
Baltazar Gomez 2017-10-02 09:30:39 -06:00 committed by GitHub
commit b66968d9f9
11 changed files with 40 additions and 49 deletions

View file

@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.16.0
current_version = 0.16.1rc1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))?

View file

@ -9,16 +9,17 @@ Web UI version numbers should always match the corresponding version of LBRY App
## [Unreleased]
### Added
* Add setting to automatically purchase low-cost content without a confirmation dialog
* New custom styled scrollbar [#574](https://github.com/lbryio/lbry-app/pull/574)
* New custom styled scrollbar (#574)
*
### Changed
* Updated the daemon from 0.16.1 to [0.16.3](https://github.com/lbryio/lbry/releases/tag/v0.16.3) to improve download performance and download issue detection.
* Changed the File page to make it clearer how to to open the folder for a file.
* Improved tabs styles with a nice animation. [#547](https://github.com/lbryio/lbry-app/pull/576)
* Improved tabs styles with a nice animation. (#547)
* Display search bar on discover page instead of title and remove duplicated icon.
* Minor update for themes.
*
* There is no longer a minimum channel length (#645)
* Changed the File page to make it clearer how to to open the folder for a file
### Fixed
* Improve layout (and implementation) of the icon panel in file tiles and cards
@ -26,10 +27,12 @@ Web UI version numbers should always match the corresponding version of LBRY App
* While editing a publish, the URL will no longer change if you select a new file. (#601)
* Fixed issues with opening the folder for a file (#606)
* Be consistent with the step property on credit inputs (#604)
* Fixed unresponsive header [#613](https://github.com/lbryio/lbry-app/issues/613)
* Fixed unresponsive header (#613)
* Fixed dark theme issues with text content.
* Minor css fixes.
*
* Fixed issue when file fails to download (#642)
* Fixed issue after accessing a video without enough credits (#605)
* Fixed channel fetching without claims (#634)
### Deprecated
*

View file

@ -1,6 +1,6 @@
{
"name": "LBRY",
"version": "0.16.0",
"version": "0.16.1rc1",
"main": "main.js",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"author": {

View file

@ -295,6 +295,7 @@ export function doLoadVideo(uri) {
streamInfo.error == "Timeout";
if (timeout) {
dispatch(doSetPlayingUri(null));
dispatch({
type: types.LOADING_VIDEO_FAILED,
data: { uri },
@ -306,6 +307,7 @@ export function doLoadVideo(uri) {
}
})
.catch(error => {
dispatch(doSetPlayingUri(null));
dispatch({
type: types.LOADING_VIDEO_FAILED,
data: { uri },
@ -351,6 +353,7 @@ export function doPurchaseUri(uri) {
const { cost } = costInfo;
if (cost > balance) {
dispatch(doSetPlayingUri(null));
dispatch(doOpenModal(modals.INSUFFICIENT_CREDITS));
return Promise.resolve();
}
@ -384,16 +387,15 @@ export function doFetchClaimsByChannel(uri, page) {
});
lbry.claim_list_by_channel({ uri, page: page || 1 }).then(result => {
const claimResult = result[uri],
claims = claimResult ? claimResult.claims_in_channel : [],
currentPage = claimResult ? claimResult.returned_page : undefined;
const claimResult = result[uri] || {};
const { claims_in_channel, returned_page } = claimResult;
dispatch({
type: types.FETCH_CHANNEL_CLAIMS_COMPLETED,
data: {
uri,
claims,
page: currentPage,
claims: claims_in_channel || [],
page: returned_page || undefined,
},
});
});

View file

@ -34,7 +34,7 @@ class FormFieldPrice extends React.PureComponent {
}
render() {
const { defaultValue, placeholder, min, step } = this.props;
const { defaultValue, placeholder, min } = this.props;
return (
<span className="form-field">
@ -43,7 +43,7 @@ class FormFieldPrice extends React.PureComponent {
name="amount"
min={min}
placeholder={placeholder || null}
step={step}
step="any" //Unfortunately, you cannot set a step without triggering validation that enforces a multiple of the step
onChange={event => this.handleFeeAmountChange(event)}
defaultValue={
defaultValue && defaultValue.amount ? defaultValue.amount : ""

View file

@ -53,13 +53,6 @@ class ChannelSection extends React.PureComponent {
}
handleCreateChannelClick(event) {
if (this.state.newChannelName.length < 5) {
this.refs.newChannelName.showError(
__("LBRY channel names must be at least 5 characters in length.")
);
return;
}
this.setState({
creatingChannel: true,
});
@ -148,7 +141,7 @@ class ChannelSection extends React.PureComponent {
<FormRow
label={__("Deposit")}
postfix="LBC"
step="0.1"
step="any"
min="0"
type="number"
helper={lbcInputHelp}

View file

@ -663,10 +663,8 @@ class PublishForm extends React.PureComponent {
checked={this.state.isFee}
/>
<span className={!this.state.isFee ? "hidden" : ""}>
{/*min=0.01 caused weird interactions with step (e.g. down from 5 equals 4.91 rather than 4.9) */}
<FormFieldPrice
min="0"
step="0.1"
defaultValue={{ amount: 5.0, currency: "LBC" }}
onChange={val => this.handleFeeChange(val)}
/>
@ -823,7 +821,7 @@ class PublishForm extends React.PureComponent {
<FormRow
ref="bid"
type="number"
step="0.1"
step="any"
label={__("Deposit")}
postfix="LBC"
onChange={event => {

View file

@ -33,7 +33,7 @@ class WalletSend extends React.PureComponent {
<FormRow
label={__("Amount")}
postfix={__("LBC")}
step="0.1"
step="any"
min="0"
type="number"
placeholder="1.23"

View file

@ -37,7 +37,7 @@ class WalletSendTip extends React.PureComponent {
label={__("Amount")}
postfix={__("LBC")}
min="0"
step="0.1"
step="any"
type="number"
errorMessage={errorMessage}
helper={

View file

@ -13,8 +13,6 @@ class SettingsPage extends React.PureComponent {
super(props);
this.state = {
instantPurchaseEnabled: props.instantPurchaseEnabled,
instantPurchaseMax: props.instantPurchaseMax,
clearingCache: false,
};
}
@ -49,7 +47,14 @@ class SettingsPage extends React.PureComponent {
}
onKeyFeeChange(newValue) {
this.setDaemonSetting("max_key_fee", newValue);
let setting = newValue;
//this is stupid and should be fixed... somewhere
if (setting && (setting.amount === undefined || setting.amount === null)) {
setting.amount = 0;
}
this.setDaemonSetting("max_key_fee", setting);
}
onKeyFeeDisableChange(isDisabled) {
@ -61,20 +66,12 @@ class SettingsPage extends React.PureComponent {
this.props.setClientSetting(settings.THEME, value);
}
oninstantPurchaseEnabledChange(enabled) {
onInstantPurchaseEnabledChange(enabled) {
this.props.setClientSetting(settings.INSTANT_PURCHASE_ENABLED, enabled);
this.setState({
instantPurchaseEnabled: enabled,
});
}
onInstantPurchaseMaxChange(newValue) {
this.props.setClientSetting(settings.INSTANT_PURCHASE_MAX, newValue);
this.setState({
instantPurchaseMax: newValue,
});
}
// onMaxUploadPrefChange(isLimited) {
@ -221,7 +218,6 @@ class SettingsPage extends React.PureComponent {
{!daemonSettings.disable_max_key_fee &&
<FormFieldPrice
min="0"
step="1"
onChange={this.onKeyFeeChange.bind(this)}
defaultValue={
daemonSettings.max_key_fee
@ -245,31 +241,30 @@ class SettingsPage extends React.PureComponent {
<FormRow
type="radio"
name="instant_purchase_max"
checked={!this.state.instantPurchaseEnabled}
checked={!instantPurchaseEnabled}
label={__("Ask for confirmation of all purchases")}
onClick={e => {
this.oninstantPurchaseEnabledChange(false);
this.onInstantPurchaseEnabledChange(false);
}}
/>
<div className="form-row">
<FormField
type="radio"
name="instant_purchase_max"
checked={this.state.instantPurchaseEnabled}
checked={instantPurchaseEnabled}
label={
"Single-click purchasing of content less than" +
(this.state.instantPurchaseEnabled ? "" : "...")
(instantPurchaseEnabled ? "" : "...")
}
onClick={e => {
this.oninstantPurchaseEnabledChange(true);
this.onInstantPurchaseEnabledChange(true);
}}
/>
{this.state.instantPurchaseEnabled &&
{instantPurchaseEnabled &&
<FormFieldPrice
min="0.1"
step="0.1"
onChange={val => this.onInstantPurchaseMaxChange(val)}
defaultValue={this.state.instantPurchaseMax}
defaultValue={instantPurchaseMax}
/>}
</div>
<div className="form-field__helper">

View file

@ -1,6 +1,6 @@
{
"name": "lbry-web-ui",
"version": "0.16.0",
"version": "0.16.1rc1",
"description": "LBRY UI",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",