Merge branch 'master' into i18n

This commit is contained in:
Mayesters 2017-05-28 18:46:31 +02:00
commit 804c9a646b
11 changed files with 48 additions and 18 deletions

View file

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

View file

@ -16,8 +16,10 @@ Web UI version numbers should always match the corresponding version of LBRY App
* *
### Fixed ### Fixed
* * Eliminated instance of costs being double fetched
* * Fixed issue preventing file re-download
* Fixed race condition that could prevent file playbac
* Fixed issue with batch actions and thunk
### Deprecated ### Deprecated
* *

View file

@ -1,6 +1,6 @@
{ {
"name": "LBRY", "name": "LBRY",
"version": "0.11.4", "version": "0.11.5rc1",
"main": "main.js", "main": "main.js",
"description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.",
"author": { "author": {

View file

@ -16,6 +16,9 @@ import {
import { import {
selectCurrentModal, selectCurrentModal,
} from 'selectors/app' } from 'selectors/app'
import {
makeSelectCostInfoForUri,
} from 'selectors/cost_info'
import { import {
doCloseModal, doCloseModal,
doOpenModal, doOpenModal,
@ -39,6 +42,7 @@ const makeSelect = () => {
const selectFileInfoForUri = makeSelectFileInfoForUri() const selectFileInfoForUri = makeSelectFileInfoForUri()
const selectIsAvailableForUri = makeSelectIsAvailableForUri() const selectIsAvailableForUri = makeSelectIsAvailableForUri()
const selectDownloadingForUri = makeSelectDownloadingForUri() const selectDownloadingForUri = makeSelectDownloadingForUri()
const selectCostInfoForUri = makeSelectCostInfoForUri()
const select = (state, props) => ({ const select = (state, props) => ({
fileInfo: selectFileInfoForUri(state, props), fileInfo: selectFileInfoForUri(state, props),
@ -46,6 +50,7 @@ const makeSelect = () => {
platform: selectPlatform(state), platform: selectPlatform(state),
modal: selectCurrentModal(state), modal: selectCurrentModal(state),
downloading: selectDownloadingForUri(state, props), downloading: selectDownloadingForUri(state, props),
costInfo: selectCostInfoForUri(state, props),
}) })
return select return select
@ -62,7 +67,7 @@ const perform = (dispatch) => ({
}, },
openModal: (modal) => dispatch(doOpenModal(modal)), openModal: (modal) => dispatch(doOpenModal(modal)),
startDownload: (uri) => dispatch(doPurchaseUri(uri)), startDownload: (uri) => dispatch(doPurchaseUri(uri)),
loadVideo: (uri) => dispatch(doLoadVideo(uri)) loadVideo: (uri) => dispatch(doLoadVideo(uri)),
}) })
export default connect(makeSelect, perform)(FileActions) export default connect(makeSelect, perform)(FileActions)

View file

@ -62,6 +62,7 @@ class FileActions extends React.Component {
openModal, openModal,
closeModal, closeModal,
startDownload, startDownload,
costInfo,
} = this.props } = this.props
const deleteChecked = this.state.deleteChecked, const deleteChecked = this.state.deleteChecked,
@ -99,8 +100,11 @@ class FileActions extends React.Component {
</div> </div>
} else if (fileInfo === null && !downloading) { } else if (fileInfo === null && !downloading) {
if (!costInfo) {
content = <Link button="text" label={__("Download")} icon="icon-download" onClick={() => { startDownload(uri) } } />; content = <BusyMessage message="Fetching cost info" />
} else {
content = <Link button="text" label="Download" icon="icon-download" onClick={() => { startDownload(uri) } } />;
}
} else if (fileInfo && fileInfo.download_path) { } else if (fileInfo && fileInfo.download_path) {
content = <Link label={__("Open")} button="text" icon="icon-folder-open" onClick={() => openInShell(fileInfo)} />; content = <Link label={__("Open")} button="text" icon="icon-folder-open" onClick={() => openInShell(fileInfo)} />;

View file

@ -7,14 +7,17 @@ import {
} from 'actions/cost_info' } from 'actions/cost_info'
import { import {
makeSelectCostInfoForUri, makeSelectCostInfoForUri,
makeSelectFetchingCostInfoForUri,
} from 'selectors/cost_info' } from 'selectors/cost_info'
import FilePrice from './view' import FilePrice from './view'
const makeSelect = () => { const makeSelect = () => {
const selectCostInfoForUri = makeSelectCostInfoForUri() const selectCostInfoForUri = makeSelectCostInfoForUri()
const selectFetchingCostInfoForUri = makeSelectFetchingCostInfoForUri()
const select = (state, props) => ({ const select = (state, props) => ({
costInfo: selectCostInfoForUri(state, props), costInfo: selectCostInfoForUri(state, props),
fetching: selectFetchingCostInfoForUri(state, props),
}) })
return select return select

View file

@ -16,10 +16,11 @@ class FilePrice extends React.Component{
const { const {
costInfo, costInfo,
fetchCostInfo, fetchCostInfo,
uri uri,
fetching,
} = props } = props
if (costInfo === undefined) { if (costInfo === undefined && !fetching) {
fetchCostInfo(uri) fetchCostInfo(uri)
} }
} }

View file

@ -101,7 +101,9 @@ class Video extends React.Component {
let loadStatusMessage = '' let loadStatusMessage = ''
if (isLoading) { if(fileInfo && fileInfo.completed && !fileInfo.written_bytes) {
loadStatusMessage = "It looks like you deleted or moved this file. We're rebuilding it now. It will only take a few seconds."
} else if (isLoading) {
loadStatusMessage = __("Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it") loadStatusMessage = __("Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it")
} else if (isDownloading) { } else if (isDownloading) {
loadStatusMessage = __("Downloading stream... not long left now!") loadStatusMessage = __("Downloading stream... not long left now!")

View file

@ -12,7 +12,6 @@ import lighthouse from './lighthouse.js';
import App from 'component/app/index.js'; import App from 'component/app/index.js';
import SnackBar from 'component/snackBar'; import SnackBar from 'component/snackBar';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import batchActions from 'util/batchActions'
import store from 'store.js'; import store from 'store.js';
import SplashScreen from 'component/splash.js'; import SplashScreen from 'component/splash.js';
import {AuthOverlay} from 'component/auth.js'; import {AuthOverlay} from 'component/auth.js';
@ -86,12 +85,10 @@ var init = function() {
window.sessionStorage.setItem('loaded', 'y'); //once we've made it here once per session, we don't need to show splash again window.sessionStorage.setItem('loaded', 'y'); //once we've made it here once per session, we don't need to show splash again
const actions = [] const actions = []
actions.push(doDaemonReady()) app.store.dispatch(doDaemonReady())
actions.push(doChangePath('/discover')) app.store.dispatch(doChangePath('/discover'))
actions.push(doFetchDaemonSettings()) app.store.dispatch(doFetchDaemonSettings())
actions.push(doFileList()) app.store.dispatch(doFileList())
app.store.dispatch(batchActions(actions))
ReactDOM.render(<Provider store={store}><div>{ lbryio.enabled ? <AuthOverlay/> : '' }<App /><SnackBar /></div></Provider>, canvas) ReactDOM.render(<Provider store={store}><div>{ lbryio.enabled ? <AuthOverlay/> : '' }<App /><SnackBar /></div></Provider>, canvas)
} }

View file

@ -17,3 +17,19 @@ export const makeSelectCostInfoForUri = () => {
(costInfo) => costInfo (costInfo) => costInfo
) )
} }
export const selectFetchingCostInfo = createSelector(
_selectState,
(state) => state.fetching || {}
)
const selectFetchingCostInfoForUri = (state, props) => {
return selectFetchingCostInfo(state)[props.uri]
}
export const makeSelectFetchingCostInfoForUri = () => {
return createSelector(
selectFetchingCostInfoForUri,
(fetching) => !!fetching
)
}

View file

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