diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5a3a3ab63..4085f20a3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -16,11 +16,11 @@ values = rc production -[bumpversion:file:app/package.json] +[bumpversion:file:src/main/package.json] search = "version": "{current_version}" replace = "version": "{new_version}" -[bumpversion:file:ui/package.json] +[bumpversion:file:src/renderer/package.json] search = "version": "{current_version}" replace = "version": "{new_version}" diff --git a/.gitignore b/.gitignore index 200baee60..5ef0c8653 100644 --- a/.gitignore +++ b/.gitignore @@ -2,16 +2,16 @@ /LBRY-darwin-x64 /dist -/ui/dist/css/* -/ui/dist/js/* -!/ui/dist/js/mediaelement -/ui/node_modules -/ui/.sass-cache +/src/renderer/dist/css/* +/src/renderer/dist/js/* +!/src/renderer/dist/js/mediaelement +/src/renderer/node_modules +/src/renderer/.sass-cache -/app/dist -/app/locales -/app/node_modules +/src/main/dist +/src/main/locales +/src/main/node_modules /build/venv /build/daemon.ver /lbry-app-venv diff --git a/.tx/config b/.tx/config index 44a0319a8..206478926 100644 --- a/.tx/config +++ b/.tx/config @@ -2,7 +2,7 @@ host = https://www.transifex.com [lbry-app.app-strings] -file_filter = app/dist/locales/.json -source_file = app/dist/locales/en.json +file_filter = src/main/dist/locales/.json +source_file = src/main/dist/locales/en.json source_lang = en type = KEYVALUEJSON \ No newline at end of file diff --git a/README.md b/README.md index 27d426584..1df36340d 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ This will download and install the LBRY app and its dependencies, including [the ### Running -Run `./node_modules/.bin/electron app` +Run `./node_modules/.bin/electron src/main` ### Ongoing Development -1. `cd ui` +1. `cd src/renderer` 2. `./watch.sh` -This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `ui` folder. This allows you to make changes and see them immediately by reloading the app. +This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src/renderer` folder. This allows you to make changes and see them immediately by reloading the app. ### Packaging @@ -63,40 +63,40 @@ exit 2. Open command prompt in the root of the project and run the following: ``` python -m pip install -r build\requirements.txt -python build\set_version.py npm install -g yarn yarn install ``` -3. Change directory to `app` and run the following; + +3. Change directory to `src\main` and run the following: ``` yarn install node_modules\.bin\electron-rebuild node_modules\.bin\electron-rebuild -cd .. +cd ..\.. ``` -4. Change directory to `ui` and run the following: +4. Change directory to `src\renderer` and run the following: ``` yarn install npm rebuild node-sass node node_modules\node-sass\bin\node-sass --output dist\css --sourcemap=none scss\ node_modules\.bin\webpack --config webpack.dev.config.js -xcopy /E dist ..\app\dist -cd .. +xcopy /E dist ..\main\dist +cd ..\.. ``` -4. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `app\dist\` +4. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `src\main\dist\` ### Building lbry-app 1. run `node_modules\.bin\build -p never` from the root of the project. ### Running the electron app -1. Run `node_modules\.bin\electron app` +1. Run `node_modules\.bin\electron src\main` ### Ongoing Development -1. `cd ui` +1. `cd src\renderer` 2. `watch.bat` -This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `ui` folder. This allows you to make changes and see them immediately by reloading the app. +This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src\renderer` folder. This allows you to make changes and see them immediately by reloading the app. ## Internationalization -If you want to help translating the lbry-app, you can copy the en.json file in /app/locales and modify the values while leaving the keys as their original English strings. An example for this would be: `"Skip": "Überspringen",` Translations should automatically show up in options. +If you want to help translating the lbry-app, you can copy the en.json file in /src/main/locales and modify the values while leaving the keys as their original English strings. An example for this would be: `"Skip": "Überspringen",` Translations should automatically show up in options. diff --git a/build/build.ps1 b/build/build.ps1 index 17e1373d5..c7e454e8d 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -1,6 +1,4 @@ pip install -r build\requirements.txt -python build\set_version.py - # Get the latest stable version of Node.js or io.js Install-Product node $env:nodejs_version @@ -9,33 +7,33 @@ yarn install # do app -cd app +cd src\main yarn install # necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) # yes, it needs to be run twice. it fails the first time, not sure why node_modules\.bin\electron-rebuild node_modules\.bin\electron-rebuild -cd .. +cd ..\.. # build ui -cd ui +cd src\renderer yarn install npm rebuild node-sass node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\ node_modules\.bin\webpack --config webpack.prod.js -Copy-Item dist ..\app\ -recurse -cd .. +Copy-Item dist ..\main\ -recurse +cd ..\.. # get daemon and cli executable -$package_settings = (Get-Content app\package.json -Raw | ConvertFrom-Json).lbrySettings +$package_settings = (Get-Content src\main\package.json -Raw | ConvertFrom-Json).lbrySettings $daemon_ver = $package_settings.lbrynetDaemonVersion $daemon_url_template = $package_settings.lbrynetDaemonUrlTemplate $daemon_url = $daemon_url_template.Replace('OSNAME', 'windows').Replace('DAEMONVER', $daemon_ver) Invoke-WebRequest -Uri $daemon_url -OutFile daemon.zip -Expand-Archive daemon.zip -DestinationPath app\dist\ -dir app\dist\ # verify that daemon binary is there +Expand-Archive daemon.zip -DestinationPath src\main\dist\ +dir src\main\dist\ # verify that daemon binary is there rm daemon.zip diff --git a/build/build.sh b/build/build.sh index 2a6fa1d4e..04ec944b3 100755 --- a/build/build.sh +++ b/build/build.sh @@ -41,8 +41,8 @@ fi [ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist" mkdir -p "$ROOT/dist" -[ -d "$ROOT/app/dist" ] && rm -rf "$ROOT/app/dist" -mkdir -p "$ROOT/app/dist" +[ -d "$ROOT/src/main/dist" ] && rm -rf "$ROOT/src/main/dist" +mkdir -p "$ROOT/src/main/dist" yarn install @@ -53,13 +53,13 @@ yarn install ############ echo -e "\033[0;32mCompiling UI\x1b[m" ( - cd "$ROOT/ui" + cd "$ROOT/src/renderer" yarn install npm rebuild node-sass node extractLocals.js node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/webpack --config webpack.prod.js - cp -r dist/* "$ROOT/app/dist/" + cp -r dist/* "$ROOT/src/main/dist/" ) @@ -73,14 +73,14 @@ if $OSX; then else OSNAME="linux" fi -DAEMON_VER=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonVersion)") -DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)") +DAEMON_VER=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonVersion)") +DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)") DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g") DAEMON_VER_PATH="$BUILD_DIR/daemon.ver" 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/src/main/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then 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/src/main/dist/" rm "$BUILD_DIR/daemon.zip" echo "$DAEMON_VER" > "$DAEMON_VER_PATH" else @@ -95,16 +95,16 @@ fi ################### echo -e '\033[0;32mBuilding Lbry-app\x1b[m' ( - cd "$ROOT/app" + cd "$ROOT/src/main" yarn install # necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) # yes, it needs to be run twice. it fails the first time, not sure why set +e # DEBUG=electron-rebuild node_modules/.bin/electron-rebuild . - node_modules/.bin/electron-rebuild "$ROOT/app" + node_modules/.bin/electron-rebuild "$ROOT/src/main" set -e - node_modules/.bin/electron-rebuild "$ROOT/app" + node_modules/.bin/electron-rebuild "$ROOT/src/main" ) if [ "$FULL_BUILD" == "true" ]; then @@ -133,5 +133,5 @@ if [ "$FULL_BUILD" == "true" ]; then echo -e '\033[0;32mBuild and packaging complete.\x1b[m' else - echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron app\x1b[m to launch the app' + echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron src/main\x1b[m to launch the app' fi diff --git a/build/release.py b/build/release.py index 81297ebf3..871b0ed7c 100644 --- a/build/release.py +++ b/build/release.py @@ -17,7 +17,7 @@ import github import changelog ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'app', 'package.json') +APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'src', 'main', 'package.json') def main(): diff --git a/package.json b/package.json index a6085ca0c..3c3bc5a0a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "build": { "asar": false, "directories": { - "app": "app" + "app": "src/main" }, "appId": "io.lbry.LBRY", "mac": { diff --git a/app/main.js b/src/main/main.js similarity index 100% rename from app/main.js rename to src/main/main.js diff --git a/app/menu/context-menu.js b/src/main/menu/context-menu.js similarity index 100% rename from app/menu/context-menu.js rename to src/main/menu/context-menu.js diff --git a/app/menu/main-menu.js b/src/main/menu/main-menu.js similarity index 100% rename from app/menu/main-menu.js rename to src/main/menu/main-menu.js diff --git a/app/package.json b/src/main/package.json similarity index 100% rename from app/package.json rename to src/main/package.json diff --git a/app/yarn.lock b/src/main/yarn.lock similarity index 100% rename from app/yarn.lock rename to src/main/yarn.lock diff --git a/ui/.babelrc b/src/renderer/.babelrc similarity index 100% rename from ui/.babelrc rename to src/renderer/.babelrc diff --git a/ui/.eslintrc.js b/src/renderer/.eslintrc.js similarity index 100% rename from ui/.eslintrc.js rename to src/renderer/.eslintrc.js diff --git a/ui/README.md b/src/renderer/README.md similarity index 100% rename from ui/README.md rename to src/renderer/README.md diff --git a/ui/dist/favicon.ico b/src/renderer/dist/favicon.ico similarity index 100% rename from ui/dist/favicon.ico rename to src/renderer/dist/favicon.ico diff --git a/ui/dist/font/FontAwesome.otf b/src/renderer/dist/font/FontAwesome.otf similarity index 100% rename from ui/dist/font/FontAwesome.otf rename to src/renderer/dist/font/FontAwesome.otf diff --git a/ui/dist/font/fontawesome-webfont.eot b/src/renderer/dist/font/fontawesome-webfont.eot similarity index 100% rename from ui/dist/font/fontawesome-webfont.eot rename to src/renderer/dist/font/fontawesome-webfont.eot diff --git a/ui/dist/font/fontawesome-webfont.svg b/src/renderer/dist/font/fontawesome-webfont.svg similarity index 100% rename from ui/dist/font/fontawesome-webfont.svg rename to src/renderer/dist/font/fontawesome-webfont.svg diff --git a/ui/dist/font/fontawesome-webfont.ttf b/src/renderer/dist/font/fontawesome-webfont.ttf similarity index 100% rename from ui/dist/font/fontawesome-webfont.ttf rename to src/renderer/dist/font/fontawesome-webfont.ttf diff --git a/ui/dist/font/fontawesome-webfont.woff b/src/renderer/dist/font/fontawesome-webfont.woff similarity index 100% rename from ui/dist/font/fontawesome-webfont.woff rename to src/renderer/dist/font/fontawesome-webfont.woff diff --git a/ui/dist/font/fontawesome-webfont.woff2 b/src/renderer/dist/font/fontawesome-webfont.woff2 similarity index 100% rename from ui/dist/font/fontawesome-webfont.woff2 rename to src/renderer/dist/font/fontawesome-webfont.woff2 diff --git a/ui/dist/img/Free-speech-flag.svg b/src/renderer/dist/img/Free-speech-flag.svg similarity index 100% rename from ui/dist/img/Free-speech-flag.svg rename to src/renderer/dist/img/Free-speech-flag.svg diff --git a/ui/dist/img/busy.gif b/src/renderer/dist/img/busy.gif similarity index 100% rename from ui/dist/img/busy.gif rename to src/renderer/dist/img/busy.gif diff --git a/ui/dist/img/default-thumb.svg b/src/renderer/dist/img/default-thumb.svg similarity index 100% rename from ui/dist/img/default-thumb.svg rename to src/renderer/dist/img/default-thumb.svg diff --git a/ui/dist/img/fav/32x32.png b/src/renderer/dist/img/fav/32x32.png similarity index 100% rename from ui/dist/img/fav/32x32.png rename to src/renderer/dist/img/fav/32x32.png diff --git a/ui/dist/img/fav/android-chrome-144x144.png b/src/renderer/dist/img/fav/android-chrome-144x144.png similarity index 100% rename from ui/dist/img/fav/android-chrome-144x144.png rename to src/renderer/dist/img/fav/android-chrome-144x144.png diff --git a/ui/dist/img/fav/android-chrome-192x192.png b/src/renderer/dist/img/fav/android-chrome-192x192.png similarity index 100% rename from ui/dist/img/fav/android-chrome-192x192.png rename to src/renderer/dist/img/fav/android-chrome-192x192.png diff --git a/ui/dist/img/fav/android-chrome-36x36.png b/src/renderer/dist/img/fav/android-chrome-36x36.png similarity index 100% rename from ui/dist/img/fav/android-chrome-36x36.png rename to src/renderer/dist/img/fav/android-chrome-36x36.png diff --git a/ui/dist/img/fav/android-chrome-48x48.png b/src/renderer/dist/img/fav/android-chrome-48x48.png similarity index 100% rename from ui/dist/img/fav/android-chrome-48x48.png rename to src/renderer/dist/img/fav/android-chrome-48x48.png diff --git a/ui/dist/img/fav/android-chrome-72x72.png b/src/renderer/dist/img/fav/android-chrome-72x72.png similarity index 100% rename from ui/dist/img/fav/android-chrome-72x72.png rename to src/renderer/dist/img/fav/android-chrome-72x72.png diff --git a/ui/dist/img/fav/android-chrome-96x96.png b/src/renderer/dist/img/fav/android-chrome-96x96.png similarity index 100% rename from ui/dist/img/fav/android-chrome-96x96.png rename to src/renderer/dist/img/fav/android-chrome-96x96.png diff --git a/ui/dist/img/fav/apple-touch-icon-114x114.png b/src/renderer/dist/img/fav/apple-touch-icon-114x114.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-114x114.png rename to src/renderer/dist/img/fav/apple-touch-icon-114x114.png diff --git a/ui/dist/img/fav/apple-touch-icon-120x120.png b/src/renderer/dist/img/fav/apple-touch-icon-120x120.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-120x120.png rename to src/renderer/dist/img/fav/apple-touch-icon-120x120.png diff --git a/ui/dist/img/fav/apple-touch-icon-120x120_1.png b/src/renderer/dist/img/fav/apple-touch-icon-120x120_1.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-120x120_1.png rename to src/renderer/dist/img/fav/apple-touch-icon-120x120_1.png diff --git a/ui/dist/img/fav/apple-touch-icon-144x144.png b/src/renderer/dist/img/fav/apple-touch-icon-144x144.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-144x144.png rename to src/renderer/dist/img/fav/apple-touch-icon-144x144.png diff --git a/ui/dist/img/fav/apple-touch-icon-152x152.png b/src/renderer/dist/img/fav/apple-touch-icon-152x152.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-152x152.png rename to src/renderer/dist/img/fav/apple-touch-icon-152x152.png diff --git a/ui/dist/img/fav/apple-touch-icon-180x180.png b/src/renderer/dist/img/fav/apple-touch-icon-180x180.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-180x180.png rename to src/renderer/dist/img/fav/apple-touch-icon-180x180.png diff --git a/ui/dist/img/fav/apple-touch-icon-57x57.png b/src/renderer/dist/img/fav/apple-touch-icon-57x57.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-57x57.png rename to src/renderer/dist/img/fav/apple-touch-icon-57x57.png diff --git a/ui/dist/img/fav/apple-touch-icon-60x60.png b/src/renderer/dist/img/fav/apple-touch-icon-60x60.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-60x60.png rename to src/renderer/dist/img/fav/apple-touch-icon-60x60.png diff --git a/ui/dist/img/fav/apple-touch-icon-72x72.png b/src/renderer/dist/img/fav/apple-touch-icon-72x72.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-72x72.png rename to src/renderer/dist/img/fav/apple-touch-icon-72x72.png diff --git a/ui/dist/img/fav/apple-touch-icon-76x76.png b/src/renderer/dist/img/fav/apple-touch-icon-76x76.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-76x76.png rename to src/renderer/dist/img/fav/apple-touch-icon-76x76.png diff --git a/ui/dist/img/fav/apple-touch-icon-76x76_1.png b/src/renderer/dist/img/fav/apple-touch-icon-76x76_1.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-76x76_1.png rename to src/renderer/dist/img/fav/apple-touch-icon-76x76_1.png diff --git a/ui/dist/img/fav/apple-touch-icon-precomposed.png b/src/renderer/dist/img/fav/apple-touch-icon-precomposed.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon-precomposed.png rename to src/renderer/dist/img/fav/apple-touch-icon-precomposed.png diff --git a/ui/dist/img/fav/apple-touch-icon.png b/src/renderer/dist/img/fav/apple-touch-icon.png similarity index 100% rename from ui/dist/img/fav/apple-touch-icon.png rename to src/renderer/dist/img/fav/apple-touch-icon.png diff --git a/ui/dist/img/fav/browserconfig.xml b/src/renderer/dist/img/fav/browserconfig.xml similarity index 96% rename from ui/dist/img/fav/browserconfig.xml rename to src/renderer/dist/img/fav/browserconfig.xml index 65380f387..fe44cae80 100644 --- a/ui/dist/img/fav/browserconfig.xml +++ b/src/renderer/dist/img/fav/browserconfig.xml @@ -1,12 +1,12 @@ - - - - - - - - - #da532c - - - + + + + + + + + + #da532c + + + diff --git a/ui/dist/img/fav/favicon-16x16.png b/src/renderer/dist/img/fav/favicon-16x16.png similarity index 100% rename from ui/dist/img/fav/favicon-16x16.png rename to src/renderer/dist/img/fav/favicon-16x16.png diff --git a/ui/dist/img/fav/favicon-194x194.png b/src/renderer/dist/img/fav/favicon-194x194.png similarity index 100% rename from ui/dist/img/fav/favicon-194x194.png rename to src/renderer/dist/img/fav/favicon-194x194.png diff --git a/ui/dist/img/fav/favicon-32x32.png b/src/renderer/dist/img/fav/favicon-32x32.png similarity index 100% rename from ui/dist/img/fav/favicon-32x32.png rename to src/renderer/dist/img/fav/favicon-32x32.png diff --git a/ui/dist/img/fav/favicon-96x96.png b/src/renderer/dist/img/fav/favicon-96x96.png similarity index 100% rename from ui/dist/img/fav/favicon-96x96.png rename to src/renderer/dist/img/fav/favicon-96x96.png diff --git a/ui/dist/img/fav/macTemplate@2x.png b/src/renderer/dist/img/fav/macTemplate@2x.png similarity index 100% rename from ui/dist/img/fav/macTemplate@2x.png rename to src/renderer/dist/img/fav/macTemplate@2x.png diff --git a/ui/dist/img/fav/manifest.json b/src/renderer/dist/img/fav/manifest.json similarity index 100% rename from ui/dist/img/fav/manifest.json rename to src/renderer/dist/img/fav/manifest.json diff --git a/ui/dist/img/fav/mstile-144x144.png b/src/renderer/dist/img/fav/mstile-144x144.png similarity index 100% rename from ui/dist/img/fav/mstile-144x144.png rename to src/renderer/dist/img/fav/mstile-144x144.png diff --git a/ui/dist/img/fav/mstile-150x150.png b/src/renderer/dist/img/fav/mstile-150x150.png similarity index 100% rename from ui/dist/img/fav/mstile-150x150.png rename to src/renderer/dist/img/fav/mstile-150x150.png diff --git a/ui/dist/img/fav/mstile-310x150.png b/src/renderer/dist/img/fav/mstile-310x150.png similarity index 100% rename from ui/dist/img/fav/mstile-310x150.png rename to src/renderer/dist/img/fav/mstile-310x150.png diff --git a/ui/dist/img/fav/mstile-310x310.png b/src/renderer/dist/img/fav/mstile-310x310.png similarity index 100% rename from ui/dist/img/fav/mstile-310x310.png rename to src/renderer/dist/img/fav/mstile-310x310.png diff --git a/ui/dist/img/fav/mstile-70x70.png b/src/renderer/dist/img/fav/mstile-70x70.png similarity index 100% rename from ui/dist/img/fav/mstile-70x70.png rename to src/renderer/dist/img/fav/mstile-70x70.png diff --git a/ui/dist/img/lbry-bg.png b/src/renderer/dist/img/lbry-bg.png similarity index 100% rename from ui/dist/img/lbry-bg.png rename to src/renderer/dist/img/lbry-bg.png diff --git a/ui/dist/img/lbry-dark-1600x528.png b/src/renderer/dist/img/lbry-dark-1600x528.png similarity index 100% rename from ui/dist/img/lbry-dark-1600x528.png rename to src/renderer/dist/img/lbry-dark-1600x528.png diff --git a/ui/dist/img/lbry-white-485x160.png b/src/renderer/dist/img/lbry-white-485x160.png similarity index 100% rename from ui/dist/img/lbry-white-485x160.png rename to src/renderer/dist/img/lbry-white-485x160.png diff --git a/ui/dist/img/lbry-white-909x300.png b/src/renderer/dist/img/lbry-white-909x300.png similarity index 100% rename from ui/dist/img/lbry-white-909x300.png rename to src/renderer/dist/img/lbry-white-909x300.png diff --git a/ui/dist/img/warning.png b/src/renderer/dist/img/warning.png similarity index 100% rename from ui/dist/img/warning.png rename to src/renderer/dist/img/warning.png diff --git a/ui/dist/index.html b/src/renderer/dist/index.html similarity index 100% rename from ui/dist/index.html rename to src/renderer/dist/index.html diff --git a/ui/dist/quit.html b/src/renderer/dist/quit.html similarity index 100% rename from ui/dist/quit.html rename to src/renderer/dist/quit.html diff --git a/ui/dist/requirements.txt b/src/renderer/dist/requirements.txt similarity index 100% rename from ui/dist/requirements.txt rename to src/renderer/dist/requirements.txt diff --git a/ui/dist/themes/dark.css b/src/renderer/dist/themes/dark.css similarity index 100% rename from ui/dist/themes/dark.css rename to src/renderer/dist/themes/dark.css diff --git a/ui/dist/themes/light.css b/src/renderer/dist/themes/light.css similarity index 100% rename from ui/dist/themes/light.css rename to src/renderer/dist/themes/light.css diff --git a/ui/dist/upgrade.html b/src/renderer/dist/upgrade.html similarity index 100% rename from ui/dist/upgrade.html rename to src/renderer/dist/upgrade.html diff --git a/ui/dist/warning.html b/src/renderer/dist/warning.html similarity index 100% rename from ui/dist/warning.html rename to src/renderer/dist/warning.html diff --git a/ui/extractLocals.js b/src/renderer/extractLocals.js similarity index 96% rename from ui/extractLocals.js rename to src/renderer/extractLocals.js index b36e3e9d4..ef46d74ad 100644 --- a/ui/extractLocals.js +++ b/src/renderer/extractLocals.js @@ -1,7 +1,7 @@ var extract = require("i18n-extract"); const fs = require("fs"); -var dir = __dirname + "/../app/dist/locales"; +var dir = __dirname + "/../main/dist/locales"; var path = dir + "/en.json"; if (!fs.existsSync(dir)) { diff --git a/ui/js/app.js b/src/renderer/js/app.js similarity index 100% rename from ui/js/app.js rename to src/renderer/js/app.js diff --git a/ui/js/component/app/index.js b/src/renderer/js/component/app/index.js similarity index 100% rename from ui/js/component/app/index.js rename to src/renderer/js/component/app/index.js diff --git a/ui/js/component/app/view.jsx b/src/renderer/js/component/app/view.jsx similarity index 100% rename from ui/js/component/app/view.jsx rename to src/renderer/js/component/app/view.jsx diff --git a/ui/js/component/cardMedia/index.js b/src/renderer/js/component/cardMedia/index.js similarity index 100% rename from ui/js/component/cardMedia/index.js rename to src/renderer/js/component/cardMedia/index.js diff --git a/ui/js/component/cardMedia/view.jsx b/src/renderer/js/component/cardMedia/view.jsx similarity index 100% rename from ui/js/component/cardMedia/view.jsx rename to src/renderer/js/component/cardMedia/view.jsx diff --git a/ui/js/component/cardVerify/index.js b/src/renderer/js/component/cardVerify/index.js similarity index 100% rename from ui/js/component/cardVerify/index.js rename to src/renderer/js/component/cardVerify/index.js diff --git a/ui/js/component/cardVerify/view.jsx b/src/renderer/js/component/cardVerify/view.jsx similarity index 100% rename from ui/js/component/cardVerify/view.jsx rename to src/renderer/js/component/cardVerify/view.jsx diff --git a/ui/js/component/channelTile/index.js b/src/renderer/js/component/channelTile/index.js similarity index 100% rename from ui/js/component/channelTile/index.js rename to src/renderer/js/component/channelTile/index.js diff --git a/ui/js/component/channelTile/view.jsx b/src/renderer/js/component/channelTile/view.jsx similarity index 85% rename from ui/js/component/channelTile/view.jsx rename to src/renderer/js/component/channelTile/view.jsx index 512389f0c..e4a4ed8be 100644 --- a/ui/js/component/channelTile/view.jsx +++ b/src/renderer/js/component/channelTile/view.jsx @@ -40,16 +40,19 @@ class ChannelTile extends React.PureComponent {
- {isResolvingUri && - } - {totalItems > 0 && + {isResolvingUri && ( + + )} + {totalItems > 0 && ( This is a channel with {totalItems}{" "} {totalItems === 1 ? " item" : " items"} inside of it. - } + + )} {!isResolvingUri && - !totalItems && - This is an empty channel.} + !totalItems && ( + This is an empty channel. + )}
diff --git a/ui/js/component/common.js b/src/renderer/js/component/common.js similarity index 89% rename from ui/js/component/common.js rename to src/renderer/js/component/common.js index 00f65e75d..010bd8f31 100644 --- a/ui/js/component/common.js +++ b/src/renderer/js/component/common.js @@ -50,7 +50,9 @@ export class BusyMessage extends React.PureComponent { render() { return ( - {this.props.message} + + {this.props.message} + ); } } @@ -92,9 +94,10 @@ export class CreditAmount extends React.PureComponent { if (showFullPrice) { formattedAmount = fullPrice; } else { - formattedAmount = amount > 0 && amount < minimumRenderableAmount - ? "<" + minimumRenderableAmount - : formatCredits(amount, precision); + formattedAmount = + amount > 0 && amount < minimumRenderableAmount + ? "<" + minimumRenderableAmount + : formatCredits(amount, precision); } let amountText; @@ -119,17 +122,15 @@ export class CreditAmount extends React.PureComponent { className={`credit-amount credit-amount--${this.props.look}`} title={fullPrice} > - - {amountText} - - {this.props.isEstimate - ? - * - - : null} + {amountText} + {this.props.isEstimate ? ( + + * + + ) : null} ); } diff --git a/ui/js/component/dateTime/index.js b/src/renderer/js/component/dateTime/index.js similarity index 100% rename from ui/js/component/dateTime/index.js rename to src/renderer/js/component/dateTime/index.js diff --git a/ui/js/component/dateTime/view.jsx b/src/renderer/js/component/dateTime/view.jsx similarity index 100% rename from ui/js/component/dateTime/view.jsx rename to src/renderer/js/component/dateTime/view.jsx diff --git a/ui/js/component/file-selector.js b/src/renderer/js/component/file-selector.js similarity index 92% rename from ui/js/component/file-selector.js rename to src/renderer/js/component/file-selector.js index 391ce9acf..2c3189c2f 100644 --- a/ui/js/component/file-selector.js +++ b/src/renderer/js/component/file-selector.js @@ -26,9 +26,10 @@ class FileSelector extends React.PureComponent { handleButtonClick() { remote.dialog.showOpenDialog( { - properties: this.props.type == "file" - ? ["openFile"] - : ["openDirectory", "createDirectory"], + properties: + this.props.type == "file" + ? ["openFile"] + : ["openDirectory", "createDirectory"], }, paths => { if (!paths) { @@ -62,8 +63,7 @@ class FileSelector extends React.PureComponent { : __("Choose Directory")} - - {" "} + {" "} - {showDelete && + {showDelete && ( openModal(modals.CONFIRM_FILE_REMOVE, { uri })} - />} - {!claimIsMine && + /> + )} + {!claimIsMine && ( } + /> + )} - {claimIsMine && + {claimIsMine && ( } + /> + )} ); } diff --git a/ui/js/component/fileCard/index.js b/src/renderer/js/component/fileCard/index.js similarity index 100% rename from ui/js/component/fileCard/index.js rename to src/renderer/js/component/fileCard/index.js diff --git a/ui/js/component/fileCard/view.jsx b/src/renderer/js/component/fileCard/view.jsx similarity index 100% rename from ui/js/component/fileCard/view.jsx rename to src/renderer/js/component/fileCard/view.jsx diff --git a/ui/js/component/fileDetails/index.js b/src/renderer/js/component/fileDetails/index.js similarity index 100% rename from ui/js/component/fileDetails/index.js rename to src/renderer/js/component/fileDetails/index.js diff --git a/ui/js/component/fileDetails/view.jsx b/src/renderer/js/component/fileDetails/view.jsx similarity index 85% rename from ui/js/component/fileDetails/view.jsx rename to src/renderer/js/component/fileDetails/view.jsx index 257d0593e..55afed97d 100644 --- a/ui/js/component/fileDetails/view.jsx +++ b/src/renderer/js/component/fileDetails/view.jsx @@ -49,15 +49,18 @@ class FileDetails extends React.PureComponent { - + + - + + - + + - {downloadPath && + {downloadPath && ( - } + + )}
{__("Content-Type")}{mediaType}{__("Content-Type")}{mediaType}
{__("Language")}{language}{__("Language")}{language}
{__("License")}{license}{__("License")}{license}
{__("Downloaded to")} @@ -65,7 +68,8 @@ class FileDetails extends React.PureComponent { {downloadPath}
diff --git a/ui/js/component/fileDownloadLink/index.js b/src/renderer/js/component/fileDownloadLink/index.js similarity index 100% rename from ui/js/component/fileDownloadLink/index.js rename to src/renderer/js/component/fileDownloadLink/index.js diff --git a/ui/js/component/fileDownloadLink/view.jsx b/src/renderer/js/component/fileDownloadLink/view.jsx similarity index 92% rename from ui/js/component/fileDownloadLink/view.jsx rename to src/renderer/js/component/fileDownloadLink/view.jsx index 9980e8a07..32d0fe3c4 100644 --- a/ui/js/component/fileDownloadLink/view.jsx +++ b/src/renderer/js/component/fileDownloadLink/view.jsx @@ -45,18 +45,17 @@ class FileDownloadLink extends React.PureComponent { } = this.props; if (loading || downloading) { - const progress = fileInfo && fileInfo.written_bytes - ? fileInfo.written_bytes / fileInfo.total_bytes * 100 - : 0, + const progress = + fileInfo && fileInfo.written_bytes + ? fileInfo.written_bytes / fileInfo.total_bytes * 100 + : 0, label = fileInfo ? progress.toFixed(0) + __("% complete") : __("Connecting..."), labelWithIcon = ( - - {label} - + {label} ); diff --git a/ui/js/component/fileList/index.js b/src/renderer/js/component/fileList/index.js similarity index 100% rename from ui/js/component/fileList/index.js rename to src/renderer/js/component/fileList/index.js diff --git a/ui/js/component/fileList/view.jsx b/src/renderer/js/component/fileList/view.jsx similarity index 99% rename from ui/js/component/fileList/view.jsx rename to src/renderer/js/component/fileList/view.jsx index 9cb755ec9..10dd2d2d7 100644 --- a/ui/js/component/fileList/view.jsx +++ b/src/renderer/js/component/fileList/view.jsx @@ -98,7 +98,7 @@ class FileList extends React.PureComponent {
{fetching && } - {__("Sort by")} {" "} + {__("Sort by")}{" "} diff --git a/ui/js/component/fileListSearch/index.js b/src/renderer/js/component/fileListSearch/index.js similarity index 100% rename from ui/js/component/fileListSearch/index.js rename to src/renderer/js/component/fileListSearch/index.js diff --git a/ui/js/component/fileListSearch/view.jsx b/src/renderer/js/component/fileListSearch/view.jsx similarity index 74% rename from ui/js/component/fileListSearch/view.jsx rename to src/renderer/js/component/fileListSearch/view.jsx index 224c48d6a..00a759d5e 100644 --- a/ui/js/component/fileListSearch/view.jsx +++ b/src/renderer/js/component/fileListSearch/view.jsx @@ -11,7 +11,7 @@ const SearchNoResults = props => { return (
- {(__("No one has checked anything in for %s yet."), query)} {" "} + {(__("No one has checked anything in for %s yet."), query)}{" "}
@@ -39,19 +39,21 @@ class FileListSearch extends React.PureComponent { return (
{isSearching && - !uris && - } + !uris && ( + + )} {isSearching && - uris && - } + uris && } {uris && uris.length ? uris.map( uri => - lbryuri.parse(uri).name[0] === "@" - ? - : + lbryuri.parse(uri).name[0] === "@" ? ( + + ) : ( + + ) ) : !isSearching && }
diff --git a/ui/js/component/filePrice/index.js b/src/renderer/js/component/filePrice/index.js similarity index 100% rename from ui/js/component/filePrice/index.js rename to src/renderer/js/component/filePrice/index.js diff --git a/ui/js/component/filePrice/view.jsx b/src/renderer/js/component/filePrice/view.jsx similarity index 100% rename from ui/js/component/filePrice/view.jsx rename to src/renderer/js/component/filePrice/view.jsx diff --git a/ui/js/component/fileTile/index.js b/src/renderer/js/component/fileTile/index.js similarity index 100% rename from ui/js/component/fileTile/index.js rename to src/renderer/js/component/fileTile/index.js diff --git a/ui/js/component/fileTile/view.jsx b/src/renderer/js/component/fileTile/view.jsx similarity index 90% rename from ui/js/component/fileTile/view.jsx rename to src/renderer/js/component/fileTile/view.jsx index b712ae048..fbf3c9110 100644 --- a/ui/js/component/fileTile/view.jsx +++ b/src/renderer/js/component/fileTile/view.jsx @@ -72,12 +72,12 @@ class FileTile extends React.PureComponent { const uri = lbryuri.normalize(this.props.uri); const isClaimed = !!claim; const isClaimable = lbryuri.isClaimable(uri); - const title = isClaimed && metadata && metadata.title - ? metadata.title - : lbryuri.parse(uri).contentName; - const thumbnail = metadata && metadata.thumbnail - ? metadata.thumbnail - : null; + const title = + isClaimed && metadata && metadata.title + ? metadata.title + : lbryuri.parse(uri).contentName; + const thumbnail = + metadata && metadata.thumbnail ? metadata.thumbnail : null; const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw; const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); @@ -98,9 +98,10 @@ class FileTile extends React.PureComponent { onClick = () => navigate("/publish", {}); description = ( - {__("This location is unused.")} {" "} - {isClaimable && - {__("Put something here!")}} + {__("This location is unused.")}{" "} + {isClaimable && ( + {__("Put something here!")} + )} ); } else if (showEmpty === FileTile.SHOW_EMPTY_PENDING) { @@ -123,22 +124,21 @@ class FileTile extends React.PureComponent {
- {showPrice && } - {" "} - {isRewardContent && } - {" "} + {showPrice && }{" "} + {isRewardContent && }{" "} {showLocal && fileInfo && }

{title || name}

- {description && + {description && (
{description} -
} +
+ )} diff --git a/ui/js/component/form.js b/src/renderer/js/component/form.js similarity index 77% rename from ui/js/component/form.js rename to src/renderer/js/component/form.js index 4db52e23d..03bf1185e 100644 --- a/ui/js/component/form.js +++ b/src/renderer/js/component/form.js @@ -67,11 +67,12 @@ export class FormRow extends React.PureComponent { getStateFromProps(props) { return { isError: !!props.errorMessage, - errorMessage: typeof props.errorMessage === "string" - ? props.errorMessage - : props.errorMessage instanceof Error - ? props.errorMessage.toString() - : "", + errorMessage: + typeof props.errorMessage === "string" + ? props.errorMessage + : props.errorMessage instanceof Error + ? props.errorMessage.toString() + : "", }; } @@ -135,24 +136,26 @@ export class FormRow extends React.PureComponent {
- {this.props.label && !renderLabelInFormField - ?
+
- : ""} + {this.props.label} + +
+ ) : ( + "" + )} { this._field = ref ? ref.getWrappedInstance() : null; @@ -162,12 +165,16 @@ export class FormRow extends React.PureComponent { onBlur={this.onBlur.bind(this)} {...fieldProps} /> - {!this.state.isError && this.props.helper - ?
{this.props.helper}
- : ""} - {this.state.isError - ?
{this.state.errorMessage}
- : ""} + {!this.state.isError && this.props.helper ? ( +
{this.props.helper}
+ ) : ( + "" + )} + {this.state.isError ? ( +
{this.state.errorMessage}
+ ) : ( + "" + )} ); } diff --git a/ui/js/component/formField/index.js b/src/renderer/js/component/formField/index.js similarity index 100% rename from ui/js/component/formField/index.js rename to src/renderer/js/component/formField/index.js diff --git a/ui/js/component/formField/view.jsx b/src/renderer/js/component/formField/view.jsx similarity index 84% rename from ui/js/component/formField/view.jsx rename to src/renderer/js/component/formField/view.jsx index 34b5d5665..e93559eb0 100644 --- a/ui/js/component/formField/view.jsx +++ b/src/renderer/js/component/formField/view.jsx @@ -132,9 +132,8 @@ class FormField extends React.PureComponent { render() { // Pass all unhandled props to the field element const otherProps = Object.assign({}, this.props), - isError = this.state.isError !== null - ? this.state.isError - : this.props.hasError, + isError = + this.state.isError !== null ? this.state.isError : this.props.hasError, elementId = this.props.elementId ? this.props.elementId : formFieldId(), renderElementInsideLabel = this.props.label && formFieldNestedLabelTypes.includes(this.props.type); @@ -174,11 +173,13 @@ class FormField extends React.PureComponent { return (
- {this.props.prefix - ? {this.props.prefix} - : ""} + {this.props.prefix ? ( + {this.props.prefix} + ) : ( + "" + )} {element} - {renderElementInsideLabel && + {renderElementInsideLabel && ( } - {formFieldFileSelectorTypes.includes(this.props.type) - ? - : null} - {this.props.postfix - ? {this.props.postfix} - : ""} - {isError && this.state.errorMessage - ?
{this.state.errorMessage}
- : ""} + + )} + {formFieldFileSelectorTypes.includes(this.props.type) ? ( + + ) : null} + {this.props.postfix ? ( + {this.props.postfix} + ) : ( + "" + )} + {isError && this.state.errorMessage ? ( +
{this.state.errorMessage}
+ ) : ( + "" + )}
); } diff --git a/ui/js/component/formFieldPrice/index.js b/src/renderer/js/component/formFieldPrice/index.js similarity index 100% rename from ui/js/component/formFieldPrice/index.js rename to src/renderer/js/component/formFieldPrice/index.js diff --git a/ui/js/component/formFieldPrice/view.jsx b/src/renderer/js/component/formFieldPrice/view.jsx similarity index 87% rename from ui/js/component/formFieldPrice/view.jsx rename to src/renderer/js/component/formFieldPrice/view.jsx index 81c97c8e8..6d9925960 100644 --- a/ui/js/component/formFieldPrice/view.jsx +++ b/src/renderer/js/component/formFieldPrice/view.jsx @@ -5,12 +5,14 @@ class FormFieldPrice extends React.PureComponent { constructor(props) { super(props); this.state = { - amount: props.defaultValue && props.defaultValue.amount - ? props.defaultValue.amount - : "", - currency: props.defaultValue && props.defaultValue.currency - ? props.defaultValue.currency - : "LBC", + amount: + props.defaultValue && props.defaultValue.amount + ? props.defaultValue.amount + : "", + currency: + props.defaultValue && props.defaultValue.currency + ? props.defaultValue.currency + : "LBC", }; } diff --git a/ui/js/component/header/index.js b/src/renderer/js/component/header/index.js similarity index 100% rename from ui/js/component/header/index.js rename to src/renderer/js/component/header/index.js diff --git a/ui/js/component/header/view.jsx b/src/renderer/js/component/header/view.jsx similarity index 100% rename from ui/js/component/header/view.jsx rename to src/renderer/js/component/header/view.jsx diff --git a/ui/js/component/icon/index.js b/src/renderer/js/component/icon/index.js similarity index 100% rename from ui/js/component/icon/index.js rename to src/renderer/js/component/icon/index.js diff --git a/ui/js/component/icon/view.jsx b/src/renderer/js/component/icon/view.jsx similarity index 100% rename from ui/js/component/icon/view.jsx rename to src/renderer/js/component/icon/view.jsx diff --git a/ui/js/component/inviteList/index.js b/src/renderer/js/component/inviteList/index.js similarity index 100% rename from ui/js/component/inviteList/index.js rename to src/renderer/js/component/inviteList/index.js diff --git a/ui/js/component/inviteList/view.jsx b/src/renderer/js/component/inviteList/view.jsx similarity index 57% rename from ui/js/component/inviteList/view.jsx rename to src/renderer/js/component/inviteList/view.jsx index 8e6e0c938..b02de3278 100644 --- a/ui/js/component/inviteList/view.jsx +++ b/src/renderer/js/component/inviteList/view.jsx @@ -17,21 +17,16 @@ class InviteList extends React.PureComponent {

{__("Invite History")}

- {invitees.length === 0 && - {__("You haven't invited anyone.")} } - {invitees.length > 0 && + {invitees.length === 0 && ( + {__("You haven't invited anyone.")} + )} + {invitees.length > 0 && ( - - - + + + @@ -40,27 +35,30 @@ class InviteList extends React.PureComponent { ); })} -
- {__("Invitee Email")} - - {__("Invite Status")} - - {__("Reward")} - {__("Invitee Email")}{__("Invite Status")}{__("Reward")}
{invitee.email} - {invitee.invite_accepted - ? - : {__("unused")}} + {invitee.invite_accepted ? ( + + ) : ( + {__("unused")} + )} - {invitee.invite_reward_claimed - ? - : invitee.invite_reward_claimable - ? - : - {__("unclaimable")} - } + {invitee.invite_reward_claimed ? ( + + ) : invitee.invite_reward_claimable ? ( + + ) : ( + {__("unclaimable")} + )}
} + + )}
diff --git a/ui/js/component/inviteNew/index.js b/src/renderer/js/component/inviteNew/index.js similarity index 100% rename from ui/js/component/inviteNew/index.js rename to src/renderer/js/component/inviteNew/index.js diff --git a/ui/js/component/inviteNew/view.jsx b/src/renderer/js/component/inviteNew/view.jsx similarity index 96% rename from ui/js/component/inviteNew/view.jsx rename to src/renderer/js/component/inviteNew/view.jsx index af15a5fd2..7eccf1cec 100644 --- a/ui/js/component/inviteNew/view.jsx +++ b/src/renderer/js/component/inviteNew/view.jsx @@ -61,9 +61,7 @@ class InviteNew extends React.PureComponent {
-

- {__("Invite a Friend")} -

+

{__("Invite a Friend")}

{/*
diff --git a/ui/js/component/link/index.js b/src/renderer/js/component/link/index.js similarity index 100% rename from ui/js/component/link/index.js rename to src/renderer/js/component/link/index.js diff --git a/ui/js/component/link/view.jsx b/src/renderer/js/component/link/view.jsx similarity index 87% rename from ui/js/component/link/view.jsx rename to src/renderer/js/component/link/view.jsx index 98193cd40..9b949bf75 100644 --- a/ui/js/component/link/view.jsx +++ b/src/renderer/js/component/link/view.jsx @@ -22,11 +22,12 @@ const Link = props => { (button ? " button-block button-" + button + " button-set-item" : "") + (disabled ? " disabled" : ""); - const onClick = !props.onClick && navigate - ? () => { - doNavigate(navigate, navigateParams || {}); - } - : props.onClick; + const onClick = + !props.onClick && navigate + ? () => { + doNavigate(navigate, navigateParams || {}); + } + : props.onClick; let content; if (children) { diff --git a/ui/js/component/linkTransaction/index.js b/src/renderer/js/component/linkTransaction/index.js similarity index 100% rename from ui/js/component/linkTransaction/index.js rename to src/renderer/js/component/linkTransaction/index.js diff --git a/ui/js/component/linkTransaction/view.jsx b/src/renderer/js/component/linkTransaction/view.jsx similarity index 100% rename from ui/js/component/linkTransaction/view.jsx rename to src/renderer/js/component/linkTransaction/view.jsx diff --git a/ui/js/component/load_screen.js b/src/renderer/js/component/load_screen.js similarity index 80% rename from ui/js/component/load_screen.js rename to src/renderer/js/component/load_screen.js index 4ca861fd4..8304b2a5f 100644 --- a/ui/js/component/load_screen.js +++ b/src/renderer/js/component/load_screen.js @@ -31,11 +31,14 @@ class LoadScreen extends React.PureComponent { LBRY

- {!this.props.isWarning - ? - : - {" " + this.props.message} - } + {!this.props.isWarning ? ( + + ) : ( + + + {" " + this.props.message} + + )}

- {this.state.menuOpen - ?
(this._menuDiv = div)} - className="menu" - onClick={event => { - this.handleMenuClick(event); - }} - > - {this.props.children} -
- : null} + {this.state.menuOpen ? ( +
(this._menuDiv = div)} + className="menu" + onClick={event => { + this.handleMenuClick(event); + }} + > + {this.props.children} +
+ ) : null}
); } diff --git a/ui/js/component/nsfwOverlay/index.js b/src/renderer/js/component/nsfwOverlay/index.js similarity index 100% rename from ui/js/component/nsfwOverlay/index.js rename to src/renderer/js/component/nsfwOverlay/index.js diff --git a/ui/js/component/nsfwOverlay/view.jsx b/src/renderer/js/component/nsfwOverlay/view.jsx similarity index 96% rename from ui/js/component/nsfwOverlay/view.jsx rename to src/renderer/js/component/nsfwOverlay/view.jsx index 89c3705c7..fc7fc19dd 100644 --- a/ui/js/component/nsfwOverlay/view.jsx +++ b/src/renderer/js/component/nsfwOverlay/view.jsx @@ -8,7 +8,6 @@ const NsfwOverlay = props => { {__( "This content is Not Safe For Work. To view adult content, please change your" )}{" "} - {" "}{" "} props.navigateSettings()} diff --git a/ui/js/component/publishForm/index.js b/src/renderer/js/component/publishForm/index.js similarity index 100% rename from ui/js/component/publishForm/index.js rename to src/renderer/js/component/publishForm/index.js diff --git a/ui/js/component/publishForm/internal/channelSection.jsx b/src/renderer/js/component/publishForm/internal/channelSection.jsx similarity index 92% rename from ui/js/component/publishForm/internal/channelSection.jsx rename to src/renderer/js/component/publishForm/internal/channelSection.jsx index d61ae3762..203e90e74 100644 --- a/ui/js/component/publishForm/internal/channelSection.jsx +++ b/src/renderer/js/component/publishForm/internal/channelSection.jsx @@ -100,9 +100,11 @@ class ChannelSection extends React.PureComponent { - {channels.map(({ name }) => - - )} + {channels.map(({ name }) => ( + + ))} @@ -116,17 +118,18 @@ class ChannelSection extends React.PureComponent {
{__( "This is a username or handle that your content can be found under." - )} - {" "} + )}{" "} {__("Ex. @Marvel, @TheBeatles, @BooksByJoe")}
- {fetchingChannels - ? - : channelSelector} + {fetchingChannels ? ( + + ) : ( + channelSelector + )}
- {this.state.addingChannel && + {this.state.addingChannel && (
-
} +
+ )}
); } diff --git a/ui/js/component/publishForm/view.jsx b/src/renderer/js/component/publishForm/view.jsx similarity index 100% rename from ui/js/component/publishForm/view.jsx rename to src/renderer/js/component/publishForm/view.jsx diff --git a/ui/js/component/rewardLink/index.js b/src/renderer/js/component/rewardLink/index.js similarity index 100% rename from ui/js/component/rewardLink/index.js rename to src/renderer/js/component/rewardLink/index.js diff --git a/ui/js/component/rewardLink/view.jsx b/src/renderer/js/component/rewardLink/view.jsx similarity index 66% rename from ui/js/component/rewardLink/view.jsx rename to src/renderer/js/component/rewardLink/view.jsx index 9eeee17e2..05271feb8 100644 --- a/ui/js/component/rewardLink/view.jsx +++ b/src/renderer/js/component/rewardLink/view.jsx @@ -25,18 +25,20 @@ const RewardLink = props => { claimReward(reward); }} /> - {errorMessage - ? { - clearError(reward); - }} - > - {errorMessage} - - : ""} + {errorMessage ? ( + { + clearError(reward); + }} + > + {errorMessage} + + ) : ( + "" + )} ); }; diff --git a/ui/js/component/rewardListClaimed/index.js b/src/renderer/js/component/rewardListClaimed/index.js similarity index 100% rename from ui/js/component/rewardListClaimed/index.js rename to src/renderer/js/component/rewardListClaimed/index.js diff --git a/ui/js/component/rewardListClaimed/view.jsx b/src/renderer/js/component/rewardListClaimed/view.jsx similarity index 83% rename from ui/js/component/rewardListClaimed/view.jsx rename to src/renderer/js/component/rewardListClaimed/view.jsx index f568348cd..ea1d7a208 100644 --- a/ui/js/component/rewardListClaimed/view.jsx +++ b/src/renderer/js/component/rewardListClaimed/view.jsx @@ -10,7 +10,9 @@ const RewardListClaimed = props => { return (
-

Claimed Rewards

+
+

Claimed Rewards

+
@@ -27,7 +29,9 @@ const RewardListClaimed = props => { - + diff --git a/ui/js/component/rewardSummary/index.js b/src/renderer/js/component/rewardSummary/index.js similarity index 100% rename from ui/js/component/rewardSummary/index.js rename to src/renderer/js/component/rewardSummary/index.js diff --git a/ui/js/component/rewardSummary/view.jsx b/src/renderer/js/component/rewardSummary/view.jsx similarity index 91% rename from ui/js/component/rewardSummary/view.jsx rename to src/renderer/js/component/rewardSummary/view.jsx index d5f452477..3c97c50bb 100644 --- a/ui/js/component/rewardSummary/view.jsx +++ b/src/renderer/js/component/rewardSummary/view.jsx @@ -11,12 +11,13 @@ const RewardSummary = props => {

{__("Rewards")}

- {unclaimedRewardAmount > 0 && + {unclaimedRewardAmount > 0 && (

You have{" "} in unclaimed rewards. -

} +

+ )}
diff --git a/ui/js/component/rewardTile/index.js b/src/renderer/js/component/rewardTile/index.js similarity index 100% rename from ui/js/component/rewardTile/index.js rename to src/renderer/js/component/rewardTile/index.js diff --git a/ui/js/component/rewardTile/view.jsx b/src/renderer/js/component/rewardTile/view.jsx similarity index 66% rename from ui/js/component/rewardTile/view.jsx rename to src/renderer/js/component/rewardTile/view.jsx index df543561b..bc6af7313 100644 --- a/ui/js/component/rewardTile/view.jsx +++ b/src/renderer/js/component/rewardTile/view.jsx @@ -18,16 +18,17 @@ const RewardTile = props => {
{reward.reward_description}
- {reward.reward_type == rewards.TYPE_REFERRAL && - } + {reward.reward_type == rewards.TYPE_REFERRAL && ( + + )} {reward.reward_type !== rewards.TYPE_REFERRAL && - (claimed - ? {__("Reward claimed.")} - : )} + (claimed ? ( + + {__("Reward claimed.")} + + ) : ( + + ))}
diff --git a/ui/js/component/router/index.js b/src/renderer/js/component/router/index.js similarity index 100% rename from ui/js/component/router/index.js rename to src/renderer/js/component/router/index.js diff --git a/ui/js/component/router/view.jsx b/src/renderer/js/component/router/view.jsx similarity index 100% rename from ui/js/component/router/view.jsx rename to src/renderer/js/component/router/view.jsx diff --git a/ui/js/component/snackBar/index.js b/src/renderer/js/component/snackBar/index.js similarity index 100% rename from ui/js/component/snackBar/index.js rename to src/renderer/js/component/snackBar/index.js diff --git a/ui/js/component/snackBar/view.jsx b/src/renderer/js/component/snackBar/view.jsx similarity index 81% rename from ui/js/component/snackBar/view.jsx rename to src/renderer/js/component/snackBar/view.jsx index f2ee2c49d..a04aa3145 100644 --- a/ui/js/component/snackBar/view.jsx +++ b/src/renderer/js/component/snackBar/view.jsx @@ -31,12 +31,13 @@ class SnackBar extends React.PureComponent {
{message} {linkText && - linkTarget && - } + linkTarget && ( + + )}
); } diff --git a/ui/js/component/splash/index.js b/src/renderer/js/component/splash/index.js similarity index 100% rename from ui/js/component/splash/index.js rename to src/renderer/js/component/splash/index.js diff --git a/ui/js/component/splash/view.jsx b/src/renderer/js/component/splash/view.jsx similarity index 92% rename from ui/js/component/splash/view.jsx rename to src/renderer/js/component/splash/view.jsx index d785911f5..6d4ed62a4 100644 --- a/ui/js/component/splash/view.jsx +++ b/src/renderer/js/component/splash/view.jsx @@ -57,9 +57,10 @@ export class SplashScreen extends React.PureComponent { status.blockchain_status && status.blockchain_status.blocks_behind > 0 ) { - const format = status.blockchain_status.blocks_behind == 1 - ? "%s block behind" - : "%s blocks behind"; + const format = + status.blockchain_status.blocks_behind == 1 + ? "%s block behind" + : "%s blocks behind"; this.setState({ message: __("Blockchain Sync"), details: __(format, status.blockchain_status.blocks_behind), @@ -110,12 +111,10 @@ export class SplashScreen extends React.PureComponent { daemon doesn't let you quit during startup, so the "Quit" buttons in the modals won't work. */} {modal == "incompatibleDaemon" && - this.state.isRunning && - } + this.state.isRunning && } {modal == modals.UPGRADE && this.state.isRunning && } {modal == modals.DOWNLOADING && - this.state.isRunning && - } + this.state.isRunning && } ); } diff --git a/ui/js/component/subHeader/index.js b/src/renderer/js/component/subHeader/index.js similarity index 100% rename from ui/js/component/subHeader/index.js rename to src/renderer/js/component/subHeader/index.js diff --git a/ui/js/component/subHeader/view.jsx b/src/renderer/js/component/subHeader/view.jsx similarity index 100% rename from ui/js/component/subHeader/view.jsx rename to src/renderer/js/component/subHeader/view.jsx diff --git a/ui/js/component/theme/index.js b/src/renderer/js/component/theme/index.js similarity index 100% rename from ui/js/component/theme/index.js rename to src/renderer/js/component/theme/index.js diff --git a/ui/js/component/theme/view.jsx b/src/renderer/js/component/theme/view.jsx similarity index 100% rename from ui/js/component/theme/view.jsx rename to src/renderer/js/component/theme/view.jsx diff --git a/ui/js/component/tooltip.js b/src/renderer/js/component/tooltip.js similarity index 100% rename from ui/js/component/tooltip.js rename to src/renderer/js/component/tooltip.js diff --git a/ui/js/component/transactionList/index.js b/src/renderer/js/component/transactionList/index.js similarity index 100% rename from ui/js/component/transactionList/index.js rename to src/renderer/js/component/transactionList/index.js diff --git a/ui/js/component/transactionList/internal/TransactionListItem.jsx b/src/renderer/js/component/transactionList/internal/TransactionListItem.jsx similarity index 65% rename from ui/js/component/transactionList/internal/TransactionListItem.jsx rename to src/renderer/js/component/transactionList/internal/TransactionListItem.jsx index 35cd33247..847e3759c 100644 --- a/ui/js/component/transactionList/internal/TransactionListItem.jsx +++ b/src/renderer/js/component/transactionList/internal/TransactionListItem.jsx @@ -59,20 +59,20 @@ class TransactionListItem extends React.PureComponent { return (
{reward.reward_title} {reward.reward_amount} + + {reward.created_at.replace("Z", " ").replace("T", " ")}
- {date - ?
- -
- -
+ {date ? ( +
+ +
+
- : - {__("Pending")} - } +
+ ) : ( + {__("Pending")} + )}

- {fee != 0 && - } + {fee != 0 && ( + + )}
- {this.capitalize(type)}{" "} - {isRevokeable && this.getLink(type)} - + {this.capitalize(type)} {isRevokeable && this.getLink(type)} - {reward && + {reward && ( {__("Reward: %s", reward.reward_title)} - } + + )} {name && - claimId && - - {name} - } + claimId && ( + + {name} + + )} diff --git a/ui/js/component/transactionList/view.jsx b/src/renderer/js/component/transactionList/view.jsx similarity index 88% rename from ui/js/component/transactionList/view.jsx rename to src/renderer/js/component/transactionList/view.jsx index f736320bf..dca14dd93 100644 --- a/ui/js/component/transactionList/view.jsx +++ b/src/renderer/js/component/transactionList/view.jsx @@ -45,9 +45,9 @@ class TransactionList extends React.PureComponent { return (
- {(transactionList.length || this.state.filter) && + {(transactionList.length || this.state.filter) && ( - {__("Filter")} {" "} + {__("Filter")}{" "} {__("Tips")} - - {" "} + {" "} - } - {!transactionList.length && + + )} + {!transactionList.length && (
{emptyMessage || __("No transactions to list.")} -
} - {Boolean(transactionList.length) && +
+ )} + {Boolean(transactionList.length) && ( @@ -83,7 +84,7 @@ class TransactionList extends React.PureComponent { - {transactionList.map(t => + {transactionList.map(t => ( - )} + ))} -
} +
+ )}
); } diff --git a/ui/js/component/transactionListRecent/index.js b/src/renderer/js/component/transactionListRecent/index.js similarity index 100% rename from ui/js/component/transactionListRecent/index.js rename to src/renderer/js/component/transactionListRecent/index.js diff --git a/ui/js/component/transactionListRecent/view.jsx b/src/renderer/js/component/transactionListRecent/view.jsx similarity index 87% rename from ui/js/component/transactionListRecent/view.jsx rename to src/renderer/js/component/transactionListRecent/view.jsx index 45d3700bb..7c5b00c4b 100644 --- a/ui/js/component/transactionListRecent/view.jsx +++ b/src/renderer/js/component/transactionListRecent/view.jsx @@ -18,15 +18,17 @@ class TransactionListRecent extends React.PureComponent {

{__("Recent Transactions")}

- {fetchingTransactions && - } - {!fetchingTransactions && + {fetchingTransactions && ( + + )} + {!fetchingTransactions && ( } + /> + )}
- {hasTransactions && + {hasTransactions && (
-
} + + )}
); } diff --git a/ui/js/component/truncatedMarkdown/index.js b/src/renderer/js/component/truncatedMarkdown/index.js similarity index 100% rename from ui/js/component/truncatedMarkdown/index.js rename to src/renderer/js/component/truncatedMarkdown/index.js diff --git a/ui/js/component/truncatedMarkdown/view.jsx b/src/renderer/js/component/truncatedMarkdown/view.jsx similarity index 83% rename from ui/js/component/truncatedMarkdown/view.jsx rename to src/renderer/js/component/truncatedMarkdown/view.jsx index 59e42d6af..9146855f1 100644 --- a/ui/js/component/truncatedMarkdown/view.jsx +++ b/src/renderer/js/component/truncatedMarkdown/view.jsx @@ -22,9 +22,10 @@ class TruncatedMarkdown extends React.PureComponent { } render() { - let content = this.props.children && typeof this.props.children === "string" - ? this.transformMarkdown(this.props.children) - : this.props.children; + let content = + this.props.children && typeof this.props.children === "string" + ? this.transformMarkdown(this.props.children) + : this.props.children; return (
- {errorMessage && -

{errorMessage}

} + {errorMessage && ( +

{errorMessage}

+ )}
This will not automatically refresh after approval. Once you have - synced your account, just navigate away or click - {" "} . + synced your account, just navigate away or click{" "} + .
@@ -129,13 +129,11 @@ class UserVerify extends React.PureComponent {
{__("Or, Skip It Entirely")}
-

{__( "You can continue without this step, but you will not be eligible to earn rewards." )}

-
+const LoadingScreen = ({ status, spinner = true }) => (
{spinner &&
} -
- {status} -
+
{status}
-
; +
+); export default LoadingScreen; diff --git a/ui/js/component/video/internal/play-button.jsx b/src/renderer/js/component/video/internal/play-button.jsx similarity index 91% rename from ui/js/component/video/internal/play-button.jsx rename to src/renderer/js/component/video/internal/play-button.jsx index 73905f298..ca49cb331 100644 --- a/ui/js/component/video/internal/play-button.jsx +++ b/src/renderer/js/component/video/internal/play-button.jsx @@ -37,9 +37,10 @@ class VideoPlayButton extends React.PureComponent { */ const disabled = isLoading || fileInfo === undefined; - const icon = ["audio", "video"].indexOf(mediaType) !== -1 - ? "icon-play" - : "icon-folder-o"; + const icon = + ["audio", "video"].indexOf(mediaType) !== -1 + ? "icon-play" + : "icon-folder-o"; return ( {["audio", "application"].indexOf(mediaType) !== -1 && (!this.playableType() || hasMetadata) && - !unplayable && - } + !unplayable && } {this.playableType() && !hasMetadata && - !unplayable && - } - {unplayable && - } + !unplayable && } + {unplayable && ( + + )}
); diff --git a/ui/js/component/video/view.jsx b/src/renderer/js/component/video/view.jsx similarity index 84% rename from ui/js/component/video/view.jsx rename to src/renderer/js/component/video/view.jsx index f65a63204..c42994a17 100644 --- a/ui/js/component/video/view.jsx +++ b/src/renderer/js/component/video/view.jsx @@ -98,25 +98,28 @@ class Video extends React.PureComponent { onMouseLeave={this.handleMouseOut.bind(this)} > {isPlaying && - (!isReadyToPlay - ? - : )} - {!isPlaying && + (!isReadyToPlay ? ( + + ) : ( + + ))} + {!isPlaying && (
-
} +
+ )} {this.state.showNsfwHelp && } ); diff --git a/ui/js/component/walletAddress/index.js b/src/renderer/js/component/walletAddress/index.js similarity index 100% rename from ui/js/component/walletAddress/index.js rename to src/renderer/js/component/walletAddress/index.js diff --git a/ui/js/component/walletAddress/view.jsx b/src/renderer/js/component/walletAddress/view.jsx similarity index 100% rename from ui/js/component/walletAddress/view.jsx rename to src/renderer/js/component/walletAddress/view.jsx diff --git a/ui/js/component/walletBalance/index.js b/src/renderer/js/component/walletBalance/index.js similarity index 100% rename from ui/js/component/walletBalance/index.js rename to src/renderer/js/component/walletBalance/index.js diff --git a/ui/js/component/walletBalance/view.jsx b/src/renderer/js/component/walletBalance/view.jsx similarity index 87% rename from ui/js/component/walletBalance/view.jsx rename to src/renderer/js/component/walletBalance/view.jsx index 90d666895..72ab590f5 100644 --- a/ui/js/component/walletBalance/view.jsx +++ b/src/renderer/js/component/walletBalance/view.jsx @@ -18,8 +18,9 @@ const WalletBalance = props => {

{__("Balance")}

- {(balance || balance === 0) && - } + {(balance || balance === 0) && ( + + )}
-

{__("Support")}

+

+ {__("Support")} +

-
- {this.props.children} -
- {this.props.type == "custom" // custom modals define their own buttons - ? null - :
+
{this.props.children}
+ {this.props.type == "custom" ? null : ( // custom modals define their own buttons +
+ + {this.props.type == "confirm" ? ( - {this.props.type == "confirm" - ? - : null} -
} + ) : null} +
+ )} ); } diff --git a/ui/js/modal/modalAffirmPurchase/index.js b/src/renderer/js/modal/modalAffirmPurchase/index.js similarity index 100% rename from ui/js/modal/modalAffirmPurchase/index.js rename to src/renderer/js/modal/modalAffirmPurchase/index.js diff --git a/ui/js/modal/modalAffirmPurchase/view.jsx b/src/renderer/js/modal/modalAffirmPurchase/view.jsx similarity index 100% rename from ui/js/modal/modalAffirmPurchase/view.jsx rename to src/renderer/js/modal/modalAffirmPurchase/view.jsx diff --git a/ui/js/modal/modalAuthFailure/index.js b/src/renderer/js/modal/modalAuthFailure/index.js similarity index 100% rename from ui/js/modal/modalAuthFailure/index.js rename to src/renderer/js/modal/modalAuthFailure/index.js diff --git a/ui/js/modal/modalAuthFailure/view.jsx b/src/renderer/js/modal/modalAuthFailure/view.jsx similarity index 100% rename from ui/js/modal/modalAuthFailure/view.jsx rename to src/renderer/js/modal/modalAuthFailure/view.jsx diff --git a/ui/js/modal/modalCreditIntro/index.js b/src/renderer/js/modal/modalCreditIntro/index.js similarity index 100% rename from ui/js/modal/modalCreditIntro/index.js rename to src/renderer/js/modal/modalCreditIntro/index.js diff --git a/ui/js/modal/modalCreditIntro/view.jsx b/src/renderer/js/modal/modalCreditIntro/view.jsx similarity index 100% rename from ui/js/modal/modalCreditIntro/view.jsx rename to src/renderer/js/modal/modalCreditIntro/view.jsx diff --git a/ui/js/modal/modalDownloading/index.js b/src/renderer/js/modal/modalDownloading/index.js similarity index 100% rename from ui/js/modal/modalDownloading/index.js rename to src/renderer/js/modal/modalDownloading/index.js diff --git a/ui/js/modal/modalDownloading/view.jsx b/src/renderer/js/modal/modalDownloading/view.jsx similarity index 56% rename from ui/js/modal/modalDownloading/view.jsx rename to src/renderer/js/modal/modalDownloading/view.jsx index 373f83ae1..d52176b8e 100644 --- a/ui/js/modal/modalDownloading/view.jsx +++ b/src/renderer/js/modal/modalDownloading/view.jsx @@ -24,29 +24,27 @@ class ModalDownloading extends React.PureComponent { percent={downloadProgress ? downloadProgress : 0} strokeWidth="4" /> - {downloadComplete - ?
-
-

{__('Click "Begin Upgrade" to start the upgrade process.')}

-

- {__( - "The app will close, and you will be prompted to install the latest version of LBRY." - )} -

-

- {__("After the install is complete, please reopen the app.")} -

-
- : null} + {downloadComplete ? ( +
+
+

{__('Click "Begin Upgrade" to start the upgrade process.')}

+

+ {__( + "The app will close, and you will be prompted to install the latest version of LBRY." + )} +

+

{__("After the install is complete, please reopen the app.")}

+
+ ) : null}
- {downloadComplete - ? - : null} + {downloadComplete ? ( + + ) : null} {label}: {val} +
  • + {label}: {val} +
  • ); } const errorInfo = ( diff --git a/ui/js/modal/modalFileTimeout/index.js b/src/renderer/js/modal/modalFileTimeout/index.js similarity index 100% rename from ui/js/modal/modalFileTimeout/index.js rename to src/renderer/js/modal/modalFileTimeout/index.js diff --git a/ui/js/modal/modalFileTimeout/view.jsx b/src/renderer/js/modal/modalFileTimeout/view.jsx similarity index 80% rename from ui/js/modal/modalFileTimeout/view.jsx rename to src/renderer/js/modal/modalFileTimeout/view.jsx index 9a0916c66..da9be3f17 100644 --- a/ui/js/modal/modalFileTimeout/view.jsx +++ b/src/renderer/js/modal/modalFileTimeout/view.jsx @@ -11,8 +11,7 @@ class ModalFileTimeout extends React.PureComponent { contentLabel={__("Download failed")} onConfirmed={closeModal} > - {__("LBRY was unable to download the stream")}{" "} - {title}. + {__("LBRY was unable to download the stream")} {title}. ); } diff --git a/ui/js/modal/modalFirstReward/index.js b/src/renderer/js/modal/modalFirstReward/index.js similarity index 100% rename from ui/js/modal/modalFirstReward/index.js rename to src/renderer/js/modal/modalFirstReward/index.js diff --git a/ui/js/modal/modalFirstReward/view.jsx b/src/renderer/js/modal/modalFirstReward/view.jsx similarity index 91% rename from ui/js/modal/modalFirstReward/view.jsx rename to src/renderer/js/modal/modalFirstReward/view.jsx index 5317bd9d9..05fb0c0e0 100644 --- a/ui/js/modal/modalFirstReward/view.jsx +++ b/src/renderer/js/modal/modalFirstReward/view.jsx @@ -17,8 +17,8 @@ class ModalFirstReward extends React.PureComponent {

    {__("Your First Reward")}

    - {__("You just earned your first reward of")} - {" "}. + {__("You just earned your first reward of")}{" "} + .

    {__( diff --git a/ui/js/modal/modalIncompatibleDaemon/index.js b/src/renderer/js/modal/modalIncompatibleDaemon/index.js similarity index 100% rename from ui/js/modal/modalIncompatibleDaemon/index.js rename to src/renderer/js/modal/modalIncompatibleDaemon/index.js diff --git a/ui/js/modal/modalIncompatibleDaemon/view.jsx b/src/renderer/js/modal/modalIncompatibleDaemon/view.jsx similarity index 100% rename from ui/js/modal/modalIncompatibleDaemon/view.jsx rename to src/renderer/js/modal/modalIncompatibleDaemon/view.jsx diff --git a/ui/js/modal/modalInsufficientBalance/index.js b/src/renderer/js/modal/modalInsufficientBalance/index.js similarity index 100% rename from ui/js/modal/modalInsufficientBalance/index.js rename to src/renderer/js/modal/modalInsufficientBalance/index.js diff --git a/ui/js/modal/modalInsufficientBalance/view.jsx b/src/renderer/js/modal/modalInsufficientBalance/view.jsx similarity index 100% rename from ui/js/modal/modalInsufficientBalance/view.jsx rename to src/renderer/js/modal/modalInsufficientBalance/view.jsx diff --git a/ui/js/modal/modalInsufficientCredits/index.js b/src/renderer/js/modal/modalInsufficientCredits/index.js similarity index 100% rename from ui/js/modal/modalInsufficientCredits/index.js rename to src/renderer/js/modal/modalInsufficientCredits/index.js diff --git a/ui/js/modal/modalInsufficientCredits/view.jsx b/src/renderer/js/modal/modalInsufficientCredits/view.jsx similarity index 88% rename from ui/js/modal/modalInsufficientCredits/view.jsx rename to src/renderer/js/modal/modalInsufficientCredits/view.jsx index 397fc0301..7da75a7dd 100644 --- a/ui/js/modal/modalInsufficientCredits/view.jsx +++ b/src/renderer/js/modal/modalInsufficientCredits/view.jsx @@ -17,7 +17,9 @@ class ModalInsufficientCredits extends React.PureComponent { onConfirmed={addFunds} >

    {__("More Credits Required")}

    -

    You'll need more to do this.

    +

    + You'll need more to do this. +

    ); } diff --git a/ui/js/modal/modalRemoveFile/index.js b/src/renderer/js/modal/modalRemoveFile/index.js similarity index 100% rename from ui/js/modal/modalRemoveFile/index.js rename to src/renderer/js/modal/modalRemoveFile/index.js diff --git a/ui/js/modal/modalRemoveFile/view.jsx b/src/renderer/js/modal/modalRemoveFile/view.jsx similarity index 96% rename from ui/js/modal/modalRemoveFile/view.jsx rename to src/renderer/js/modal/modalRemoveFile/view.jsx index 5b0c36f86..7106a5e4c 100644 --- a/ui/js/modal/modalRemoveFile/view.jsx +++ b/src/renderer/js/modal/modalRemoveFile/view.jsx @@ -41,7 +41,8 @@ class ModalRemoveFile extends React.PureComponent { type="confirm" confirmButtonLabel={__("Remove")} onConfirmed={() => - deleteFile(outpoint, deleteChecked, abandonClaimChecked)} + deleteFile(outpoint, deleteChecked, abandonClaimChecked) + } onAborted={closeModal} >

    @@ -57,7 +58,7 @@ class ModalRemoveFile extends React.PureComponent { label={__("Delete this file from my computer")} />

    - {claimIsMine && + {claimIsMine && (
    -
    } + + )} ); } diff --git a/ui/js/modal/modalRevokeClaim/index.js b/src/renderer/js/modal/modalRevokeClaim/index.js similarity index 100% rename from ui/js/modal/modalRevokeClaim/index.js rename to src/renderer/js/modal/modalRevokeClaim/index.js diff --git a/ui/js/modal/modalRevokeClaim/view.jsx b/src/renderer/js/modal/modalRevokeClaim/view.jsx similarity index 100% rename from ui/js/modal/modalRevokeClaim/view.jsx rename to src/renderer/js/modal/modalRevokeClaim/view.jsx diff --git a/ui/js/modal/modalRewardApprovalRequired/index.js b/src/renderer/js/modal/modalRewardApprovalRequired/index.js similarity index 100% rename from ui/js/modal/modalRewardApprovalRequired/index.js rename to src/renderer/js/modal/modalRewardApprovalRequired/index.js diff --git a/ui/js/modal/modalRewardApprovalRequired/view.jsx b/src/renderer/js/modal/modalRewardApprovalRequired/view.jsx similarity index 100% rename from ui/js/modal/modalRewardApprovalRequired/view.jsx rename to src/renderer/js/modal/modalRewardApprovalRequired/view.jsx diff --git a/ui/js/modal/modalRouter/index.js b/src/renderer/js/modal/modalRouter/index.js similarity index 100% rename from ui/js/modal/modalRouter/index.js rename to src/renderer/js/modal/modalRouter/index.js diff --git a/ui/js/modal/modalRouter/view.jsx b/src/renderer/js/modal/modalRouter/view.jsx similarity index 100% rename from ui/js/modal/modalRouter/view.jsx rename to src/renderer/js/modal/modalRouter/view.jsx diff --git a/ui/js/modal/modalTransactionFailed/index.js b/src/renderer/js/modal/modalTransactionFailed/index.js similarity index 100% rename from ui/js/modal/modalTransactionFailed/index.js rename to src/renderer/js/modal/modalTransactionFailed/index.js diff --git a/ui/js/modal/modalTransactionFailed/view.jsx b/src/renderer/js/modal/modalTransactionFailed/view.jsx similarity index 100% rename from ui/js/modal/modalTransactionFailed/view.jsx rename to src/renderer/js/modal/modalTransactionFailed/view.jsx diff --git a/ui/js/modal/modalUpgrade/index.js b/src/renderer/js/modal/modalUpgrade/index.js similarity index 100% rename from ui/js/modal/modalUpgrade/index.js rename to src/renderer/js/modal/modalUpgrade/index.js diff --git a/ui/js/modal/modalUpgrade/view.jsx b/src/renderer/js/modal/modalUpgrade/view.jsx similarity index 85% rename from ui/js/modal/modalUpgrade/view.jsx rename to src/renderer/js/modal/modalUpgrade/view.jsx index 7d10d9a0f..e80f4c07c 100644 --- a/ui/js/modal/modalUpgrade/view.jsx +++ b/src/renderer/js/modal/modalUpgrade/view.jsx @@ -19,13 +19,11 @@ class ModalUpgrade extends React.PureComponent {

    {__("LBRY Leveled Up")}


    - {__("An updated version of LBRY is now available.")} - {" "} + {__("An updated version of LBRY is now available.")}{" "} {__("Your version is out of date and may be unreliable or insecure.")}

    - {__("Want to know what has changed?")} - {" "} See the{" "} + {__("Want to know what has changed?")} See the{" "} {

    {__( "Using LBRY is like dating a centaur. Totally normal up top, and" - )} - {" "}{__("way different")} {__("underneath.")} + )}{" "} + {__("way different")} {__("underneath.")}

    {__("Up top, LBRY is similar to popular media sites.")}

    diff --git a/ui/js/page/auth/index.js b/src/renderer/js/page/auth/index.js similarity index 100% rename from ui/js/page/auth/index.js rename to src/renderer/js/page/auth/index.js diff --git a/ui/js/page/auth/view.jsx b/src/renderer/js/page/auth/view.jsx similarity index 72% rename from ui/js/page/auth/view.jsx rename to src/renderer/js/page/auth/view.jsx index b9ac51bbd..49ea877b2 100644 --- a/ui/js/page/auth/view.jsx +++ b/src/renderer/js/page/auth/view.jsx @@ -60,29 +60,29 @@ export class AuthPage extends React.PureComponent { const { email, user, isPending, navigate } = this.props; const [innerContent, useTemplate] = this.renderMain(); - return useTemplate - ?

    -
    -
    -

    {this.getTitle()}

    + return useTemplate ? ( +
    +
    +
    +

    {this.getTitle()}

    +
    +
    {innerContent}
    +
    +
    + {__( + "This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards." + ) + " "} + navigate("/discover")} + label={__("Return home")} + />.
    -
    - {innerContent} -
    -
    -
    - {__( - "This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards." - ) + " "} - navigate("/discover")} - label={__("Return home")} - />. -
    -
    -
    -
    - : innerContent; +
    +
    +
    + ) : ( + innerContent + ); } } diff --git a/ui/js/page/backup/index.js b/src/renderer/js/page/backup/index.js similarity index 100% rename from ui/js/page/backup/index.js rename to src/renderer/js/page/backup/index.js diff --git a/ui/js/page/backup/view.jsx b/src/renderer/js/page/backup/view.jsx similarity index 95% rename from ui/js/page/backup/view.jsx rename to src/renderer/js/page/backup/view.jsx index 6ce9de6b6..09c0b54da 100644 --- a/ui/js/page/backup/view.jsx +++ b/src/renderer/js/page/backup/view.jsx @@ -39,9 +39,7 @@ class BackupPage extends React.PureComponent { )}

    - - {__(`${daemonSettings.lbryum_wallet_dir}`)} - + {__(`${daemonSettings.lbryum_wallet_dir}`)}

    diff --git a/ui/js/page/channel/index.js b/src/renderer/js/page/channel/index.js similarity index 100% rename from ui/js/page/channel/index.js rename to src/renderer/js/page/channel/index.js diff --git a/ui/js/page/channel/view.jsx b/src/renderer/js/page/channel/view.jsx similarity index 65% rename from ui/js/page/channel/view.jsx rename to src/renderer/js/page/channel/view.jsx index bb8f5d20b..805ebc2d4 100644 --- a/ui/js/page/channel/view.jsx +++ b/src/renderer/js/page/channel/view.jsx @@ -44,8 +44,9 @@ class ChannelPage extends React.PureComponent { if (fetching) { contentList = ; } else { - contentList = claimsInChannel && claimsInChannel.length - ? claimsInChannel.map(claim => + contentList = + claimsInChannel && claimsInChannel.length ? ( + claimsInChannel.map(claim => ( - ) - : {__("No content found.")}; + )) + ) : ( + {__("No content found.")} + ); } return (

    -

    {uri}

    +
    +

    {uri}

    +

    @@ -76,22 +81,23 @@ class ChannelPage extends React.PureComponent { {contentList}

    {(!fetching || (claimsInChannel && claimsInChannel.length)) && - totalPages > 1 && - this.changePage(e.selected + 1)} - initialPage={parseInt(page - 1)} - containerClassName="pagination" - />} + totalPages > 1 && ( + this.changePage(e.selected + 1)} + initialPage={parseInt(page - 1)} + containerClassName="pagination" + /> + )}
    ); } diff --git a/ui/js/page/discover/index.js b/src/renderer/js/page/discover/index.js similarity index 100% rename from ui/js/page/discover/index.js rename to src/renderer/js/page/discover/index.js diff --git a/ui/js/page/discover/view.jsx b/src/renderer/js/page/discover/view.jsx similarity index 83% rename from ui/js/page/discover/view.jsx rename to src/renderer/js/page/discover/view.jsx index 19e00980d..f8ea424ab 100644 --- a/ui/js/page/discover/view.jsx +++ b/src/renderer/js/page/discover/view.jsx @@ -155,17 +155,18 @@ class FeaturedCategory extends React.PureComponent {

    {category} {category && - category.match(/^community/i) && - } + category.match(/^community/i) && ( + + )}

    - {this.state.canScrollPrevious && + {this.state.canScrollPrevious && (
    -
    } - {this.state.canScrollNext && +
    + )} + {this.state.canScrollNext && (
    -
    } +
    + )}
    {names && - names.map(name => + names.map(name => ( - )} + ))}
    @@ -207,29 +210,31 @@ class DiscoverPage extends React.PureComponent { render() { const { featuredUris, fetchingFeaturedUris } = this.props; const hasContent = - typeof featuredUris === "object" && Object.keys(featuredUris).length, + typeof featuredUris === "object" && Object.keys(featuredUris).length, failedToLoad = !fetchingFeaturedUris && !hasContent; return (
    {!hasContent && - fetchingFeaturedUris && - } + fetchingFeaturedUris && ( + + )} {hasContent && Object.keys(featuredUris).map( category => - featuredUris[category].length - ? - : "" + featuredUris[category].length ? ( + + ) : ( + "" + ) )} - {failedToLoad && -
    - {__("Failed to load landing content.")} -
    } + {failedToLoad && ( +
    {__("Failed to load landing content.")}
    + )}
    ); } diff --git a/ui/js/page/file/index.js b/src/renderer/js/page/file/index.js similarity index 100% rename from ui/js/page/file/index.js rename to src/renderer/js/page/file/index.js diff --git a/ui/js/page/file/view.jsx b/src/renderer/js/page/file/view.jsx similarity index 100% rename from ui/js/page/file/view.jsx rename to src/renderer/js/page/file/view.jsx diff --git a/ui/js/page/fileListDownloaded/index.js b/src/renderer/js/page/fileListDownloaded/index.js similarity index 100% rename from ui/js/page/fileListDownloaded/index.js rename to src/renderer/js/page/fileListDownloaded/index.js diff --git a/ui/js/page/fileListDownloaded/view.jsx b/src/renderer/js/page/fileListDownloaded/view.jsx similarity index 100% rename from ui/js/page/fileListDownloaded/view.jsx rename to src/renderer/js/page/fileListDownloaded/view.jsx diff --git a/ui/js/page/fileListPublished/index.js b/src/renderer/js/page/fileListPublished/index.js similarity index 100% rename from ui/js/page/fileListPublished/index.js rename to src/renderer/js/page/fileListPublished/index.js diff --git a/ui/js/page/fileListPublished/view.jsx b/src/renderer/js/page/fileListPublished/view.jsx similarity index 91% rename from ui/js/page/fileListPublished/view.jsx rename to src/renderer/js/page/fileListPublished/view.jsx index 0d9e093c8..2444bca12 100644 --- a/ui/js/page/fileListPublished/view.jsx +++ b/src/renderer/js/page/fileListPublished/view.jsx @@ -33,9 +33,7 @@ class FileListPublished extends React.PureComponent { } else { content = ( - {__( - "It looks like you haven't published anything to LBRY yet. Go" - )}{" "} + {__("It looks like you haven't published anything to LBRY yet. Go")}{" "} navigate("/publish")} label={__("share your beautiful cats with the world")} diff --git a/ui/js/page/help/index.js b/src/renderer/js/page/help/index.js similarity index 100% rename from ui/js/page/help/index.js rename to src/renderer/js/page/help/index.js diff --git a/ui/js/page/help/view.jsx b/src/renderer/js/page/help/view.jsx similarity index 54% rename from ui/js/page/help/view.jsx rename to src/renderer/js/page/help/view.jsx index b7a0db697..2aca230c6 100644 --- a/ui/js/page/help/view.jsx +++ b/src/renderer/js/page/help/view.jsx @@ -55,9 +55,8 @@ class HelpPage extends React.PureComponent { if (this.state.versionInfo) { ver = this.state.versionInfo; if (ver.os_system == "Darwin") { - osName = parseInt(ver.os_release.match(/^\d+/)) < 16 - ? "Mac OS X" - : "Mac OS"; + osName = + parseInt(ver.os_release.match(/^\d+/)) < 16 ? "Mac OS X" : "Mac OS"; platform = `${osName} ${ver.os_release}`; newVerLink = "https://lbry.io/get/lbry.dmg"; @@ -97,9 +96,8 @@ class HelpPage extends React.PureComponent {

    - {__("Live help is available most hours in the")} - {" "}#help - {" "}{__("channel of our Discord chat room.")} + {__("Live help is available most hours in the")}{" "} + #help {__("channel of our Discord chat room.")}

    -

    {__("About")}

    +
    +

    {__("About")}

    +
    - {this.state.upgradeAvailable === null - ? "" - : this.state.upgradeAvailable - ?

    - {__("A newer version of LBRY is available.")} - {" "} -

    - :

    {__("Your copy of LBRY is up to date.")}

    } - {this.state.uiVersion && ver - ? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
    {__("App")}{this.state.uiVersion}
    {__("Daemon (lbrynet)")}{ver.lbrynet_version}
    {__("Wallet (lbryum)")}{ver.lbryum_version}
    {__("Connected Email")} - {user && user.primary_email - ? user.primary_email - : - {__("none")} - ( doAuth()} - label={__("set email")} - />) - } -
    {__("Reward Eligible")} - {user && user.is_reward_approved - ? - : } -
    {__("Platform")}{platform}
    {__("Installation ID")}{this.state.lbryId}
    {__("Access Token")} - {this.state.accessTokenHidden && - } - {!this.state.accessTokenHidden && - accessToken && + {this.state.upgradeAvailable === null ? ( + "" + ) : this.state.upgradeAvailable ? ( +

    + {__("A newer version of LBRY is available.")}{" "} + +

    + ) : ( +

    {__("Your copy of LBRY is up to date.")}

    + )} + {this.state.uiVersion && ver ? ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
    {__("App")}{this.state.uiVersion}
    {__("Daemon (lbrynet)")}{ver.lbrynet_version}
    {__("Wallet (lbryum)")}{ver.lbryum_version}
    {__("Connected Email")} + {user && user.primary_email ? ( + user.primary_email + ) : ( + + {__("none")} + ( doAuth()} + label={__("set email")} + />) + + )} +
    {__("Reward Eligible")} + {user && user.is_reward_approved ? ( + + ) : ( + + )} +
    {__("Platform")}{platform}
    {__("Installation ID")}{this.state.lbryId}
    {__("Access Token")} + {this.state.accessTokenHidden && ( + + )} + {!this.state.accessTokenHidden && + accessToken && (

    {accessToken}

    @@ -204,12 +211,15 @@ class HelpPage extends React.PureComponent { "This is equivalent to a password. Do not post or share this." )}
    -
    } -
    - : } + + )} +
    + ) : ( + + )}
    diff --git a/ui/js/page/invite/index.js b/src/renderer/js/page/invite/index.js similarity index 100% rename from ui/js/page/invite/index.js rename to src/renderer/js/page/invite/index.js diff --git a/ui/js/page/invite/view.jsx b/src/renderer/js/page/invite/view.jsx similarity index 78% rename from ui/js/page/invite/view.jsx rename to src/renderer/js/page/invite/view.jsx index 0488ca1f3..c4dd7ae31 100644 --- a/ui/js/page/invite/view.jsx +++ b/src/renderer/js/page/invite/view.jsx @@ -15,13 +15,15 @@ class InvitePage extends React.PureComponent { return (
    - {isPending && - } + {isPending && ( + + )} {!isPending && - isFailed && - - {__("Failed to retrieve invite status.")} - } + isFailed && ( + + {__("Failed to retrieve invite status.")} + + )} {!isPending && !isFailed && } {!isPending && !isFailed && }
    diff --git a/ui/js/page/publish/index.js b/src/renderer/js/page/publish/index.js similarity index 100% rename from ui/js/page/publish/index.js rename to src/renderer/js/page/publish/index.js diff --git a/ui/js/page/publish/view.jsx b/src/renderer/js/page/publish/view.jsx similarity index 100% rename from ui/js/page/publish/view.jsx rename to src/renderer/js/page/publish/view.jsx diff --git a/ui/js/page/receiveCredits/index.js b/src/renderer/js/page/receiveCredits/index.js similarity index 100% rename from ui/js/page/receiveCredits/index.js rename to src/renderer/js/page/receiveCredits/index.js diff --git a/ui/js/page/receiveCredits/view.jsx b/src/renderer/js/page/receiveCredits/view.jsx similarity index 100% rename from ui/js/page/receiveCredits/view.jsx rename to src/renderer/js/page/receiveCredits/view.jsx diff --git a/ui/js/page/report.js b/src/renderer/js/page/report.js similarity index 100% rename from ui/js/page/report.js rename to src/renderer/js/page/report.js diff --git a/ui/js/page/rewards/index.js b/src/renderer/js/page/rewards/index.js similarity index 100% rename from ui/js/page/rewards/index.js rename to src/renderer/js/page/rewards/index.js diff --git a/ui/js/page/rewards/view.jsx b/src/renderer/js/page/rewards/view.jsx similarity index 91% rename from ui/js/page/rewards/view.jsx rename to src/renderer/js/page/rewards/view.jsx index 97344d152..b2132df83 100644 --- a/ui/js/page/rewards/view.jsx +++ b/src/renderer/js/page/rewards/view.jsx @@ -44,8 +44,7 @@ class RewardsPage extends React.PureComponent {

    - {__("Rewards are for human beings only.")} - {" "} + {__("Rewards are for human beings only.")}{" "} {__( "You'll have to prove you're one of us before you can claim any rewards." )} @@ -62,8 +61,7 @@ class RewardsPage extends React.PureComponent {

    {__( "This account must undergo review before you can participate in the rewards program." - )} - {" "} + )}{" "} {__( "This can take anywhere from several minutes to several days." )} @@ -75,7 +73,9 @@ class RewardsPage extends React.PureComponent { )}

    - {__("If you continue to see this message, send us an email to help@lbry.io.") + + {__( + "If you continue to see this message, send us an email to help@lbry.io." + ) + " " + __("Please enjoy free content in the meantime!")}

    @@ -114,15 +114,17 @@ class RewardsPage extends React.PureComponent { } else if (!rewards || rewards.length <= 0) { return (
    - {__("There are no rewards available at this time, please check back later.")} + {__( + "There are no rewards available at this time, please check back later." + )}
    ); } else { return (
    - {rewards.map(reward => + {rewards.map(reward => ( - )} + ))}
    ); } diff --git a/ui/js/page/search/index.js b/src/renderer/js/page/search/index.js similarity index 100% rename from ui/js/page/search/index.js rename to src/renderer/js/page/search/index.js diff --git a/ui/js/page/search/view.jsx b/src/renderer/js/page/search/view.jsx similarity index 52% rename from ui/js/page/search/view.jsx rename to src/renderer/js/page/search/view.jsx index e2ca65da2..d6a69bf9c 100644 --- a/ui/js/page/search/view.jsx +++ b/src/renderer/js/page/search/view.jsx @@ -10,29 +10,29 @@ class SearchPage extends React.PureComponent { return (
    - {lbryuri.isValid(query) - ?
    -

    - {__("Exact URL")} - {" "} - -

    - +

    + {__("Exact URL")}{" "} + -

    - : ""} + + + + ) : ( + "" + )}

    - {__("Search Results for")} {query} - {" "} + {__("Search Results for")} {query}{" "} - {!daemonSettings.disable_max_key_fee && + {!daemonSettings.disable_max_key_fee && ( } + /> + )}

    {__( @@ -256,12 +257,13 @@ class SettingsPage extends React.PureComponent { this.onInstantPurchaseEnabledChange(true); }} /> - {instantPurchaseEnabled && + {instantPurchaseEnabled && ( this.onInstantPurchaseMaxChange(val)} defaultValue={instantPurchaseMax} - />} + /> + )}
    When this option is chosen, LBRY won't ask you to confirm @@ -320,13 +322,12 @@ class SettingsPage extends React.PureComponent { defaultValue={theme} className="form-field__input--inline" > - {themes.map((theme, index) => + {themes.map((theme, index) => ( - )} + ))} -
    diff --git a/ui/js/page/show/index.js b/src/renderer/js/page/show/index.js similarity index 100% rename from ui/js/page/show/index.js rename to src/renderer/js/page/show/index.js diff --git a/ui/js/page/show/view.jsx b/src/renderer/js/page/show/view.jsx similarity index 79% rename from ui/js/page/show/view.jsx rename to src/renderer/js/page/show/view.jsx index 8b1e05789..d0584847f 100644 --- a/ui/js/page/show/view.jsx +++ b/src/renderer/js/page/show/view.jsx @@ -28,18 +28,22 @@ class ShowPage extends React.PureComponent { innerContent = (
    -

    {uri}

    +
    +

    {uri}

    +
    - {isResolvingUri && + {isResolvingUri && ( } + /> + )} {claim === null && - !isResolvingUri && - - {__("There's nothing at this location.")} - } + !isResolvingUri && ( + + {__("There's nothing at this location.")} + + )}
    ); diff --git a/ui/js/page/transactionHistory/index.js b/src/renderer/js/page/transactionHistory/index.js similarity index 100% rename from ui/js/page/transactionHistory/index.js rename to src/renderer/js/page/transactionHistory/index.js diff --git a/ui/js/page/transactionHistory/view.jsx b/src/renderer/js/page/transactionHistory/view.jsx similarity index 72% rename from ui/js/page/transactionHistory/view.jsx rename to src/renderer/js/page/transactionHistory/view.jsx index 2f3a75715..ec4db0ed9 100644 --- a/ui/js/page/transactionHistory/view.jsx +++ b/src/renderer/js/page/transactionHistory/view.jsx @@ -24,12 +24,16 @@ class TransactionHistoryPage extends React.PureComponent {

    {__("Transaction History")}

    - {fetchingTransactions && !transactions.length - ? - : ""} - {transactions && transactions.length - ? - : ""} + {fetchingTransactions && !transactions.length ? ( + + ) : ( + "" + )} + {transactions && transactions.length ? ( + + ) : ( + "" + )}
    diff --git a/ui/js/page/wallet/index.js b/src/renderer/js/page/wallet/index.js similarity index 100% rename from ui/js/page/wallet/index.js rename to src/renderer/js/page/wallet/index.js diff --git a/ui/js/page/wallet/view.jsx b/src/renderer/js/page/wallet/view.jsx similarity index 100% rename from ui/js/page/wallet/view.jsx rename to src/renderer/js/page/wallet/view.jsx diff --git a/ui/js/redux/actions/app.js b/src/renderer/js/redux/actions/app.js similarity index 90% rename from ui/js/redux/actions/app.js rename to src/renderer/js/redux/actions/app.js index 91f5f795e..485108245 100644 --- a/ui/js/redux/actions/app.js +++ b/src/renderer/js/redux/actions/app.js @@ -20,7 +20,7 @@ const { remote, ipcRenderer, shell } = require("electron"); const path = require("path"); const { download } = remote.require("electron-dl"); const fs = remote.require("fs"); -const { lbrySettings: config } = require("../../../../app/package.json"); +const { lbrySettings: config } = require("../../../../main/package.json"); const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000; export function doOpenModal(modal, modalProps = {}) { @@ -68,33 +68,31 @@ export function doDownloadUpgrade() { const state = getState(); // Make a new directory within temp directory so the filename is guaranteed to be available const dir = fs.mkdtempSync( - remote.app.getPath("temp") + require("path").sep - ), + remote.app.getPath("temp") + require("path").sep + ), upgradeFilename = selectUpgradeFilename(state); let options = { onProgress: p => dispatch(doUpdateDownloadProgress(Math.round(p * 100))), directory: dir, }; - download( - remote.getCurrentWindow(), - selectUpdateUrl(state), - options - ).then(downloadItem => { - /** + download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then( + downloadItem => { + /** * TODO: get the download path directly from the download object. It should just be * downloadItem.getSavePath(), but the copy on the main process is being garbage collected * too soon. */ - dispatch({ - type: types.UPGRADE_DOWNLOAD_COMPLETED, - data: { - downloadItem, - path: path.join(dir, upgradeFilename), - }, - }); - }); + dispatch({ + type: types.UPGRADE_DOWNLOAD_COMPLETED, + data: { + downloadItem, + path: path.join(dir, upgradeFilename), + }, + }); + } + ); dispatch({ type: types.UPGRADE_DOWNLOAD_STARTED, @@ -192,9 +190,10 @@ export function doCheckDaemonVersion() { return function(dispatch, getState) { lbry.version().then(({ lbrynet_version }) => { dispatch({ - type: config.lbrynetDaemonVersion == lbrynet_version - ? types.DAEMON_VERSION_MATCH - : types.DAEMON_VERSION_MISMATCH, + type: + config.lbrynetDaemonVersion == lbrynet_version + ? types.DAEMON_VERSION_MATCH + : types.DAEMON_VERSION_MISMATCH, }); }); }; diff --git a/ui/js/redux/actions/availability.js b/src/renderer/js/redux/actions/availability.js similarity index 100% rename from ui/js/redux/actions/availability.js rename to src/renderer/js/redux/actions/availability.js diff --git a/ui/js/redux/actions/content.js b/src/renderer/js/redux/actions/content.js similarity index 100% rename from ui/js/redux/actions/content.js rename to src/renderer/js/redux/actions/content.js diff --git a/ui/js/redux/actions/cost_info.js b/src/renderer/js/redux/actions/cost_info.js similarity index 100% rename from ui/js/redux/actions/cost_info.js rename to src/renderer/js/redux/actions/cost_info.js diff --git a/ui/js/redux/actions/file_info.js b/src/renderer/js/redux/actions/file_info.js similarity index 100% rename from ui/js/redux/actions/file_info.js rename to src/renderer/js/redux/actions/file_info.js diff --git a/ui/js/redux/actions/navigation.js b/src/renderer/js/redux/actions/navigation.js similarity index 100% rename from ui/js/redux/actions/navigation.js rename to src/renderer/js/redux/actions/navigation.js diff --git a/ui/js/redux/actions/rewards.js b/src/renderer/js/redux/actions/rewards.js similarity index 100% rename from ui/js/redux/actions/rewards.js rename to src/renderer/js/redux/actions/rewards.js diff --git a/ui/js/redux/actions/search.js b/src/renderer/js/redux/actions/search.js similarity index 100% rename from ui/js/redux/actions/search.js rename to src/renderer/js/redux/actions/search.js diff --git a/ui/js/redux/actions/settings.js b/src/renderer/js/redux/actions/settings.js similarity index 100% rename from ui/js/redux/actions/settings.js rename to src/renderer/js/redux/actions/settings.js diff --git a/ui/js/redux/actions/user.js b/src/renderer/js/redux/actions/user.js similarity index 100% rename from ui/js/redux/actions/user.js rename to src/renderer/js/redux/actions/user.js diff --git a/ui/js/redux/actions/wallet.js b/src/renderer/js/redux/actions/wallet.js similarity index 100% rename from ui/js/redux/actions/wallet.js rename to src/renderer/js/redux/actions/wallet.js diff --git a/ui/js/redux/reducers/app.js b/src/renderer/js/redux/reducers/app.js similarity index 100% rename from ui/js/redux/reducers/app.js rename to src/renderer/js/redux/reducers/app.js diff --git a/ui/js/redux/reducers/availability.js b/src/renderer/js/redux/reducers/availability.js similarity index 100% rename from ui/js/redux/reducers/availability.js rename to src/renderer/js/redux/reducers/availability.js diff --git a/ui/js/redux/reducers/claims.js b/src/renderer/js/redux/reducers/claims.js similarity index 100% rename from ui/js/redux/reducers/claims.js rename to src/renderer/js/redux/reducers/claims.js diff --git a/ui/js/redux/reducers/content.js b/src/renderer/js/redux/reducers/content.js similarity index 100% rename from ui/js/redux/reducers/content.js rename to src/renderer/js/redux/reducers/content.js diff --git a/ui/js/redux/reducers/cost_info.js b/src/renderer/js/redux/reducers/cost_info.js similarity index 100% rename from ui/js/redux/reducers/cost_info.js rename to src/renderer/js/redux/reducers/cost_info.js diff --git a/ui/js/redux/reducers/file_info.js b/src/renderer/js/redux/reducers/file_info.js similarity index 100% rename from ui/js/redux/reducers/file_info.js rename to src/renderer/js/redux/reducers/file_info.js diff --git a/ui/js/redux/reducers/navigation.js b/src/renderer/js/redux/reducers/navigation.js similarity index 100% rename from ui/js/redux/reducers/navigation.js rename to src/renderer/js/redux/reducers/navigation.js diff --git a/ui/js/redux/reducers/rewards.js b/src/renderer/js/redux/reducers/rewards.js similarity index 100% rename from ui/js/redux/reducers/rewards.js rename to src/renderer/js/redux/reducers/rewards.js diff --git a/ui/js/redux/reducers/search.js b/src/renderer/js/redux/reducers/search.js similarity index 100% rename from ui/js/redux/reducers/search.js rename to src/renderer/js/redux/reducers/search.js diff --git a/ui/js/redux/reducers/settings.js b/src/renderer/js/redux/reducers/settings.js similarity index 100% rename from ui/js/redux/reducers/settings.js rename to src/renderer/js/redux/reducers/settings.js diff --git a/ui/js/redux/reducers/user.js b/src/renderer/js/redux/reducers/user.js similarity index 100% rename from ui/js/redux/reducers/user.js rename to src/renderer/js/redux/reducers/user.js diff --git a/ui/js/redux/reducers/wallet.js b/src/renderer/js/redux/reducers/wallet.js similarity index 100% rename from ui/js/redux/reducers/wallet.js rename to src/renderer/js/redux/reducers/wallet.js diff --git a/ui/js/redux/selectors/app.js b/src/renderer/js/redux/selectors/app.js similarity index 100% rename from ui/js/redux/selectors/app.js rename to src/renderer/js/redux/selectors/app.js diff --git a/ui/js/redux/selectors/availability.js b/src/renderer/js/redux/selectors/availability.js similarity index 100% rename from ui/js/redux/selectors/availability.js rename to src/renderer/js/redux/selectors/availability.js diff --git a/ui/js/redux/selectors/claims.js b/src/renderer/js/redux/selectors/claims.js similarity index 100% rename from ui/js/redux/selectors/claims.js rename to src/renderer/js/redux/selectors/claims.js diff --git a/ui/js/redux/selectors/content.js b/src/renderer/js/redux/selectors/content.js similarity index 100% rename from ui/js/redux/selectors/content.js rename to src/renderer/js/redux/selectors/content.js diff --git a/ui/js/redux/selectors/cost_info.js b/src/renderer/js/redux/selectors/cost_info.js similarity index 100% rename from ui/js/redux/selectors/cost_info.js rename to src/renderer/js/redux/selectors/cost_info.js diff --git a/ui/js/redux/selectors/file_info.js b/src/renderer/js/redux/selectors/file_info.js similarity index 100% rename from ui/js/redux/selectors/file_info.js rename to src/renderer/js/redux/selectors/file_info.js diff --git a/ui/js/redux/selectors/navigation.js b/src/renderer/js/redux/selectors/navigation.js similarity index 100% rename from ui/js/redux/selectors/navigation.js rename to src/renderer/js/redux/selectors/navigation.js diff --git a/ui/js/redux/selectors/rewards.js b/src/renderer/js/redux/selectors/rewards.js similarity index 100% rename from ui/js/redux/selectors/rewards.js rename to src/renderer/js/redux/selectors/rewards.js diff --git a/ui/js/redux/selectors/search.js b/src/renderer/js/redux/selectors/search.js similarity index 100% rename from ui/js/redux/selectors/search.js rename to src/renderer/js/redux/selectors/search.js diff --git a/ui/js/redux/selectors/settings.js b/src/renderer/js/redux/selectors/settings.js similarity index 100% rename from ui/js/redux/selectors/settings.js rename to src/renderer/js/redux/selectors/settings.js diff --git a/ui/js/redux/selectors/user.js b/src/renderer/js/redux/selectors/user.js similarity index 100% rename from ui/js/redux/selectors/user.js rename to src/renderer/js/redux/selectors/user.js diff --git a/ui/js/redux/selectors/wallet.js b/src/renderer/js/redux/selectors/wallet.js similarity index 100% rename from ui/js/redux/selectors/wallet.js rename to src/renderer/js/redux/selectors/wallet.js diff --git a/ui/js/rewards.js b/src/renderer/js/rewards.js similarity index 100% rename from ui/js/rewards.js rename to src/renderer/js/rewards.js diff --git a/ui/js/store.js b/src/renderer/js/store.js similarity index 100% rename from ui/js/store.js rename to src/renderer/js/store.js diff --git a/ui/js/util/batchActions.js b/src/renderer/js/util/batchActions.js similarity index 100% rename from ui/js/util/batchActions.js rename to src/renderer/js/util/batchActions.js diff --git a/ui/js/util/formatCredits.js b/src/renderer/js/util/formatCredits.js similarity index 100% rename from ui/js/util/formatCredits.js rename to src/renderer/js/util/formatCredits.js diff --git a/ui/js/util/query_params.js b/src/renderer/js/util/query_params.js similarity index 77% rename from ui/js/util/query_params.js rename to src/renderer/js/util/query_params.js index 55b9616da..51987755b 100644 --- a/ui/js/util/query_params.js +++ b/src/renderer/js/util/query_params.js @@ -1,8 +1,12 @@ export function parseQueryParams(queryString) { if (queryString === "") return {}; - const parts = queryString.split("?").pop().split("&").map(function(p) { - return p.split("="); - }); + const parts = queryString + .split("?") + .pop() + .split("&") + .map(function(p) { + return p.split("="); + }); const params = {}; parts.forEach(function(arr) { diff --git a/ui/js/util/redux-utils.js b/src/renderer/js/util/redux-utils.js similarity index 100% rename from ui/js/util/redux-utils.js rename to src/renderer/js/util/redux-utils.js diff --git a/ui/js/util/setBadge.js b/src/renderer/js/util/setBadge.js similarity index 100% rename from ui/js/util/setBadge.js rename to src/renderer/js/util/setBadge.js diff --git a/ui/js/util/setProgressBar.js b/src/renderer/js/util/setProgressBar.js similarity index 100% rename from ui/js/util/setProgressBar.js rename to src/renderer/js/util/setProgressBar.js diff --git a/ui/js/util/throttle.js b/src/renderer/js/util/throttle.js similarity index 100% rename from ui/js/util/throttle.js rename to src/renderer/js/util/throttle.js diff --git a/ui/package.json b/src/renderer/package.json similarity index 97% rename from ui/package.json rename to src/renderer/package.json index bd0fbdbf4..d581cf972 100644 --- a/ui/package.json +++ b/src/renderer/package.json @@ -77,8 +77,8 @@ "webpack-target-electron-renderer": "^0.4.0" }, "lint-staged": { - "gitDir": "../", - "ui/js/**/*.{jsx,js}": [ + "gitDir": "../..", + "src/renderer/js/**/*.{jsx,js}": [ "prettier --trailing-comma es5 --write", "git add" ] diff --git a/ui/scss/_gui.scss b/src/renderer/scss/_gui.scss similarity index 100% rename from ui/scss/_gui.scss rename to src/renderer/scss/_gui.scss diff --git a/ui/scss/_icons.scss b/src/renderer/scss/_icons.scss similarity index 100% rename from ui/scss/_icons.scss rename to src/renderer/scss/_icons.scss diff --git a/ui/scss/_reset.scss b/src/renderer/scss/_reset.scss similarity index 100% rename from ui/scss/_reset.scss rename to src/renderer/scss/_reset.scss diff --git a/ui/scss/_vars.scss b/src/renderer/scss/_vars.scss similarity index 100% rename from ui/scss/_vars.scss rename to src/renderer/scss/_vars.scss diff --git a/ui/scss/all.scss b/src/renderer/scss/all.scss similarity index 100% rename from ui/scss/all.scss rename to src/renderer/scss/all.scss diff --git a/ui/scss/component/__divider.scss b/src/renderer/scss/component/__divider.scss similarity index 100% rename from ui/scss/component/__divider.scss rename to src/renderer/scss/component/__divider.scss diff --git a/ui/scss/component/_button.scss b/src/renderer/scss/component/_button.scss similarity index 100% rename from ui/scss/component/_button.scss rename to src/renderer/scss/component/_button.scss diff --git a/ui/scss/component/_card.scss b/src/renderer/scss/component/_card.scss similarity index 100% rename from ui/scss/component/_card.scss rename to src/renderer/scss/component/_card.scss diff --git a/ui/scss/component/_channel-indicator.scss b/src/renderer/scss/component/_channel-indicator.scss similarity index 100% rename from ui/scss/component/_channel-indicator.scss rename to src/renderer/scss/component/_channel-indicator.scss diff --git a/ui/scss/component/_checkbox.scss b/src/renderer/scss/component/_checkbox.scss similarity index 100% rename from ui/scss/component/_checkbox.scss rename to src/renderer/scss/component/_checkbox.scss diff --git a/ui/scss/component/_file-download.scss b/src/renderer/scss/component/_file-download.scss similarity index 100% rename from ui/scss/component/_file-download.scss rename to src/renderer/scss/component/_file-download.scss diff --git a/ui/scss/component/_file-selector.scss b/src/renderer/scss/component/_file-selector.scss similarity index 100% rename from ui/scss/component/_file-selector.scss rename to src/renderer/scss/component/_file-selector.scss diff --git a/ui/scss/component/_file-tile.scss b/src/renderer/scss/component/_file-tile.scss similarity index 100% rename from ui/scss/component/_file-tile.scss rename to src/renderer/scss/component/_file-tile.scss diff --git a/ui/scss/component/_form-field.scss b/src/renderer/scss/component/_form-field.scss similarity index 100% rename from ui/scss/component/_form-field.scss rename to src/renderer/scss/component/_form-field.scss diff --git a/ui/scss/component/_header.scss b/src/renderer/scss/component/_header.scss similarity index 100% rename from ui/scss/component/_header.scss rename to src/renderer/scss/component/_header.scss diff --git a/ui/scss/component/_load-screen.scss b/src/renderer/scss/component/_load-screen.scss similarity index 100% rename from ui/scss/component/_load-screen.scss rename to src/renderer/scss/component/_load-screen.scss diff --git a/ui/scss/component/_markdown-editor.scss b/src/renderer/scss/component/_markdown-editor.scss similarity index 100% rename from ui/scss/component/_markdown-editor.scss rename to src/renderer/scss/component/_markdown-editor.scss diff --git a/ui/scss/component/_menu.scss b/src/renderer/scss/component/_menu.scss similarity index 100% rename from ui/scss/component/_menu.scss rename to src/renderer/scss/component/_menu.scss diff --git a/ui/scss/component/_modal.scss b/src/renderer/scss/component/_modal.scss similarity index 100% rename from ui/scss/component/_modal.scss rename to src/renderer/scss/component/_modal.scss diff --git a/ui/scss/component/_notice.scss b/src/renderer/scss/component/_notice.scss similarity index 100% rename from ui/scss/component/_notice.scss rename to src/renderer/scss/component/_notice.scss diff --git a/ui/scss/component/_pagination.scss b/src/renderer/scss/component/_pagination.scss similarity index 100% rename from ui/scss/component/_pagination.scss rename to src/renderer/scss/component/_pagination.scss diff --git a/ui/scss/component/_radio.scss b/src/renderer/scss/component/_radio.scss similarity index 100% rename from ui/scss/component/_radio.scss rename to src/renderer/scss/component/_radio.scss diff --git a/ui/scss/component/_scrollbar.scss b/src/renderer/scss/component/_scrollbar.scss similarity index 100% rename from ui/scss/component/_scrollbar.scss rename to src/renderer/scss/component/_scrollbar.scss diff --git a/ui/scss/component/_snack-bar.scss b/src/renderer/scss/component/_snack-bar.scss similarity index 100% rename from ui/scss/component/_snack-bar.scss rename to src/renderer/scss/component/_snack-bar.scss diff --git a/ui/scss/component/_table.scss b/src/renderer/scss/component/_table.scss similarity index 100% rename from ui/scss/component/_table.scss rename to src/renderer/scss/component/_table.scss diff --git a/ui/scss/component/_tabs.scss b/src/renderer/scss/component/_tabs.scss similarity index 100% rename from ui/scss/component/_tabs.scss rename to src/renderer/scss/component/_tabs.scss diff --git a/ui/scss/component/_tooltip.scss b/src/renderer/scss/component/_tooltip.scss similarity index 100% rename from ui/scss/component/_tooltip.scss rename to src/renderer/scss/component/_tooltip.scss diff --git a/ui/scss/component/_video.scss b/src/renderer/scss/component/_video.scss similarity index 100% rename from ui/scss/component/_video.scss rename to src/renderer/scss/component/_video.scss diff --git a/ui/scss/mixin/link.scss b/src/renderer/scss/mixin/link.scss similarity index 100% rename from ui/scss/mixin/link.scss rename to src/renderer/scss/mixin/link.scss diff --git a/ui/scss/page/_show.scss b/src/renderer/scss/page/_show.scss similarity index 100% rename from ui/scss/page/_show.scss rename to src/renderer/scss/page/_show.scss diff --git a/ui/watch.bat b/src/renderer/watch.bat similarity index 88% rename from ui/watch.bat rename to src/renderer/watch.bat index 000bbc6df..af8c2c2ed 100644 --- a/ui/watch.bat +++ b/src/renderer/watch.bat @@ -7,5 +7,5 @@ for %%F in ( ) do if exist %%F (set found=1) if not defined found EXIT -node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\..\app\dist\css --sourcemap=none %~dp0\scss +node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\..\main\dist\css --sourcemap=none %~dp0\scss %~dp0\node_modules\.bin\webpack --config %~dp0\webpack.dev.js --progress --colors --watch \ No newline at end of file diff --git a/ui/watch.sh b/src/renderer/watch.sh similarity index 74% rename from ui/watch.sh rename to src/renderer/watch.sh index e7092699d..e54efaff4 100755 --- a/ui/watch.sh +++ b/src/renderer/watch.sh @@ -18,8 +18,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" fi # run sass once without --watch to force update. then run with --watch to keep watching - node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none $DIR/scss/ - node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none --watch $DIR/scss/ & + node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none $DIR/scss/ + node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none --watch $DIR/scss/ & node_modules/.bin/webpack --config webpack.dev.js --progress --colors --watch ) \ No newline at end of file diff --git a/ui/webpack.common.js b/src/renderer/webpack.common.js similarity index 96% rename from ui/webpack.common.js rename to src/renderer/webpack.common.js index d2d7e0719..3e843a89e 100644 --- a/ui/webpack.common.js +++ b/src/renderer/webpack.common.js @@ -5,7 +5,7 @@ const appPath = path.resolve(__dirname, "js"); process.traceDeprecation = true; const PATHS = { - app: path.join(__dirname, "app"), + app: path.join(__dirname, "src/main"), dist: path.join(__dirname, "dist") }; diff --git a/ui/webpack.dev.js b/src/renderer/webpack.dev.js similarity index 91% rename from ui/webpack.dev.js rename to src/renderer/webpack.dev.js index e5d72b83b..877b10d51 100644 --- a/ui/webpack.dev.js +++ b/src/renderer/webpack.dev.js @@ -6,7 +6,7 @@ const common = require('./webpack.common.js'); const PATHS = { - dist: path.join(__dirname, "..", "app", "dist") + dist: path.join(__dirname, "..", "main", "dist") }; module.exports = merge(common, { diff --git a/ui/webpack.prod.js b/src/renderer/webpack.prod.js similarity index 100% rename from ui/webpack.prod.js rename to src/renderer/webpack.prod.js diff --git a/ui/yarn.lock b/src/renderer/yarn.lock similarity index 100% rename from ui/yarn.lock rename to src/renderer/yarn.lock