Merge master branch's changes
This commit is contained in:
commit
96d70feb7d
128 changed files with 726 additions and 588 deletions
|
@ -1,5 +1,5 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.18.0rc2
|
current_version = 0.18.2
|
||||||
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+))?
|
||||||
|
|
47
CHANGELOG.md
47
CHANGELOG.md
|
@ -8,23 +8,17 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
* Trending! The landing page of the app now features content that is surging in popularity relative to past interest.
|
*
|
||||||
* The app now closes to the system tray. This will help improve publish seeding and network performance. Directing the app to quit or exit will close it entirely. (#374)
|
|
||||||
* You can now revoke past publishes to receive your credits. (#581)
|
|
||||||
* You can now unlock tips sent to you so you can send them elsewhere or spend them. (#581)
|
|
||||||
* Added new window menu options for reloading and help.
|
|
||||||
* Rewards are now marked in transaction history (#660)
|
|
||||||
*
|
*
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Daemon updated to [v0.18.0](https://github.com/lbryio/lbry/releases/tag/v0.18.0). The largest changes here are several more network improvements and fixes as well as functionality and improvements related to concurrent heavier usage (bugs and issues largely discoverd by spee.ch).
|
* Moved all redux code into /redux folder
|
||||||
* Replaced all instances of `XMLHttpRequest` with native `Fetch` API (#676).
|
|
||||||
*
|
*
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Fixed console errors on settings page related to improper React input properties.
|
* Long channel names causing inconsistent thumbnail sizes (#721)
|
||||||
* Fixed modals being too narrow after font change (#709)
|
* Fixed regression in #697 causing transaction screen to not load for new users (#755)
|
||||||
* Fixed bug that prevented new channel and first publish rewards from being claimed (#290)
|
* Fixed scriolling restore/reset/set (#729)
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
*
|
*
|
||||||
|
@ -34,6 +28,37 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
||||||
|
## [0.18.2] - 2017-11-15
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Email verification is fixed. (#746)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.18.0] - 2017-11-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* Trending! The landing page of the app now features content that is surging in popularity relative to past interest.
|
||||||
|
* The app now closes to the system tray. This will help improve publish seeding and network performance. Directing the app to quit or exit will close it entirely. (#374)
|
||||||
|
* You can now revoke past publishes to receive your credits. (#581)
|
||||||
|
* You can now unlock tips sent to you so you can send them elsewhere or spend them. (#581)
|
||||||
|
* Added new window menu options for reloading and help.
|
||||||
|
* Rewards are now marked in transaction history (#660)
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Daemon updated to [v0.18.0](https://github.com/lbryio/lbry/releases/tag/v0.18.0). The largest changes here are several more network improvements and fixes as well as functionality and improvements related to concurrent heavier usage (bugs and issues largely discoverd by spee.ch).
|
||||||
|
* Improved build and first-run process for new developers.
|
||||||
|
* Replaced all instances of `XMLHttpRequest` with native `Fetch` API (#676).
|
||||||
|
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Fixed console errors on settings page related to improper React input properties.
|
||||||
|
* Fixed modals being too narrow after font change (#709)
|
||||||
|
* Fixed bug that prevented new channel and first publish rewards from being claimed (#290)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [0.17.1] - 2017-10-25
|
## [0.17.1] - 2017-10-25
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
12
README.md
12
README.md
|
@ -18,16 +18,14 @@ Our [releases page](https://github.com/lbryio/lbry-app/releases/latest) also con
|
||||||
|
|
||||||
To install from source or make changes to the application, continue reading below.
|
To install from source or make changes to the application, continue reading below.
|
||||||
|
|
||||||
## Development
|
## Development on Linux and macOS
|
||||||
|
|
||||||
### One-time Setup
|
### One-time Setup
|
||||||
|
|
||||||
1. Install npm and node (v6 and above required, use [nvm](https://github.com/creationix/nvm/blob/master/README.md) if having trouble)
|
1. Clone this repo
|
||||||
2. Install keytar and libsecret (see [keytar repository](https://github.com/atom/node-keytar) )
|
2. `DEPS=true ./build.sh`
|
||||||
3. Install yarn by running: npm install -g yarn (may require elevated permissions)
|
|
||||||
4. Check out this repo.
|
This will download and install the LBRY app and its dependencies, including [the LBRY daemon](https://github.com/lbryio/lbry) and command line utilities like `node` and `yarn`. The LBRY app requires Node >= 6; if you have an earlier version of Node installed and want to keep it, you can use [nvm](https://github.com/creationix/nvm) to switch back and forth.
|
||||||
5. Set up a Python virtual environment, or live on the wild side.
|
|
||||||
6. Run `./build.sh`. This builds the UI assets and puts them into `app/dist`. It also downloads [lbry daemon](https://github.com/lbryio/lbry/releases).
|
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
|
|
10
app/main.js
10
app/main.js
|
@ -226,7 +226,15 @@ function createWindow () {
|
||||||
function createTray () {
|
function createTray () {
|
||||||
// Minimize to tray logic follows:
|
// Minimize to tray logic follows:
|
||||||
// Set the tray icon
|
// Set the tray icon
|
||||||
const iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
let iconPath;
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
|
// Using @2x for mac retina screens so the icon isn't blurry
|
||||||
|
// file name needs to include "Template" at the end for dark menu bar
|
||||||
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/macTemplate@2x.png");
|
||||||
|
} else {
|
||||||
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
||||||
|
}
|
||||||
|
|
||||||
tray = new Tray(iconPath);
|
tray = new Tray(iconPath);
|
||||||
tray.setToolTip("LBRY App");
|
tray.setToolTip("LBRY App");
|
||||||
tray.setTitle("LBRY");
|
tray.setTitle("LBRY");
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "LBRY",
|
"name": "LBRY",
|
||||||
"version": "0.18.0rc2",
|
"version": "0.18.2",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||||
|
"homepage": "https://github.com/lbryio/lbry-app",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LBRY Inc.",
|
"name": "LBRY Inc.",
|
||||||
"email": "hello@lbry.io"
|
"email": "hello@lbry.io"
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# this is here because teamcity runs /build.sh to build the project
|
# this is here because teamcity runs /build.sh to build the project
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
$DIR/build/build.sh
|
"$DIR/build/build.sh"
|
||||||
|
|
|
@ -23,7 +23,7 @@ cd ui
|
||||||
yarn install
|
yarn install
|
||||||
npm rebuild node-sass
|
npm rebuild node-sass
|
||||||
node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\
|
node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\
|
||||||
node_modules\.bin\webpack
|
node_modules\.bin\webpack --config webpack.prod.js
|
||||||
Copy-Item dist ..\app\ -recurse
|
Copy-Item dist ..\app\ -recurse
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
|
@ -29,25 +29,14 @@ FULL_BUILD="${FULL_BUILD:-false}"
|
||||||
if [ -n "${TEAMCITY_VERSION:-}" -o -n "${APPVEYOR:-}" ]; then
|
if [ -n "${TEAMCITY_VERSION:-}" -o -n "${APPVEYOR:-}" ]; then
|
||||||
FULL_BUILD="true"
|
FULL_BUILD="true"
|
||||||
fi
|
fi
|
||||||
if [ "$FULL_BUILD" != "true" ]; then
|
|
||||||
echo -e "\033[1;36mDependencies will NOT be installed. Run with 'FULL_BUILD=true' to install dependencies.\x1b[m"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$FULL_BUILD" == "true" ]; then
|
DEPS="${DEPS:-$FULL_BUILD}"
|
||||||
|
if [ "$DEPS" != "true" ]; then
|
||||||
|
echo -e "\033[1;36mDependencies will NOT be installed. Run with \"INSTALL_DEPENDENCIES=true\" to install dependencies, or \"FULL_BUILD=true\" to install dependencies and build a complete app.\x1b[m"
|
||||||
|
else
|
||||||
# install dependencies
|
# install dependencies
|
||||||
echo -e "\033[0;32mInstalling Dependencies\x1b[m"
|
echo -e "\033[0;32mInstalling Dependencies\x1b[m"
|
||||||
$BUILD_DIR/prebuild.sh
|
"$BUILD_DIR/install_deps.sh"
|
||||||
|
|
||||||
VENV="$BUILD_DIR/venv"
|
|
||||||
if [ -d "$VENV" ]; then
|
|
||||||
rm -rf "$VENV"
|
|
||||||
fi
|
|
||||||
virtualenv "$VENV"
|
|
||||||
set +u
|
|
||||||
source "$VENV/bin/activate"
|
|
||||||
set -u
|
|
||||||
pip install -r "$BUILD_DIR/requirements.txt"
|
|
||||||
python "$BUILD_DIR/set_version.py"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist"
|
[ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist"
|
||||||
|
@ -90,7 +79,7 @@ DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/
|
||||||
DAEMON_VER_PATH="$BUILD_DIR/daemon.ver"
|
DAEMON_VER_PATH="$BUILD_DIR/daemon.ver"
|
||||||
echo "$DAEMON_VER_PATH"
|
echo "$DAEMON_VER_PATH"
|
||||||
if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/app/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then
|
if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/app/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then
|
||||||
wget --quiet "$DAEMON_URL" -O "$BUILD_DIR/daemon.zip"
|
curl -sL -o "$BUILD_DIR/daemon.zip" "$DAEMON_URL"
|
||||||
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/app/dist/"
|
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/app/dist/"
|
||||||
rm "$BUILD_DIR/daemon.zip"
|
rm "$BUILD_DIR/daemon.zip"
|
||||||
echo "$DAEMON_VER" > "$DAEMON_VER_PATH"
|
echo "$DAEMON_VER" > "$DAEMON_VER_PATH"
|
||||||
|
@ -134,9 +123,13 @@ if [ "$FULL_BUILD" == "true" ]; then
|
||||||
# electron-build has a publish feature, but I had a hard time getting
|
# electron-build has a publish feature, but I had a hard time getting
|
||||||
# it to reliably work and it also seemed difficult to configure. Not proud of
|
# it to reliably work and it also seemed difficult to configure. Not proud of
|
||||||
# this, but it seemed better to write my own.
|
# this, but it seemed better to write my own.
|
||||||
python "$BUILD_DIR/upload_assets.py"
|
VENV="$BUILD_DIR/venv"
|
||||||
|
if [ -d "$VENV" ]; then
|
||||||
deactivate
|
rm -rf "$VENV"
|
||||||
|
fi
|
||||||
|
virtualenv "$VENV"
|
||||||
|
"$VENV/bin/pip" install -r "$BUILD_DIR/requirements.txt"
|
||||||
|
"$VENV/bin/python" "$BUILD_DIR/upload_assets.py"
|
||||||
|
|
||||||
echo -e '\033[0;32mBuild and packaging complete.\x1b[m'
|
echo -e '\033[0;32mBuild and packaging complete.\x1b[m'
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
set -x
|
|
||||||
|
|
||||||
|
|
||||||
LINUX=false
|
LINUX=false
|
||||||
OSX=false
|
OSX=false
|
||||||
|
@ -18,7 +16,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
SUDO=''
|
SUDO=''
|
||||||
if $LINUX && (( $EUID != 0 )); then
|
if (( $EUID != 0 )); then
|
||||||
SUDO='sudo'
|
SUDO='sudo'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +39,7 @@ set -eu
|
||||||
|
|
||||||
if $LINUX; then
|
if $LINUX; then
|
||||||
INSTALL="$SUDO apt-get install --no-install-recommends -y"
|
INSTALL="$SUDO apt-get install --no-install-recommends -y"
|
||||||
$INSTALL build-essential libssl-dev libffi-dev libgmp3-dev python2.7-dev libsecret-1-dev wget
|
$INSTALL build-essential libssl-dev libffi-dev libgmp3-dev python2.7-dev libsecret-1-dev curl
|
||||||
elif $OSX && ! cmd_exists brew ; then
|
elif $OSX && ! cmd_exists brew ; then
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
fi
|
fi
|
||||||
|
@ -52,6 +50,9 @@ if ! cmd_exists python; then
|
||||||
$INSTALL python2.7
|
$INSTALL python2.7
|
||||||
elif $OSX; then
|
elif $OSX; then
|
||||||
brew install python
|
brew install python
|
||||||
|
else
|
||||||
|
echo "python2.7 required"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -64,11 +65,13 @@ fi
|
||||||
if ! cmd_exists pip; then
|
if ! cmd_exists pip; then
|
||||||
if $LINUX; then
|
if $LINUX; then
|
||||||
$INSTALL python-pip
|
$INSTALL python-pip
|
||||||
$SUDO pip install --upgrade pip
|
elif $OSX; then
|
||||||
|
$SUDO easy_install pip
|
||||||
else
|
else
|
||||||
echo "Pip required"
|
echo "pip required"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
$SUDO pip install --upgrade pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $LINUX && [ "$(pip list --format=columns | grep setuptools | wc -l)" -ge 1 ]; then
|
if $LINUX && [ "$(pip list --format=columns | grep setuptools | wc -l)" -ge 1 ]; then
|
||||||
|
@ -85,6 +88,9 @@ if ! cmd_exists node; then
|
||||||
$INSTALL nodejs
|
$INSTALL nodejs
|
||||||
elif $OSX; then
|
elif $OSX; then
|
||||||
brew install node
|
brew install node
|
||||||
|
else
|
||||||
|
echo "node required"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -96,16 +102,17 @@ if ! cmd_exists yarn; then
|
||||||
$SUDO apt-get install yarn
|
$SUDO apt-get install yarn
|
||||||
elif $OSX; then
|
elif $OSX; then
|
||||||
brew install yarn
|
brew install yarn
|
||||||
|
else
|
||||||
|
echo "yarn required"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! cmd_exists unzip; then
|
if ! cmd_exists unzip; then
|
||||||
if $LINUX; then
|
if $LINUX; then
|
||||||
$INSTALL unzip
|
$INSTALL unzip
|
||||||
elif $OSX; then
|
else
|
||||||
echo "unzip required"
|
echo "unzip required"
|
||||||
exit 1
|
exit 1
|
||||||
# not sure this works, but OSX should come with unzip
|
|
||||||
# brew install unzip
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
|
@ -1,21 +0,0 @@
|
||||||
"""Set the package version to the output of `git describe`"""
|
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import os.path
|
|
||||||
import sys
|
|
||||||
import fileinput
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
filename = os.path.abspath(
|
|
||||||
os.path.join(os.path.abspath(__file__), '..', '..', 'ui', 'js', 'lbryio.js'))
|
|
||||||
for line in fileinput.input(filename, inplace=True):
|
|
||||||
if line.startswith(' enabled: false'):
|
|
||||||
print(' enabled: true')
|
|
||||||
else:
|
|
||||||
print(line, end='')
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main())
|
|
BIN
ui/dist/img/fav/macTemplate@2x.png
vendored
Normal file
BIN
ui/dist/img/fav/macTemplate@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -1,14 +1,20 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectPageTitle } from "selectors/navigation";
|
import {
|
||||||
import { selectUser } from "selectors/user";
|
selectPageTitle,
|
||||||
import { doAlertError } from "actions/app";
|
selectHistoryIndex,
|
||||||
import { doRecordScroll } from "actions/navigation";
|
selectActiveHistoryEntry,
|
||||||
|
} from "redux/selectors/navigation";
|
||||||
|
import { selectUser } from "redux/selectors/user";
|
||||||
|
import { doAlertError } from "redux/actions/app";
|
||||||
|
import { doRecordScroll } from "redux/actions/navigation";
|
||||||
import App from "./view";
|
import App from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
pageTitle: selectPageTitle(state),
|
pageTitle: selectPageTitle(state),
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
|
currentStackIndex: selectHistoryIndex(state),
|
||||||
|
currentPageAttributes: selectActiveHistoryEntry(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -4,30 +4,49 @@ import Header from "component/header";
|
||||||
import Theme from "component/theme";
|
import Theme from "component/theme";
|
||||||
import ModalRouter from "modal/modalRouter";
|
import ModalRouter from "modal/modalRouter";
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
||||||
|
import throttle from "util/throttle";
|
||||||
|
|
||||||
class App extends React.PureComponent {
|
class App extends React.PureComponent {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.mainContent = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { alertError } = this.props;
|
const { alertError } = this.props;
|
||||||
|
|
||||||
document.addEventListener("unhandledError", event => {
|
document.addEventListener("unhandledError", event => {
|
||||||
alertError(event.detail);
|
alertError(event.detail);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.scrollListener = () => this.props.recordScroll(window.scrollY);
|
componentDidMount() {
|
||||||
|
const { recordScroll } = this.props;
|
||||||
|
const mainContent = document.getElementById("main-content");
|
||||||
|
this.mainContent = mainContent;
|
||||||
|
|
||||||
window.addEventListener("scroll", this.scrollListener);
|
const scrollListener = () => recordScroll(this.mainContent.scrollTop);
|
||||||
|
|
||||||
this.setTitleFromProps(this.props);
|
this.mainContent.addEventListener("scroll", throttle(scrollListener, 750));
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
window.removeEventListener("scroll", this.scrollListener);
|
this.mainContent.removeEventListener("scroll", this.scrollListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(props) {
|
componentWillReceiveProps(props) {
|
||||||
this.setTitleFromProps(props);
|
this.setTitleFromProps(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidUpdate(prevProps) {
|
||||||
|
const { currentStackIndex: prevStackIndex } = prevProps;
|
||||||
|
const { currentStackIndex, currentPageAttributes } = this.props;
|
||||||
|
|
||||||
|
if (currentStackIndex !== prevStackIndex) {
|
||||||
|
this.mainContent.scrollTop = currentPageAttributes.scrollY || 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setTitleFromProps(props) {
|
setTitleFromProps(props) {
|
||||||
window.document.title = props.pageTitle || "LBRY";
|
window.document.title = props.pageTitle || "LBRY";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectUserEmail } from "selectors/user";
|
import { selectUserEmail } from "redux/selectors/user";
|
||||||
import CardVerify from "./view";
|
import CardVerify from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { makeSelectClaimForUri } from "selectors/claims";
|
import { makeSelectClaimForUri } from "redux/selectors/claims";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { makeSelectTotalItemsForChannel } from "selectors/content";
|
import { makeSelectTotalItemsForChannel } from "redux/selectors/content";
|
||||||
import { makeSelectIsUriResolving } from "selectors/content";
|
import { makeSelectIsUriResolving } from "redux/selectors/content";
|
||||||
import ChannelTile from "./view";
|
import ChannelTile from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { makeSelectBlockDate } from "selectors/wallet";
|
import { makeSelectBlockDate } from "redux/selectors/wallet";
|
||||||
import { doFetchBlock } from "actions/wallet";
|
import { doFetchBlock } from "redux/actions/wallet";
|
||||||
import DateTime from "./view";
|
import DateTime from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
date: !props.date && props.block
|
date:
|
||||||
? makeSelectBlockDate(props.block)(state)
|
!props.date && props.block
|
||||||
: props.date,
|
? makeSelectBlockDate(props.block)(state)
|
||||||
|
: props.date,
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
import { makeSelectCostInfoForUri } from "redux/selectors/cost_info";
|
||||||
import { doOpenModal } from "actions/app";
|
import { doOpenModal } from "redux/actions/app";
|
||||||
import { makeSelectClaimIsMine } from "selectors/claims";
|
import { makeSelectClaimIsMine } from "redux/selectors/claims";
|
||||||
import FileActions from "./view";
|
import FileActions from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { selectShowNsfw } from "selectors/settings";
|
import { selectShowNsfw } from "redux/selectors/settings";
|
||||||
import {
|
import {
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectMetadataForUri,
|
makeSelectMetadataForUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
import {
|
import {
|
||||||
makeSelectIsUriResolving,
|
makeSelectIsUriResolving,
|
||||||
selectRewardContentClaimIds,
|
selectRewardContentClaimIds,
|
||||||
} from "selectors/content";
|
} from "redux/selectors/content";
|
||||||
import FileCard from "./view";
|
import FileCard from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -4,10 +4,10 @@ import {
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectContentTypeForUri,
|
makeSelectContentTypeForUri,
|
||||||
makeSelectMetadataForUri,
|
makeSelectMetadataForUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import FileDetails from "./view";
|
import FileDetails from "./view";
|
||||||
import { doOpenFileInFolder } from "actions/file_info";
|
import { doOpenFileInFolder } from "redux/actions/file_info";
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
|
|
|
@ -4,11 +4,11 @@ import {
|
||||||
makeSelectFileInfoForUri,
|
makeSelectFileInfoForUri,
|
||||||
makeSelectDownloadingForUri,
|
makeSelectDownloadingForUri,
|
||||||
makeSelectLoadingForUri,
|
makeSelectLoadingForUri,
|
||||||
} from "selectors/file_info";
|
} from "redux/selectors/file_info";
|
||||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
import { makeSelectCostInfoForUri } from "redux/selectors/cost_info";
|
||||||
import { doFetchAvailability } from "actions/availability";
|
import { doFetchAvailability } from "redux/actions/availability";
|
||||||
import { doOpenFileInShell } from "actions/file_info";
|
import { doOpenFileInShell } from "redux/actions/file_info";
|
||||||
import { doPurchaseUri, doStartDownload } from "actions/content";
|
import { doPurchaseUri, doStartDownload } from "redux/actions/content";
|
||||||
import FileDownloadLink from "./view";
|
import FileDownloadLink from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doSearch } from "actions/search";
|
import { doSearch } from "redux/actions/search";
|
||||||
import { selectIsSearching, makeSelectSearchUris } from "selectors/search";
|
import {
|
||||||
|
selectIsSearching,
|
||||||
|
makeSelectSearchUris,
|
||||||
|
} from "redux/selectors/search";
|
||||||
import FileListSearch from "./view";
|
import FileListSearch from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchCostInfoForUri } from "actions/cost_info";
|
import { doFetchCostInfoForUri } from "redux/actions/cost_info";
|
||||||
import {
|
import {
|
||||||
makeSelectCostInfoForUri,
|
makeSelectCostInfoForUri,
|
||||||
makeSelectFetchingCostInfoForUri,
|
makeSelectFetchingCostInfoForUri,
|
||||||
} from "selectors/cost_info";
|
} from "redux/selectors/cost_info";
|
||||||
import { makeSelectClaimForUri } from "selectors/claims";
|
import { makeSelectClaimForUri } from "redux/selectors/claims";
|
||||||
import FilePrice from "./view";
|
import FilePrice from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectMetadataForUri,
|
makeSelectMetadataForUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
import { selectShowNsfw } from "selectors/settings";
|
import { selectShowNsfw } from "redux/selectors/settings";
|
||||||
import {
|
import {
|
||||||
makeSelectIsUriResolving,
|
makeSelectIsUriResolving,
|
||||||
selectRewardContentClaimIds,
|
selectRewardContentClaimIds,
|
||||||
} from "selectors/content";
|
} from "redux/selectors/content";
|
||||||
import FileTile from "./view";
|
import FileTile from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -4,13 +4,13 @@ import { connect } from "react-redux";
|
||||||
import {
|
import {
|
||||||
selectIsBackDisabled,
|
selectIsBackDisabled,
|
||||||
selectIsForwardDisabled,
|
selectIsForwardDisabled,
|
||||||
} from "selectors/navigation";
|
} from "redux/selectors/navigation";
|
||||||
import { selectBalance } from "selectors/wallet";
|
import { selectBalance } from "redux/selectors/wallet";
|
||||||
import {
|
import {
|
||||||
doNavigate,
|
doNavigate,
|
||||||
doHistoryBack,
|
doHistoryBack,
|
||||||
doHistoryForward,
|
doHistoryForward,
|
||||||
} from "actions/navigation";
|
} from "redux/actions/navigation";
|
||||||
import Header from "./view";
|
import Header from "./view";
|
||||||
import { selectIsUpgradeAvailable } from "../../selectors/app";
|
import { selectIsUpgradeAvailable } from "../../selectors/app";
|
||||||
import { doDownloadUpgrade } from "../../actions/app";
|
import { doDownloadUpgrade } from "../../actions/app";
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { connect } from "react-redux";
|
||||||
import {
|
import {
|
||||||
selectUserInvitees,
|
selectUserInvitees,
|
||||||
selectUserInviteStatusIsPending,
|
selectUserInviteStatusIsPending,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import InviteList from "./view";
|
import InviteList from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -5,11 +5,11 @@ import {
|
||||||
selectUserInvitesRemaining,
|
selectUserInvitesRemaining,
|
||||||
selectUserInviteNewIsPending,
|
selectUserInviteNewIsPending,
|
||||||
selectUserInviteNewErrorMessage,
|
selectUserInviteNewErrorMessage,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import { makeSelectRewardAmountByType } from "selectors/rewards";
|
import { makeSelectRewardAmountByType } from "redux/selectors/rewards";
|
||||||
|
|
||||||
import { doUserInviteNew } from "actions/user";
|
import { doUserInviteNew } from "redux/actions/user";
|
||||||
|
|
||||||
const select = state => {
|
const select = state => {
|
||||||
const selectReward = makeSelectRewardAmountByType();
|
const selectReward = makeSelectRewardAmountByType();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import Link from "./view";
|
import Link from "./view";
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import NsfwOverlay from "./view";
|
import NsfwOverlay from "./view";
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -340,9 +340,10 @@ class PublishForm extends React.PureComponent {
|
||||||
handleFeePrefChange(feeEnabled) {
|
handleFeePrefChange(feeEnabled) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isFee: feeEnabled,
|
isFee: feeEnabled,
|
||||||
feeAmount: this.state.feeAmount == ""
|
feeAmount:
|
||||||
? this._defaultPaidPrice
|
this.state.feeAmount == ""
|
||||||
: this.state.feeAmount,
|
? this._defaultPaidPrice
|
||||||
|
: this.state.feeAmount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,82 +557,82 @@ class PublishForm extends React.PureComponent {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{!this.state.hasFile && !this.myClaimExists()
|
{!this.state.hasFile && !this.myClaimExists() ? null : (
|
||||||
? null
|
<div>
|
||||||
: <div>
|
<div className="card__content">
|
||||||
<div className="card__content">
|
<FormRow
|
||||||
<FormRow
|
ref="meta_title"
|
||||||
ref="meta_title"
|
label={__("Title")}
|
||||||
label={__("Title")}
|
type="text"
|
||||||
type="text"
|
name="title"
|
||||||
name="title"
|
value={this.state.meta_title}
|
||||||
value={this.state.meta_title}
|
placeholder="Titular Title"
|
||||||
placeholder="Titular Title"
|
onChange={event => {
|
||||||
onChange={event => {
|
this.handleMetadataChange(event);
|
||||||
this.handleMetadataChange(event);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
<div className="card__content">
|
||||||
<div className="card__content">
|
<FormRow
|
||||||
<FormRow
|
type="text"
|
||||||
type="text"
|
label={__("Thumbnail URL")}
|
||||||
label={__("Thumbnail URL")}
|
name="thumbnail"
|
||||||
name="thumbnail"
|
value={this.state.meta_thumbnail}
|
||||||
value={this.state.meta_thumbnail}
|
placeholder="http://spee.ch/mylogo"
|
||||||
placeholder="http://spee.ch/mylogo"
|
onChange={event => {
|
||||||
onChange={event => {
|
this.handleMetadataChange(event);
|
||||||
this.handleMetadataChange(event);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
<div className="card__content">
|
||||||
<div className="card__content">
|
<FormRow
|
||||||
<FormRow
|
type="SimpleMDE"
|
||||||
type="SimpleMDE"
|
label={__("Description")}
|
||||||
label={__("Description")}
|
ref="meta_description"
|
||||||
ref="meta_description"
|
name="description"
|
||||||
name="description"
|
value={this.state.meta_description}
|
||||||
value={this.state.meta_description}
|
placeholder={__("Description of your content")}
|
||||||
placeholder={__("Description of your content")}
|
onChange={text => {
|
||||||
onChange={text => {
|
this.handleDescriptionChanged(text);
|
||||||
this.handleDescriptionChanged(text);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
<div className="card__content">
|
||||||
<div className="card__content">
|
<FormRow
|
||||||
<FormRow
|
label={__("Language")}
|
||||||
label={__("Language")}
|
type="select"
|
||||||
type="select"
|
value={this.state.meta_language}
|
||||||
value={this.state.meta_language}
|
name="language"
|
||||||
name="language"
|
onChange={event => {
|
||||||
onChange={event => {
|
this.handleMetadataChange(event);
|
||||||
this.handleMetadataChange(event);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<option value="en">{__("English")}</option>
|
||||||
<option value="en">{__("English")}</option>
|
<option value="zh">{__("Chinese")}</option>
|
||||||
<option value="zh">{__("Chinese")}</option>
|
<option value="fr">{__("French")}</option>
|
||||||
<option value="fr">{__("French")}</option>
|
<option value="de">{__("German")}</option>
|
||||||
<option value="de">{__("German")}</option>
|
<option value="jp">{__("Japanese")}</option>
|
||||||
<option value="jp">{__("Japanese")}</option>
|
<option value="ru">{__("Russian")}</option>
|
||||||
<option value="ru">{__("Russian")}</option>
|
<option value="es">{__("Spanish")}</option>
|
||||||
<option value="es">{__("Spanish")}</option>
|
</FormRow>
|
||||||
</FormRow>
|
</div>
|
||||||
</div>
|
<div className="card__content">
|
||||||
<div className="card__content">
|
<FormRow
|
||||||
<FormRow
|
type="select"
|
||||||
type="select"
|
label={__("Maturity")}
|
||||||
label={__("Maturity")}
|
value={this.state.meta_nsfw}
|
||||||
value={this.state.meta_nsfw}
|
name="nsfw"
|
||||||
name="nsfw"
|
onChange={event => {
|
||||||
onChange={event => {
|
this.handleMetadataChange(event);
|
||||||
this.handleMetadataChange(event);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
{/* <option value=""></option> */}
|
||||||
{/* <option value=""></option> */}
|
<option value="0">{__("All Ages")}</option>
|
||||||
<option value="0">{__("All Ages")}</option>
|
<option value="1">{__("Adults Only")}</option>
|
||||||
<option value="1">{__("Adults Only")}</option>
|
</FormRow>
|
||||||
</FormRow>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="card">
|
<section className="card">
|
||||||
|
@ -661,17 +662,21 @@ class PublishForm extends React.PureComponent {
|
||||||
<span className={!this.state.isFee ? "hidden" : ""}>
|
<span className={!this.state.isFee ? "hidden" : ""}>
|
||||||
<FormFieldPrice
|
<FormFieldPrice
|
||||||
min="0"
|
min="0"
|
||||||
defaultValue={{ amount: 5.0, currency: "LBC" }}
|
defaultValue={{
|
||||||
|
amount: this._defaultPaidPrice,
|
||||||
|
currency: "LBC",
|
||||||
|
}}
|
||||||
onChange={val => this.handleFeeChange(val)}
|
onChange={val => this.handleFeeChange(val)}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{this.state.isFee && this.state.feeCurrency.toUpperCase() != "LBC"
|
{this.state.isFee &&
|
||||||
? <div className="form-field__helper">
|
this.state.feeCurrency.toUpperCase() != "LBC" ? (
|
||||||
{__(
|
<div className="form-field__helper">
|
||||||
"All content fees are charged in LBC. For non-LBC payment methods, the number of credits charged will be adjusted based on the value of LBRY credits at the time of purchase."
|
{__(
|
||||||
)}
|
"All content fees are charged in LBC. For non-LBC payment methods, the number of credits charged will be adjusted based on the value of LBRY credits at the time of purchase."
|
||||||
</div>
|
)}
|
||||||
: null}
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section className="card">
|
<section className="card">
|
||||||
|
@ -737,49 +742,45 @@ class PublishForm extends React.PureComponent {
|
||||||
"Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International"
|
"Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International"
|
||||||
)}
|
)}
|
||||||
</option>
|
</option>
|
||||||
<option value="copyright">
|
<option value="copyright">{__("Copyrighted...")}</option>
|
||||||
{__("Copyrighted...")}
|
<option value="other">{__("Other...")}</option>
|
||||||
</option>
|
|
||||||
<option value="other">
|
|
||||||
{__("Other...")}
|
|
||||||
</option>
|
|
||||||
</FormRow>
|
</FormRow>
|
||||||
|
|
||||||
{this.state.licenseType == "copyright"
|
{this.state.licenseType == "copyright" ? (
|
||||||
? <FormRow
|
<FormRow
|
||||||
label={__("Copyright notice")}
|
label={__("Copyright notice")}
|
||||||
type="text"
|
type="text"
|
||||||
name="copyright-notice"
|
name="copyright-notice"
|
||||||
value={this.state.copyrightNotice}
|
value={this.state.copyrightNotice}
|
||||||
onChange={event => {
|
onChange={event => {
|
||||||
this.handleCopyrightNoticeChange(event);
|
this.handleCopyrightNoticeChange(event);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
: null}
|
) : null}
|
||||||
|
|
||||||
{this.state.licenseType == "other"
|
{this.state.licenseType == "other" ? (
|
||||||
? <FormRow
|
<FormRow
|
||||||
label={__("License description")}
|
label={__("License description")}
|
||||||
type="text"
|
type="text"
|
||||||
name="other-license-description"
|
name="other-license-description"
|
||||||
value={this.state.otherLicenseDescription}
|
value={this.state.otherLicenseDescription}
|
||||||
onChange={event => {
|
onChange={event => {
|
||||||
this.handleOtherLicenseDescriptionChange(event);
|
this.handleOtherLicenseDescriptionChange(event);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
: null}
|
) : null}
|
||||||
|
|
||||||
{this.state.licenseType == "other"
|
{this.state.licenseType == "other" ? (
|
||||||
? <FormRow
|
<FormRow
|
||||||
label={__("License URL")}
|
label={__("License URL")}
|
||||||
type="text"
|
type="text"
|
||||||
name="other-license-url"
|
name="other-license-url"
|
||||||
value={this.state.otherLicenseUrl}
|
value={this.state.otherLicenseUrl}
|
||||||
onChange={event => {
|
onChange={event => {
|
||||||
this.handleOtherLicenseUrlChange(event);
|
this.handleOtherLicenseUrlChange(event);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
: null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -795,8 +796,7 @@ class PublishForm extends React.PureComponent {
|
||||||
<div className="card__subtitle">
|
<div className="card__subtitle">
|
||||||
{__(
|
{__(
|
||||||
"This is the exact address where people find your content (ex. lbry://myvideo)."
|
"This is the exact address where people find your content (ex. lbry://myvideo)."
|
||||||
)}
|
)}{" "}
|
||||||
{" "}
|
|
||||||
<Link
|
<Link
|
||||||
label={__("Learn more")}
|
label={__("Learn more")}
|
||||||
href="https://lbry.io/faq/naming"
|
href="https://lbry.io/faq/naming"
|
||||||
|
@ -805,9 +805,11 @@ class PublishForm extends React.PureComponent {
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<FormRow
|
<FormRow
|
||||||
prefix={`lbry://${this.state.channel === "anonymous"
|
prefix={`lbry://${
|
||||||
? ""
|
this.state.channel === "anonymous"
|
||||||
: `${this.state.channel}/`}`}
|
? ""
|
||||||
|
: `${this.state.channel}/`
|
||||||
|
}`}
|
||||||
type="text"
|
type="text"
|
||||||
ref="name"
|
ref="name"
|
||||||
placeholder="myname"
|
placeholder="myname"
|
||||||
|
@ -818,24 +820,26 @@ class PublishForm extends React.PureComponent {
|
||||||
helper={this.getNameBidHelpText()}
|
helper={this.getNameBidHelpText()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{this.state.rawName
|
{this.state.rawName ? (
|
||||||
? <div className="card__content">
|
<div className="card__content">
|
||||||
<FormRow
|
<FormRow
|
||||||
ref="bid"
|
ref="bid"
|
||||||
type="number"
|
type="number"
|
||||||
step="any"
|
step="any"
|
||||||
label={__("Deposit")}
|
label={__("Deposit")}
|
||||||
postfix="LBC"
|
postfix="LBC"
|
||||||
onChange={event => {
|
onChange={event => {
|
||||||
this.handleBidChange(event);
|
this.handleBidChange(event);
|
||||||
}}
|
}}
|
||||||
value={this.state.bid}
|
value={this.state.bid}
|
||||||
placeholder={this.claim() ? this.topClaimValue() + 10 : 100}
|
placeholder={this.claim() ? this.topClaimValue() + 10 : 100}
|
||||||
helper={lbcInputHelp}
|
helper={lbcInputHelp}
|
||||||
min="0"
|
min="0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
: ""}
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="card">
|
<section className="card">
|
||||||
|
@ -847,8 +851,7 @@ class PublishForm extends React.PureComponent {
|
||||||
ref="tosAgree"
|
ref="tosAgree"
|
||||||
label={
|
label={
|
||||||
<span>
|
<span>
|
||||||
{__("I agree to the")}
|
{__("I agree to the")}{" "}
|
||||||
{" "}
|
|
||||||
<Link
|
<Link
|
||||||
href="https://www.lbry.io/termsofservice"
|
href="https://www.lbry.io/termsofservice"
|
||||||
label={__("LBRY terms of service")}
|
label={__("LBRY terms of service")}
|
||||||
|
@ -894,8 +897,8 @@ class PublishForm extends React.PureComponent {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
{__("Your file has been published to LBRY at the address")}
|
{__("Your file has been published to LBRY at the address")}{" "}
|
||||||
{" "}<code>{this.state.uri}</code>!
|
<code>{this.state.uri}</code>!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{__(
|
{__(
|
||||||
|
|
|
@ -4,9 +4,12 @@ import {
|
||||||
makeSelectClaimRewardError,
|
makeSelectClaimRewardError,
|
||||||
makeSelectRewardByType,
|
makeSelectRewardByType,
|
||||||
makeSelectIsRewardClaimPending,
|
makeSelectIsRewardClaimPending,
|
||||||
} from "selectors/rewards";
|
} from "redux/selectors/rewards";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doClaimRewardType, doClaimRewardClearError } from "actions/rewards";
|
import {
|
||||||
|
doClaimRewardType,
|
||||||
|
doClaimRewardClearError,
|
||||||
|
} from "redux/actions/rewards";
|
||||||
import RewardLink from "./view";
|
import RewardLink from "./view";
|
||||||
|
|
||||||
const makeSelect = () => {
|
const makeSelect = () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectClaimedRewards } from "selectors/rewards";
|
import { selectClaimedRewards } from "redux/selectors/rewards";
|
||||||
import RewardListClaimed from "./view";
|
import RewardListClaimed from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectUnclaimedRewardValue } from "selectors/rewards";
|
import { selectUnclaimedRewardValue } from "redux/selectors/rewards";
|
||||||
import RewardSummary from "./view";
|
import RewardSummary from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Router from "./view.jsx";
|
||||||
import {
|
import {
|
||||||
selectCurrentPage,
|
selectCurrentPage,
|
||||||
selectCurrentParams,
|
selectCurrentParams,
|
||||||
} from "selectors/navigation.js";
|
} from "redux/selectors/navigation.js";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
params: selectCurrentParams(state),
|
params: selectCurrentParams(state),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doRemoveSnackBarSnack } from "actions/app";
|
import { doRemoveSnackBarSnack } from "redux/actions/app";
|
||||||
import { selectSnackBarSnacks } from "selectors/app";
|
import { selectSnackBarSnacks } from "redux/selectors/app";
|
||||||
import SnackBar from "./view";
|
import SnackBar from "./view";
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
|
||||||
import { selectCurrentModal, selectDaemonVersionMatched } from "selectors/app";
|
import {
|
||||||
import { doCheckDaemonVersion } from "actions/app";
|
selectCurrentModal,
|
||||||
|
selectDaemonVersionMatched,
|
||||||
|
} from "redux/selectors/app";
|
||||||
|
import { doCheckDaemonVersion } from "redux/actions/app";
|
||||||
import SplashScreen from "./view";
|
import SplashScreen from "./view";
|
||||||
|
|
||||||
const select = state => {
|
const select = state => {
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectCurrentPage, selectHeaderLinks } from "selectors/navigation";
|
import {
|
||||||
import { doNavigate } from "actions/navigation";
|
selectCurrentPage,
|
||||||
|
selectHeaderLinks,
|
||||||
|
} from "redux/selectors/navigation";
|
||||||
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import SubHeader from "./view";
|
import SubHeader from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectThemePath } from "selectors/settings.js";
|
import { selectThemePath } from "redux/selectors/settings.js";
|
||||||
import Theme from "./view";
|
import Theme from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doOpenModal } from "actions/app";
|
import { doOpenModal } from "redux/actions/app";
|
||||||
import { selectClaimedRewardsByTransactionId } from "selectors/rewards";
|
import { selectClaimedRewardsByTransactionId } from "redux/selectors/rewards";
|
||||||
import { selectAllMyClaimsByOutpoint } from "selectors/claims";
|
import { selectAllMyClaimsByOutpoint } from "redux/selectors/claims";
|
||||||
import TransactionList from "./view";
|
import TransactionList from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchTransactions } from "actions/wallet";
|
import { doFetchTransactions } from "redux/actions/wallet";
|
||||||
import {
|
import {
|
||||||
selectBalance,
|
selectBalance,
|
||||||
selectRecentTransactions,
|
selectRecentTransactions,
|
||||||
selectHasTransactions,
|
selectHasTransactions,
|
||||||
selectIsFetchingTransactions,
|
selectIsFetchingTransactions,
|
||||||
} from "selectors/wallet";
|
} from "redux/selectors/wallet";
|
||||||
|
|
||||||
import TransactionListRecent from "./view";
|
import TransactionListRecent from "./view";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import lbryuri from "lbryuri";
|
import lbryuri from "lbryuri";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { makeSelectIsUriResolving } from "selectors/content";
|
import { makeSelectIsUriResolving } from "redux/selectors/content";
|
||||||
import { makeSelectClaimForUri } from "selectors/claims";
|
import { makeSelectClaimForUri } from "redux/selectors/claims";
|
||||||
import UriIndicator from "./view";
|
import UriIndicator from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -60,13 +60,17 @@ class UriIndicator extends React.PureComponent {
|
||||||
|
|
||||||
const inner = (
|
const inner = (
|
||||||
<span>
|
<span>
|
||||||
{channelName} {" "}
|
<span className="channel-name">{channelName}</span>{" "}
|
||||||
{!signatureIsValid
|
{!signatureIsValid ? (
|
||||||
? <Icon
|
<Icon
|
||||||
icon={icon}
|
icon={icon}
|
||||||
className={`channel-indicator__icon channel-indicator__icon--${modifier}`}
|
className={`channel-indicator__icon channel-indicator__icon--${
|
||||||
/>
|
modifier
|
||||||
: ""}
|
}`}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doUserEmailNew, doUserInviteNew } from "actions/user";
|
import { doUserEmailNew, doUserInviteNew } from "redux/actions/user";
|
||||||
import {
|
import {
|
||||||
selectEmailNewIsPending,
|
selectEmailNewIsPending,
|
||||||
selectEmailNewErrorMessage,
|
selectEmailNewErrorMessage,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import UserEmailNew from "./view";
|
import UserEmailNew from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doUserEmailVerify } from "actions/user";
|
import { doUserEmailVerify } from "redux/actions/user";
|
||||||
import {
|
import {
|
||||||
selectEmailVerifyIsPending,
|
selectEmailVerifyIsPending,
|
||||||
selectEmailToVerify,
|
selectEmailToVerify,
|
||||||
selectEmailVerifyErrorMessage,
|
selectEmailVerifyErrorMessage,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import UserEmailVerify from "./view";
|
import UserEmailVerify from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doUserIdentityVerify } from "actions/user";
|
import { doUserIdentityVerify } from "redux/actions/user";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import { makeSelectRewardByType } from "selectors/rewards";
|
import { makeSelectRewardByType } from "redux/selectors/rewards";
|
||||||
import {
|
import {
|
||||||
selectIdentityVerifyIsPending,
|
selectIdentityVerifyIsPending,
|
||||||
selectIdentityVerifyErrorMessage,
|
selectIdentityVerifyErrorMessage,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import UserVerify from "./view";
|
import UserVerify from "./view";
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doChangeVolume } from "actions/app";
|
import { doChangeVolume } from "redux/actions/app";
|
||||||
import { selectVolume } from "selectors/app";
|
import { selectVolume } from "redux/selectors/app";
|
||||||
import { doPlayUri, doSetPlayingUri } from "actions/content";
|
import { doPlayUri, doSetPlayingUri } from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
makeSelectMetadataForUri,
|
makeSelectMetadataForUri,
|
||||||
makeSelectContentTypeForUri,
|
makeSelectContentTypeForUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import {
|
import {
|
||||||
makeSelectFileInfoForUri,
|
makeSelectFileInfoForUri,
|
||||||
makeSelectLoadingForUri,
|
makeSelectLoadingForUri,
|
||||||
makeSelectDownloadingForUri,
|
makeSelectDownloadingForUri,
|
||||||
} from "selectors/file_info";
|
} from "redux/selectors/file_info";
|
||||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
import { makeSelectCostInfoForUri } from "redux/selectors/cost_info";
|
||||||
import { selectShowNsfw } from "selectors/settings";
|
import { selectShowNsfw } from "redux/selectors/settings";
|
||||||
import Video from "./view";
|
import Video from "./view";
|
||||||
import { selectPlayingUri } from "selectors/content";
|
import { selectPlayingUri } from "redux/selectors/content";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
costInfo: makeSelectCostInfoForUri(props.uri)(state),
|
costInfo: makeSelectCostInfoForUri(props.uri)(state),
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCheckAddressIsMine, doGetNewAddress } from "actions/wallet";
|
import { doCheckAddressIsMine, doGetNewAddress } from "redux/actions/wallet";
|
||||||
import {
|
import {
|
||||||
selectReceiveAddress,
|
selectReceiveAddress,
|
||||||
selectGettingNewAddress,
|
selectGettingNewAddress,
|
||||||
} from "selectors/wallet";
|
} from "redux/selectors/wallet";
|
||||||
import WalletAddress from "./view";
|
import WalletAddress from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectBalance } from "selectors/wallet";
|
import { selectBalance } from "redux/selectors/wallet";
|
||||||
import WalletBalance from "./view";
|
import WalletBalance from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -4,12 +4,12 @@ import {
|
||||||
doSendDraftTransaction,
|
doSendDraftTransaction,
|
||||||
doSetDraftTransactionAmount,
|
doSetDraftTransactionAmount,
|
||||||
doSetDraftTransactionAddress,
|
doSetDraftTransactionAddress,
|
||||||
} from "actions/wallet";
|
} from "redux/actions/wallet";
|
||||||
import {
|
import {
|
||||||
selectDraftTransactionAmount,
|
selectDraftTransactionAmount,
|
||||||
selectDraftTransactionAddress,
|
selectDraftTransactionAddress,
|
||||||
selectDraftTransactionError,
|
selectDraftTransactionError,
|
||||||
} from "selectors/wallet";
|
} from "redux/selectors/wallet";
|
||||||
|
|
||||||
import WalletSend from "./view";
|
import WalletSend from "./view";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doSendSupport } from "actions/wallet";
|
import { doSendSupport } from "redux/actions/wallet";
|
||||||
import WalletSendTip from "./view";
|
import WalletSendTip from "./view";
|
||||||
import { makeSelectTitleForUri } from "selectors/claims";
|
import { makeSelectTitleForUri } from "redux/selectors/claims";
|
||||||
import { selectIsSendingSupport } from "selectors/wallet";
|
import { selectIsSendingSupport } from "redux/selectors/wallet";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
isPending: selectIsSendingSupport(state),
|
isPending: selectIsSendingSupport(state),
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import lbryuri from "lbryuri.js";
|
import lbryuri from "lbryuri.js";
|
||||||
import { selectWunderBarAddress, selectWunderBarIcon } from "selectors/search";
|
import {
|
||||||
import { doNavigate } from "actions/navigation";
|
selectWunderBarAddress,
|
||||||
|
selectWunderBarIcon,
|
||||||
|
} from "redux/selectors/search";
|
||||||
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import Wunderbar from "./view";
|
import Wunderbar from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -9,26 +9,30 @@ jsonrpc.call = function(
|
||||||
connectFailedCallback,
|
connectFailedCallback,
|
||||||
timeout
|
timeout
|
||||||
) {
|
) {
|
||||||
function checkStatus(response) {
|
function checkAndParse(response) {
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
return response;
|
return response.json();
|
||||||
} else {
|
} else {
|
||||||
var error = new Error(response.statusText);
|
return response.json().then(json => {
|
||||||
error.response = response;
|
let error;
|
||||||
throw error;
|
if (json.error) {
|
||||||
|
error = new Error(json.error);
|
||||||
|
} else {
|
||||||
|
error = new Error("Protocol error with unknown response signature");
|
||||||
|
}
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseJSON(response) {
|
|
||||||
return response.json();
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeRequest(url, options) {
|
function makeRequest(url, options) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fetch(url, options).then(resolve).catch(reject);
|
fetch(url, options)
|
||||||
|
.then(resolve)
|
||||||
|
.catch(reject);
|
||||||
|
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
const e = new Error(__("XMLHttpRequest connection timed out"));
|
const e = new Error(__("Protocol request timed out"));
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
return reject(e);
|
return reject(e);
|
||||||
}, timeout);
|
}, timeout);
|
||||||
|
@ -51,8 +55,7 @@ jsonrpc.call = function(
|
||||||
sessionStorage.setItem("JSONRPCCounter", counter + 1);
|
sessionStorage.setItem("JSONRPCCounter", counter + 1);
|
||||||
|
|
||||||
return fetch(url, options)
|
return fetch(url, options)
|
||||||
.then(checkStatus)
|
.then(checkAndParse)
|
||||||
.then(parseJSON)
|
|
||||||
.then(response => {
|
.then(response => {
|
||||||
const error =
|
const error =
|
||||||
response.error || (response.result && response.result.error);
|
response.error || (response.result && response.result.error);
|
||||||
|
|
|
@ -45,24 +45,25 @@ lbryio.call = function(resource, action, params = {}, method = "get") {
|
||||||
return Promise.reject(new Error(__("Invalid method")));
|
return Promise.reject(new Error(__("Invalid method")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkStatus(response) {
|
function checkAndParse(response) {
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
return response;
|
return response.json();
|
||||||
} else {
|
} else {
|
||||||
var error = new Error(response.statusText);
|
return response.json().then(json => {
|
||||||
error.response = response;
|
let error;
|
||||||
throw error;
|
if (json.error) {
|
||||||
|
error = new Error(json.error);
|
||||||
|
} else {
|
||||||
|
error = new Error("Unknown API error signature");
|
||||||
|
}
|
||||||
|
error.response = response; //this is primarily a hack used in actions/user.js
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseJSON(response) {
|
|
||||||
return response.json();
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeRequest(url, options) {
|
function makeRequest(url, options) {
|
||||||
return fetch(url, options).then(checkStatus).then(parseJSON).catch(e => {
|
return fetch(url, options).then(checkAndParse);
|
||||||
throw e;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return lbryio.getAuthToken().then(token => {
|
return lbryio.getAuthToken().then(token => {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import SnackBar from "component/snackBar";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import store from "store.js";
|
import store from "store.js";
|
||||||
import SplashScreen from "component/splash";
|
import SplashScreen from "component/splash";
|
||||||
import { doDaemonReady } from "actions/app";
|
import { doDaemonReady } from "redux/actions/app";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doDownloadLanguages } from "actions/settings";
|
import { doDownloadLanguages } from "redux/actions/settings";
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
|
|
||||||
const env = ENV;
|
const env = ENV;
|
||||||
|
@ -71,7 +71,10 @@ var init = function() {
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<div><App /><SnackBar /></div>
|
<div>
|
||||||
|
<App />
|
||||||
|
<SnackBar />
|
||||||
|
</div>
|
||||||
</Provider>,
|
</Provider>,
|
||||||
canvas
|
canvas
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doLoadVideo, doSetPlayingUri } from "actions/content";
|
import { doLoadVideo, doSetPlayingUri } from "redux/actions/content";
|
||||||
import { makeSelectMetadataForUri } from "selectors/claims";
|
import { makeSelectMetadataForUri } from "redux/selectors/claims";
|
||||||
import ModalAffirmPurchase from "./view";
|
import ModalAffirmPurchase from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import ModalAuthFailure from "./view";
|
import ModalAuthFailure from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doAuthNavigate } from "actions/navigation";
|
import { doAuthNavigate } from "redux/actions/navigation";
|
||||||
import { doSetClientSetting } from "actions/settings";
|
import { doSetClientSetting } from "redux/actions/settings";
|
||||||
import { selectUserIsRewardApproved } from "selectors/user";
|
import { selectUserIsRewardApproved } from "redux/selectors/user";
|
||||||
import { selectBalance } from "selectors/wallet";
|
import { selectBalance } from "redux/selectors/wallet";
|
||||||
import {
|
import {
|
||||||
makeSelectHasClaimedReward,
|
makeSelectHasClaimedReward,
|
||||||
makeSelectRewardByType,
|
makeSelectRewardByType,
|
||||||
selectUnclaimedRewardValue,
|
selectUnclaimedRewardValue,
|
||||||
} from "selectors/rewards";
|
} from "redux/selectors/rewards";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import ModalCreditIntro from "./view";
|
import ModalCreditIntro from "./view";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { CreditAmount, CurrencySymbol } from "component/common";
|
||||||
import Link from "component/link/index";
|
import Link from "component/link/index";
|
||||||
|
|
||||||
const ModalCreditIntro = props => {
|
const ModalCreditIntro = props => {
|
||||||
const { closeModal, totalRewardValue, verifyAccount } = props;
|
const { closeModal, totalRewardValue, currentBalance, verifyAccount } = props;
|
||||||
const totalRewardRounded = Math.round(totalRewardValue / 10) * 10;
|
const totalRewardRounded = Math.round(totalRewardValue / 10) * 10;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -12,37 +12,41 @@ const ModalCreditIntro = props => {
|
||||||
<section>
|
<section>
|
||||||
<h3 className="modal__header">{__("Blockchain 101")}</h3>
|
<h3 className="modal__header">{__("Blockchain 101")}</h3>
|
||||||
<p>
|
<p>
|
||||||
LBRY is controlled and powered by a blockchain asset called {" "}
|
LBRY is controlled and powered by a blockchain asset called{" "}
|
||||||
<em><CurrencySymbol /></em>.{" "}
|
<em>
|
||||||
<CurrencySymbol />{" "}
|
<CurrencySymbol />
|
||||||
|
</em>. <CurrencySymbol />{" "}
|
||||||
{__(
|
{__(
|
||||||
"is used to publish content, to have a say in the network rules, and to access paid content."
|
"is used to publish content, to have a say in the network rules, and to access paid content."
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
{currentBalance <= 0
|
{currentBalance <= 0 ? (
|
||||||
? <div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
You currently have <CreditAmount amount={currentBalance} />, so
|
You currently have <CreditAmount amount={currentBalance} />, so
|
||||||
the actions you can take are limited.
|
the actions you can take are limited.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
However, there are a variety of ways to get credits, including
|
However, there are a variety of ways to get credits, including
|
||||||
more than {" "}
|
more than{" "}
|
||||||
{totalRewardValue
|
{totalRewardValue ? (
|
||||||
? <CreditAmount amount={totalRewardRounded} />
|
<CreditAmount amount={totalRewardRounded} />
|
||||||
: <span className="credit-amount">{__("?? credits")}</span>}
|
) : (
|
||||||
{" "}{" "}
|
<span className="credit-amount">{__("?? credits")}</span>
|
||||||
{__(
|
)}{" "}
|
||||||
" in rewards available for being a proven human during the LBRY beta."
|
{__(
|
||||||
)}
|
" in rewards available for being a proven human during the LBRY beta."
|
||||||
</p>
|
)}
|
||||||
</div>
|
</p>
|
||||||
: <div>
|
</div>
|
||||||
<p>
|
) : (
|
||||||
But you probably knew this, since you've already got{" "}
|
<div>
|
||||||
<CreditAmount amount={currentBalance} />.
|
<p>
|
||||||
</p>
|
But you probably knew this, since you've already got{" "}
|
||||||
</div>}
|
<CreditAmount amount={currentBalance} />.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="modal__buttons">
|
<div className="modal__buttons">
|
||||||
<Link
|
<Link
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doStartUpgrade, doCancelUpgrade } from "actions/app";
|
import { doStartUpgrade, doCancelUpgrade } from "redux/actions/app";
|
||||||
import { selectDownloadProgress, selectDownloadComplete } from "selectors/app";
|
import {
|
||||||
|
selectDownloadProgress,
|
||||||
|
selectDownloadComplete,
|
||||||
|
} from "redux/selectors/app";
|
||||||
import ModalDownloading from "./view";
|
import ModalDownloading from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import ModalError from "./view";
|
import ModalError from "./view";
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { makeSelectMetadataForUri } from "selectors/claims";
|
import { makeSelectMetadataForUri } from "redux/selectors/claims";
|
||||||
import ModalFileTimeout from "./view";
|
import ModalFileTimeout from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { makeSelectRewardByType } from "selectors/rewards";
|
import { makeSelectRewardByType } from "redux/selectors/rewards";
|
||||||
import ModalFirstReward from "./view";
|
import ModalFirstReward from "./view";
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doQuit, doSkipWrongDaemonNotice } from "actions/app";
|
import { doQuit, doSkipWrongDaemonNotice } from "redux/actions/app";
|
||||||
import ModalIncompatibleDaemon from "./view";
|
import ModalIncompatibleDaemon from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import ModalInsufficientBalance from "./view";
|
import ModalInsufficientBalance from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import ModalInsufficientCredits from "./view";
|
import ModalInsufficientCredits from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doDeleteFileAndGoBack } from "actions/file_info";
|
import { doDeleteFileAndGoBack } from "redux/actions/file_info";
|
||||||
import { makeSelectTitleForUri, makeSelectClaimIsMine } from "selectors/claims";
|
import {
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
makeSelectTitleForUri,
|
||||||
|
makeSelectClaimIsMine,
|
||||||
|
} from "redux/selectors/claims";
|
||||||
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
import ModalRemoveFile from "./view";
|
import ModalRemoveFile from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doAbandonClaim } from "actions/content";
|
import { doAbandonClaim } from "redux/actions/content";
|
||||||
import { selectTransactionItems } from "selectors/wallet";
|
import { selectTransactionItems } from "redux/selectors/wallet";
|
||||||
import ModalRevokeClaim from "./view";
|
import ModalRevokeClaim from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doAuthNavigate } from "actions/navigation";
|
import { doAuthNavigate } from "redux/actions/navigation";
|
||||||
import ModalRewardApprovalRequired from "./view";
|
import ModalRewardApprovalRequired from "./view";
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doOpenModal } from "actions/app";
|
import { doOpenModal } from "redux/actions/app";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import { selectCurrentModal, selectModalProps } from "selectors/app";
|
import { selectCurrentModal, selectModalProps } from "redux/selectors/app";
|
||||||
import { selectCurrentPage } from "selectors/navigation";
|
import { selectCurrentPage } from "redux/selectors/navigation";
|
||||||
import { selectCostForCurrentPageUri } from "selectors/cost_info";
|
import { selectCostForCurrentPageUri } from "redux/selectors/cost_info";
|
||||||
import { makeSelectClientSetting } from "selectors/settings";
|
import { makeSelectClientSetting } from "redux/selectors/settings";
|
||||||
import { selectUser } from "selectors/user";
|
import { selectUser } from "redux/selectors/user";
|
||||||
import { selectBalance } from "selectors/wallet";
|
import { selectBalance } from "redux/selectors/wallet";
|
||||||
import ModalRouter from "./view";
|
import ModalRouter from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import ModalTransactionFailed from "./view";
|
import ModalTransactionFailed from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ModalTransactionFailed extends React.PureComponent {
|
||||||
contentLabel={__("Transaction failed")}
|
contentLabel={__("Transaction failed")}
|
||||||
onConfirmed={closeModal}
|
onConfirmed={closeModal}
|
||||||
>
|
>
|
||||||
{__("Something went wrong")}:
|
{__("Transaction failed.")}:
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doDownloadUpgrade, doSkipUpgrade } from "actions/app";
|
import { doDownloadUpgrade, doSkipUpgrade } from "redux/actions/app";
|
||||||
import ModalUpgrade from "./view";
|
import ModalUpgrade from "./view";
|
||||||
|
|
||||||
const select = state => ({});
|
const select = state => ({});
|
||||||
|
|
|
@ -2,8 +2,8 @@ import React from "react";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import * as modals from "constants/modal_types";
|
import * as modals from "constants/modal_types";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doCloseModal, doOpenModal } from "actions/app";
|
import { doCloseModal, doOpenModal } from "redux/actions/app";
|
||||||
import { doSetClientSetting } from "actions/settings";
|
import { doSetClientSetting } from "redux/actions/settings";
|
||||||
import ModalWelcome from "./view";
|
import ModalWelcome from "./view";
|
||||||
|
|
||||||
const perform = dispatch => () => ({
|
const perform = dispatch => () => ({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectPathAfterAuth } from "selectors/navigation";
|
import { selectPathAfterAuth } from "redux/selectors/navigation";
|
||||||
import {
|
import {
|
||||||
selectAuthenticationIsPending,
|
selectAuthenticationIsPending,
|
||||||
selectEmailToVerify,
|
selectEmailToVerify,
|
||||||
|
@ -9,14 +9,14 @@ import {
|
||||||
selectUser,
|
selectUser,
|
||||||
selectUserIsPending,
|
selectUserIsPending,
|
||||||
selectIdentityVerifyIsPending,
|
selectIdentityVerifyIsPending,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
import AuthPage from "./view";
|
import AuthPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
isPending:
|
isPending:
|
||||||
selectAuthenticationIsPending(state) ||
|
selectAuthenticationIsPending(state) ||
|
||||||
selectUserIsPending(state) ||
|
selectUserIsPending(state) ||
|
||||||
selectIdentityVerifyIsPending(state),
|
selectIdentityVerifyIsPending(state),
|
||||||
email: selectEmailToVerify(state),
|
email: selectEmailToVerify(state),
|
||||||
pathAfterAuth: selectPathAfterAuth(state),
|
pathAfterAuth: selectPathAfterAuth(state),
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectDaemonSettings } from "selectors/settings";
|
import { selectDaemonSettings } from "redux/selectors/settings";
|
||||||
import BackupPage from "./view";
|
import BackupPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -3,18 +3,18 @@ import { connect } from "react-redux";
|
||||||
import {
|
import {
|
||||||
doFetchClaimsByChannel,
|
doFetchClaimsByChannel,
|
||||||
doFetchClaimCountByChannel,
|
doFetchClaimCountByChannel,
|
||||||
} from "actions/content";
|
} from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectClaimsInChannelForCurrentPage,
|
makeSelectClaimsInChannelForCurrentPage,
|
||||||
makeSelectFetchingChannelClaims,
|
makeSelectFetchingChannelClaims,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import {
|
import {
|
||||||
makeSelectCurrentParam,
|
makeSelectCurrentParam,
|
||||||
selectCurrentParams,
|
selectCurrentParams,
|
||||||
} from "selectors/navigation";
|
} from "redux/selectors/navigation";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { makeSelectTotalPagesForChannel } from "selectors/content";
|
import { makeSelectTotalPagesForChannel } from "redux/selectors/content";
|
||||||
import ChannelPage from "./view";
|
import ChannelPage from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchFeaturedUris } from "actions/content";
|
import { doFetchFeaturedUris } from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
selectFeaturedUris,
|
selectFeaturedUris,
|
||||||
selectFetchingFeaturedUris,
|
selectFetchingFeaturedUris,
|
||||||
} from "selectors/content";
|
} from "redux/selectors/content";
|
||||||
import DiscoverPage from "./view";
|
import DiscoverPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { doFetchFileInfo } from "actions/file_info";
|
import { doFetchFileInfo } from "redux/actions/file_info";
|
||||||
import { makeSelectFileInfoForUri } from "selectors/file_info";
|
import { makeSelectFileInfoForUri } from "redux/selectors/file_info";
|
||||||
import { selectRewardContentClaimIds } from "selectors/content";
|
import { selectRewardContentClaimIds } from "redux/selectors/content";
|
||||||
import { doFetchCostInfoForUri } from "actions/cost_info";
|
import { doFetchCostInfoForUri } from "redux/actions/cost_info";
|
||||||
import {
|
import {
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectContentTypeForUri,
|
makeSelectContentTypeForUri,
|
||||||
makeSelectMetadataForUri,
|
makeSelectMetadataForUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
import { makeSelectCostInfoForUri } from "redux/selectors/cost_info";
|
||||||
import { selectShowNsfw } from "selectors/settings";
|
import { selectShowNsfw } from "redux/selectors/settings";
|
||||||
import FilePage from "./view";
|
import FilePage from "./view";
|
||||||
import { makeSelectCurrentParam } from "selectors/navigation";
|
import { makeSelectCurrentParam } from "redux/selectors/navigation";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchFileInfosAndPublishedClaims } from "actions/file_info";
|
import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info";
|
||||||
import {
|
import {
|
||||||
selectFileInfosDownloaded,
|
selectFileInfosDownloaded,
|
||||||
selectIsFetchingFileListDownloadedOrPublished,
|
selectIsFetchingFileListDownloadedOrPublished,
|
||||||
} from "selectors/file_info";
|
} from "redux/selectors/file_info";
|
||||||
import {
|
import {
|
||||||
selectMyClaimsWithoutChannels,
|
selectMyClaimsWithoutChannels,
|
||||||
selectIsFetchingClaimListMine,
|
selectIsFetchingClaimListMine,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { doFetchClaimListMine } from "actions/content";
|
import { doFetchClaimListMine } from "redux/actions/content";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import FileListDownloaded from "./view";
|
import FileListDownloaded from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchClaimListMine } from "actions/content";
|
import { doFetchClaimListMine } from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
selectMyClaimsWithoutChannels,
|
selectMyClaimsWithoutChannels,
|
||||||
selectIsFetchingClaimListMine,
|
selectIsFetchingClaimListMine,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { doClaimRewardType } from "actions/rewards";
|
import { doClaimRewardType } from "redux/actions/rewards";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import FileListPublished from "./view";
|
import FileListPublished from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { doAuthNavigate } from "actions/navigation";
|
import { doAuthNavigate } from "redux/actions/navigation";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchAccessToken } from "actions/user";
|
import { doFetchAccessToken } from "redux/actions/user";
|
||||||
import { selectAccessToken, selectUser } from "selectors/user";
|
import { selectAccessToken, selectUser } from "redux/selectors/user";
|
||||||
import HelpPage from "./view";
|
import HelpPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import InvitePage from "./view";
|
import InvitePage from "./view";
|
||||||
import { doFetchInviteStatus } from "actions/user";
|
import { doFetchInviteStatus } from "redux/actions/user";
|
||||||
import {
|
import {
|
||||||
selectUserInviteStatusFailed,
|
selectUserInviteStatusFailed,
|
||||||
selectUserInviteStatusIsPending,
|
selectUserInviteStatusIsPending,
|
||||||
} from "selectors/user";
|
} from "redux/selectors/user";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
isFailed: selectUserInviteStatusFailed(state),
|
isFailed: selectUserInviteStatusFailed(state),
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doNavigate, doHistoryBack } from "actions/navigation";
|
import { doNavigate, doHistoryBack } from "redux/actions/navigation";
|
||||||
import { doClaimRewardType } from "actions/rewards";
|
import { doClaimRewardType } from "redux/actions/rewards";
|
||||||
import {
|
import {
|
||||||
selectMyClaims,
|
selectMyClaims,
|
||||||
selectFetchingMyChannels,
|
selectFetchingMyChannels,
|
||||||
selectMyChannelClaims,
|
selectMyChannelClaims,
|
||||||
selectClaimsByUri,
|
selectClaimsByUri,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import { selectResolvingUris } from "selectors/content";
|
import { selectResolvingUris } from "redux/selectors/content";
|
||||||
import {
|
import {
|
||||||
doFetchClaimListMine,
|
doFetchClaimListMine,
|
||||||
doFetchChannelListMine,
|
doFetchChannelListMine,
|
||||||
doResolveUri,
|
doResolveUri,
|
||||||
doCreateChannel,
|
doCreateChannel,
|
||||||
doPublish,
|
doPublish,
|
||||||
} from "actions/content";
|
} from "redux/actions/content";
|
||||||
import { selectBalance } from "selectors/wallet";
|
import { selectBalance } from "redux/selectors/wallet";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import PublishPage from "./view";
|
import PublishPage from "./view";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Link from "component/link";
|
import Link from "component/link";
|
||||||
import { FormRow } from "component/form";
|
import { FormRow } from "component/form";
|
||||||
import { doShowSnackBar } from "actions/app";
|
import { doShowSnackBar } from "redux/actions/app";
|
||||||
import lbry from "../lbry.js";
|
import lbry from "../lbry.js";
|
||||||
|
|
||||||
class ReportPage extends React.Component {
|
class ReportPage extends React.Component {
|
||||||
|
@ -86,8 +86,7 @@ class ReportPage extends React.Component {
|
||||||
<section className="card">
|
<section className="card">
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<h3>{__("Developer?")}</h3>
|
<h3>{__("Developer?")}</h3>
|
||||||
{__("You can also")}
|
{__("You can also")}{" "}
|
||||||
{" "}
|
|
||||||
<Link
|
<Link
|
||||||
href="https://github.com/lbryio/lbry/issues"
|
href="https://github.com/lbryio/lbry/issues"
|
||||||
label={__("submit an issue on GitHub")}
|
label={__("submit an issue on GitHub")}
|
||||||
|
|
|
@ -3,10 +3,10 @@ import { connect } from "react-redux";
|
||||||
import {
|
import {
|
||||||
selectFetchingRewards,
|
selectFetchingRewards,
|
||||||
selectUnclaimedRewards,
|
selectUnclaimedRewards,
|
||||||
} from "selectors/rewards";
|
} from "redux/selectors/rewards";
|
||||||
import { selectUser } from "selectors/user";
|
import { selectUser } from "redux/selectors/user";
|
||||||
import { doAuthNavigate, doNavigate } from "actions/navigation";
|
import { doAuthNavigate, doNavigate } from "redux/actions/navigation";
|
||||||
import { doRewardList } from "actions/rewards";
|
import { doRewardList } from "redux/actions/rewards";
|
||||||
import RewardsPage from "./view";
|
import RewardsPage from "./view";
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { selectIsSearching, selectSearchQuery } from "selectors/search";
|
import { selectIsSearching, selectSearchQuery } from "redux/selectors/search";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import SearchPage from "./view";
|
import SearchPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import { doClearCache } from "actions/app";
|
import { doClearCache } from "redux/actions/app";
|
||||||
import {
|
import {
|
||||||
doSetDaemonSetting,
|
doSetDaemonSetting,
|
||||||
doSetClientSetting,
|
doSetClientSetting,
|
||||||
doGetThemes,
|
doGetThemes,
|
||||||
doSetTheme,
|
doSetTheme,
|
||||||
doChangeLanguage,
|
doChangeLanguage,
|
||||||
} from "actions/settings";
|
} from "redux/actions/settings";
|
||||||
import {
|
import {
|
||||||
makeSelectClientSetting,
|
makeSelectClientSetting,
|
||||||
selectDaemonSettings,
|
selectDaemonSettings,
|
||||||
selectLanguages,
|
selectLanguages,
|
||||||
} from "selectors/settings";
|
} from "redux/selectors/settings";
|
||||||
import { selectCurrentLanguage } from "selectors/app";
|
import { selectCurrentLanguage } from "redux/selectors/app";
|
||||||
import SettingsPage from "./view";
|
import SettingsPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { makeSelectClaimForUri } from "selectors/claims";
|
import { makeSelectClaimForUri } from "redux/selectors/claims";
|
||||||
import { makeSelectIsUriResolving } from "selectors/content";
|
import { makeSelectIsUriResolving } from "redux/selectors/content";
|
||||||
import ShowPage from "./view";
|
import ShowPage from "./view";
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { doFetchTransactions } from "actions/wallet";
|
import { doFetchTransactions } from "redux/actions/wallet";
|
||||||
import {
|
import {
|
||||||
selectTransactionItems,
|
selectTransactionItems,
|
||||||
selectIsFetchingTransactions,
|
selectIsFetchingTransactions,
|
||||||
} from "selectors/wallet";
|
} from "redux/selectors/wallet";
|
||||||
import TransactionHistoryPage from "./view";
|
import TransactionHistoryPage from "./view";
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
|
|
@ -7,11 +7,11 @@ import {
|
||||||
selectUpgradeFilename,
|
selectUpgradeFilename,
|
||||||
selectIsUpgradeSkipped,
|
selectIsUpgradeSkipped,
|
||||||
selectRemoteVersion,
|
selectRemoteVersion,
|
||||||
} from "selectors/app";
|
} from "redux/selectors/app";
|
||||||
import { doFetchDaemonSettings } from "actions/settings";
|
import { doFetchDaemonSettings } from "redux/actions/settings";
|
||||||
import { doBalanceSubscribe } from "actions/wallet";
|
import { doBalanceSubscribe } from "redux/actions/wallet";
|
||||||
import { doAuthenticate } from "actions/user";
|
import { doAuthenticate } from "redux/actions/user";
|
||||||
import { doFetchFileInfosAndPublishedClaims } from "actions/file_info";
|
import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info";
|
||||||
import * as modals from "constants/modal_types";
|
import * as modals from "constants/modal_types";
|
||||||
import { doFetchRewardedContent } from "actions/content";
|
import { doFetchRewardedContent } from "actions/content";
|
||||||
import { selectCurrentModal } from "../selectors/app";
|
import { selectCurrentModal } from "../selectors/app";
|
||||||
|
@ -20,7 +20,7 @@ const { remote, ipcRenderer, shell } = require("electron");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { download } = remote.require("electron-dl");
|
const { download } = remote.require("electron-dl");
|
||||||
const fs = remote.require("fs");
|
const fs = remote.require("fs");
|
||||||
const { lbrySettings: config } = require("../../../app/package.json");
|
const { lbrySettings: config } = require("../../../../app/package.json");
|
||||||
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
||||||
|
|
||||||
export function doOpenModal(modal, modalProps = {}) {
|
export function doOpenModal(modal, modalProps = {}) {
|
|
@ -1,6 +1,6 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
||||||
import { selectFetchingAvailability } from "selectors/availability";
|
import { selectFetchingAvailability } from "redux/selectors/availability";
|
||||||
|
|
||||||
export function doFetchAvailability(uri) {
|
export function doFetchAvailability(uri) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
|
@ -3,18 +3,18 @@ import * as settings from "constants/settings";
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
||||||
import lbryio from "lbryio";
|
import lbryio from "lbryio";
|
||||||
import lbryuri from "lbryuri";
|
import lbryuri from "lbryuri";
|
||||||
import { makeSelectClientSetting } from "selectors/settings";
|
import { makeSelectClientSetting } from "redux/selectors/settings";
|
||||||
import { selectBalance, selectTransactionItems } from "selectors/wallet";
|
import { selectBalance, selectTransactionItems } from "redux/selectors/wallet";
|
||||||
import {
|
import {
|
||||||
makeSelectFileInfoForUri,
|
makeSelectFileInfoForUri,
|
||||||
selectDownloadingByOutpoint,
|
selectDownloadingByOutpoint,
|
||||||
} from "selectors/file_info";
|
} from "redux/selectors/file_info";
|
||||||
import { selectResolvingUris } from "selectors/content";
|
import { selectResolvingUris } from "redux/selectors/content";
|
||||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
import { makeSelectCostInfoForUri } from "redux/selectors/cost_info";
|
||||||
import { doAlertError, doOpenModal } from "actions/app";
|
import { doAlertError, doOpenModal } from "redux/actions/app";
|
||||||
import { doClaimEligiblePurchaseRewards } from "actions/rewards";
|
import { doClaimEligiblePurchaseRewards } from "redux/actions/rewards";
|
||||||
import { selectBadgeNumber } from "selectors/app";
|
import { selectBadgeNumber } from "redux/selectors/app";
|
||||||
import { selectTotalDownloadProgress } from "selectors/file_info";
|
import { selectTotalDownloadProgress } from "redux/selectors/file_info";
|
||||||
import setBadge from "util/setBadge";
|
import setBadge from "util/setBadge";
|
||||||
import setProgressBar from "util/setProgressBar";
|
import setProgressBar from "util/setProgressBar";
|
||||||
import batchActions from "util/batchActions";
|
import batchActions from "util/batchActions";
|
||||||
|
@ -51,10 +51,10 @@ export function doResolveUris(uris) {
|
||||||
certificate: null,
|
certificate: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { claim, certificate, claims_in_channel } = uriResolveInfo &&
|
const { claim, certificate, claims_in_channel } =
|
||||||
!uriResolveInfo.error
|
uriResolveInfo && !uriResolveInfo.error
|
||||||
? uriResolveInfo
|
? uriResolveInfo
|
||||||
: fallbackResolveInfo;
|
: fallbackResolveInfo;
|
||||||
resolveInfo[uri] = { claim, certificate, claims_in_channel };
|
resolveInfo[uri] = { claim, certificate, claims_in_channel };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
||||||
import lbryio from "lbryio";
|
import lbryio from "lbryio";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { selectResolvingUris } from "selectors/content";
|
import { selectResolvingUris } from "redux/selectors/content";
|
||||||
import { selectClaimsByUri } from "selectors/claims";
|
import { selectClaimsByUri } from "redux/selectors/claims";
|
||||||
import { selectSettingsIsGenerous } from "selectors/settings";
|
import { selectSettingsIsGenerous } from "redux/selectors/settings";
|
||||||
|
|
||||||
export function doFetchCostInfoForUri(uri) {
|
export function doFetchCostInfoForUri(uri) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
|
@ -45,9 +45,10 @@ export function doFetchCostInfoForUri(uri) {
|
||||||
}, reject);
|
}, reject);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fee = claim.value && claim.value.stream && claim.value.stream.metadata
|
const fee =
|
||||||
? claim.value.stream.metadata.fee
|
claim.value && claim.value.stream && claim.value.stream.metadata
|
||||||
: undefined;
|
? claim.value.stream.metadata.fee
|
||||||
|
: undefined;
|
||||||
|
|
||||||
if (fee === undefined) {
|
if (fee === undefined) {
|
||||||
resolve({ cost: 0, includesData: true });
|
resolve({ cost: 0, includesData: true });
|
|
@ -1,19 +1,19 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
||||||
import { doFetchClaimListMine, doAbandonClaim } from "actions/content";
|
import { doFetchClaimListMine, doAbandonClaim } from "redux/actions/content";
|
||||||
import {
|
import {
|
||||||
selectClaimsByUri,
|
selectClaimsByUri,
|
||||||
selectIsFetchingClaimListMine,
|
selectIsFetchingClaimListMine,
|
||||||
selectMyClaimsOutpoints,
|
selectMyClaimsOutpoints,
|
||||||
} from "selectors/claims";
|
} from "redux/selectors/claims";
|
||||||
import {
|
import {
|
||||||
selectIsFetchingFileList,
|
selectIsFetchingFileList,
|
||||||
selectFileInfosByOutpoint,
|
selectFileInfosByOutpoint,
|
||||||
selectUrisLoading,
|
selectUrisLoading,
|
||||||
selectTotalDownloadProgress,
|
selectTotalDownloadProgress,
|
||||||
} from "selectors/file_info";
|
} from "redux/selectors/file_info";
|
||||||
import { doCloseModal } from "actions/app";
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import { doNavigate, doHistoryBack } from "actions/navigation";
|
import { doNavigate, doHistoryBack } from "redux/actions/navigation";
|
||||||
import setProgressBar from "util/setProgressBar";
|
import setProgressBar from "util/setProgressBar";
|
||||||
import batchActions from "util/batchActions";
|
import batchActions from "util/batchActions";
|
||||||
|
|
|
@ -6,8 +6,8 @@ import {
|
||||||
selectCurrentParams,
|
selectCurrentParams,
|
||||||
selectHistoryStack,
|
selectHistoryStack,
|
||||||
selectHistoryIndex,
|
selectHistoryIndex,
|
||||||
} from "selectors/navigation";
|
} from "redux/selectors/navigation";
|
||||||
import { doSearch } from "actions/search";
|
import { doSearch } from "redux/actions/search";
|
||||||
import { toQueryString } from "util/query_params";
|
import { toQueryString } from "util/query_params";
|
||||||
|
|
||||||
export function doNavigate(path, params = {}, options = {}) {
|
export function doNavigate(path, params = {}, options = {}) {
|
||||||
|
@ -21,21 +21,11 @@ export function doNavigate(path, params = {}, options = {}) {
|
||||||
url += "?" + toQueryString(params);
|
url += "?" + toQueryString(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
const state = getState(),
|
const scrollY = options.scrollY;
|
||||||
currentPage = selectCurrentPage(state),
|
|
||||||
nextPage = computePageFromPath(path),
|
|
||||||
scrollY = options.scrollY;
|
|
||||||
|
|
||||||
if (currentPage != nextPage) {
|
|
||||||
//I wasn't seeing it scroll to the proper position without this -- possibly because the page isn't fully rendered? Not sure - Jeremy
|
|
||||||
setTimeout(() => {
|
|
||||||
window.scrollTo(0, scrollY ? scrollY : 0);
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.HISTORY_NAVIGATE,
|
type: types.HISTORY_NAVIGATE,
|
||||||
data: { url, index: options.index },
|
data: { url, index: options.index, scrollY },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -2,8 +2,8 @@ import * as types from "constants/action_types";
|
||||||
import * as modals from "constants/modal_types";
|
import * as modals from "constants/modal_types";
|
||||||
import lbryio from "lbryio";
|
import lbryio from "lbryio";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
import { selectUnclaimedRewardsByType } from "selectors/rewards";
|
import { selectUnclaimedRewardsByType } from "redux/selectors/rewards";
|
||||||
import { selectUserIsRewardApproved } from "selectors/user";
|
import { selectUserIsRewardApproved } from "redux/selectors/user";
|
||||||
|
|
||||||
export function doRewardList() {
|
export function doRewardList() {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
|
@ -93,12 +93,11 @@ export function doClaimEligiblePurchaseRewards() {
|
||||||
if (rewardsByType[rewards.TYPE_FIRST_STREAM]) {
|
if (rewardsByType[rewards.TYPE_FIRST_STREAM]) {
|
||||||
dispatch(doClaimRewardType(rewards.TYPE_FIRST_STREAM));
|
dispatch(doClaimRewardType(rewards.TYPE_FIRST_STREAM));
|
||||||
} else {
|
} else {
|
||||||
[
|
[rewards.TYPE_MANY_DOWNLOADS, rewards.TYPE_FEATURED_DOWNLOAD].forEach(
|
||||||
rewards.TYPE_MANY_DOWNLOADS,
|
type => {
|
||||||
rewards.TYPE_FEATURED_DOWNLOAD,
|
dispatch(doClaimRewardType(type));
|
||||||
].forEach(type => {
|
}
|
||||||
dispatch(doClaimRewardType(type));
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import lbryuri from "lbryuri";
|
import lbryuri from "lbryuri";
|
||||||
import { doResolveUri } from "actions/content";
|
import { doResolveUri } from "redux/actions/content";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import { selectCurrentPage } from "selectors/navigation";
|
import { selectCurrentPage } from "redux/selectors/navigation";
|
||||||
import batchActions from "util/batchActions";
|
import batchActions from "util/batchActions";
|
||||||
|
|
||||||
export function doSearch(rawQuery) {
|
export function doSearch(rawQuery) {
|
|
@ -1,6 +1,6 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import { doAlertError } from "actions/app";
|
import { doAlertError } from "redux/actions/app";
|
||||||
import batchActions from "util/batchActions";
|
import batchActions from "util/batchActions";
|
||||||
|
|
||||||
import lbry from "lbry";
|
import lbry from "lbry";
|
|
@ -1,9 +1,9 @@
|
||||||
import * as types from "constants/action_types";
|
import * as types from "constants/action_types";
|
||||||
import * as modals from "constants/modal_types";
|
import * as modals from "constants/modal_types";
|
||||||
import lbryio from "lbryio";
|
import lbryio from "lbryio";
|
||||||
import { doOpenModal, doShowSnackBar } from "actions/app";
|
import { doOpenModal, doShowSnackBar } from "redux/actions/app";
|
||||||
import { doRewardList, doClaimRewardType } from "actions/rewards";
|
import { doRewardList, doClaimRewardType } from "redux/actions/rewards";
|
||||||
import { selectEmailToVerify, selectUser } from "selectors/user";
|
import { selectEmailToVerify, selectUser } from "redux/selectors/user";
|
||||||
import rewards from "rewards";
|
import rewards from "rewards";
|
||||||
|
|
||||||
export function doAuthenticate() {
|
export function doAuthenticate() {
|
||||||
|
@ -69,7 +69,7 @@ export function doUserEmailNew(email) {
|
||||||
"post"
|
"post"
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.xhr && error.xhr.status == 409) {
|
if (error.response && error.response.status == 409) {
|
||||||
return lbryio.call(
|
return lbryio.call(
|
||||||
"user_email",
|
"user_email",
|
||||||
"resend_token",
|
"resend_token",
|
|
@ -4,9 +4,9 @@ import {
|
||||||
selectDraftTransaction,
|
selectDraftTransaction,
|
||||||
selectDraftTransactionAmount,
|
selectDraftTransactionAmount,
|
||||||
selectBalance,
|
selectBalance,
|
||||||
} from "selectors/wallet";
|
} from "redux/selectors/wallet";
|
||||||
import { doOpenModal, doShowSnackBar } from "actions/app";
|
import { doOpenModal, doShowSnackBar } from "redux/actions/app";
|
||||||
import { doNavigate } from "actions/navigation";
|
import { doNavigate } from "redux/actions/navigation";
|
||||||
import * as modals from "constants/modal_types";
|
import * as modals from "constants/modal_types";
|
||||||
|
|
||||||
export function doUpdateBalance() {
|
export function doUpdateBalance() {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue