From a736cbffeb5e52c227916c11f180d4d84af6df16 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 22 Oct 2019 16:42:13 -0400 Subject: [PATCH] cleanup style --- package.json | 4 ++-- src/platforms/web/api-setup.js | 2 +- src/ui/component/app/view.jsx | 2 +- .../webUploadList/internal/web-upload-item.jsx | 10 +++++----- src/ui/component/webUploadList/view.jsx | 7 ++++++- src/ui/index.jsx | 10 +++++----- src/ui/redux/actions/app.js | 4 +--- src/ui/scss/component/_claim-list.scss | 2 +- yarn.lock | 8 ++++---- 9 files changed, 26 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 0d8bc963a..3f0a3ed95 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ "husky": "^0.14.3", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#7316ee4646803aefbd4b74a7858ba4b2a102e60d", - "lbryinc": "lbryio/lbryinc#fb2e73ab31c2b9f80a53f082843a01e3f213ca45", + "lbry-redux": "lbryio/lbry-redux#4aa1f6f379061becf4485380416ec00faed3be6c", + "lbryinc": "lbryio/lbryinc#061c782ff44b359b04aeaecf8b86431fabb069e0", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.14", diff --git a/src/platforms/web/api-setup.js b/src/platforms/web/api-setup.js index 530a4351f..b2f00302c 100644 --- a/src/platforms/web/api-setup.js +++ b/src/platforms/web/api-setup.js @@ -2,7 +2,7 @@ import { Lbry } from 'lbry-redux'; import apiPublishCallViaWeb from './publish'; import { X_LBRY_AUTH_TOKEN } from 'constants/token'; -export const SDK_API_URL = process.env.SDK_API_URL || 'https://api.lbry.tv/api/v1/proxy'; +export const SDK_API_URL = `${process.env.SDK_API_URL}/api/v1/proxy` || 'https://api.lbry.tv/api/v1/proxy'; Lbry.setDaemonConnectionString(SDK_API_URL); Lbry.setOverride( diff --git a/src/ui/component/app/view.jsx b/src/ui/component/app/view.jsx index 965112736..6d1a2b613 100644 --- a/src/ui/component/app/view.jsx +++ b/src/ui/component/app/view.jsx @@ -207,7 +207,7 @@ function App(props: Props) { }, [syncError, pathname]); if (!user) { - return null; + // return null; } return ( diff --git a/src/ui/component/webUploadList/internal/web-upload-item.jsx b/src/ui/component/webUploadList/internal/web-upload-item.jsx index 9fa799e2e..7c9dd7fc9 100644 --- a/src/ui/component/webUploadList/internal/web-upload-item.jsx +++ b/src/ui/component/webUploadList/internal/web-upload-item.jsx @@ -12,7 +12,7 @@ export default function WebUploadItem(props: Props) { const { params, progress, xhr } = props; return ( -
  • +
  • @@ -20,17 +20,17 @@ export default function WebUploadItem(props: Props) { {xhr && (
    )}
    -

    {params.name}

    -
    +

    lbry://{params.name}

    +
    Uploading...
    diff --git a/src/ui/component/webUploadList/view.jsx b/src/ui/component/webUploadList/view.jsx index 6022bd6f3..0dd2c3135 100644 --- a/src/ui/component/webUploadList/view.jsx +++ b/src/ui/component/webUploadList/view.jsx @@ -22,9 +22,14 @@ export default function WebUploadList(props: Props) {
    {__('You are currently uploading one or more files for publish.')}} + subtitle={ + uploadCount > 1 + ? __('You files are currently uploading. This will update automatically.') + : __('Your file is currently uploading. This will update automatically.') + } body={
    + {/* $FlowFixMe */} {Object.values(currentUploads).map(({ progress, params, xhr }) => ( ))} diff --git a/src/ui/index.jsx b/src/ui/index.jsx index e6d6000ec..3d7217044 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -36,13 +36,13 @@ import { getAuthToken, setAuthToken } from 'util/saved-passwords'; // and loaded dynamically in the component that consumes it import 'scss/all.scss'; -const startTime = Date.now(); -analytics.startupEvent(); - // @if TARGET='web' import 'src/platforms/web/api-setup'; // @endif +const startTime = Date.now(); +analytics.startupEvent(); + const APPPAGEURL = 'lbry://?'; // @if TARGET='app' const { autoUpdater } = remote.require('electron-updater'); @@ -64,7 +64,7 @@ if (process.env.SEARCH_API_URL) { let authToken; Lbryio.setOverride( 'setAuthToken', - status => + () => new Promise(resolve => { Lbryio.call( 'user', @@ -72,7 +72,7 @@ Lbryio.setOverride( { auth_token: '', language: 'en', - app_id: status.installation_id, + // app_id: status.installation_id, }, 'post' ).then(response => { diff --git a/src/ui/redux/actions/app.js b/src/ui/redux/actions/app.js index 4a2ae4173..ecf73e34e 100644 --- a/src/ui/redux/actions/app.js +++ b/src/ui/redux/actions/app.js @@ -8,7 +8,6 @@ import * as ACTIONS from 'constants/action_types'; import * as MODALS from 'constants/modal_types'; import * as PAGES from 'constants/pages'; import { X_LBRY_AUTH_TOKEN } from 'constants/token'; -import * as SETTINGS from 'constants/settings'; import { Lbry, doBalanceSubscribe, @@ -18,7 +17,6 @@ import { makeSelectClaimIsMine, doPopulateSharedUserState, doFetchChannelListMine, - HEADERS, doClearPublish, doPreferenceGet, doToast, @@ -439,7 +437,7 @@ export function doAnalyticsView(uri, timeToStart) { export function doSignIn() { return (dispatch, getState) => { // @if TARGET='web' - const { auth_token: authToken } = cookie.parse(document.cookie); + const authToken = getAuthToken(); Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken); dispatch(doBalanceSubscribe()); diff --git a/src/ui/scss/component/_claim-list.scss b/src/ui/scss/component/_claim-list.scss index e2ee90c99..359ddea14 100644 --- a/src/ui/scss/component/_claim-list.scss +++ b/src/ui/scss/component/_claim-list.scss @@ -224,7 +224,7 @@ $border-color--dark: var(--dm-color-04); .claim-upload__progress--inner { background: $lbry-teal-1; - color: $lbry-gray-1; + padding: var(--spacing-miniscule); [data-mode='dark'] & { background: $lbry-teal-4; diff --git a/yarn.lock b/yarn.lock index 450d81293..f6eebdbca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6848,17 +6848,17 @@ lazy-val@^1.0.3, lazy-val@^1.0.4: yargs "^13.2.2" zstd-codec "^0.1.1" -lbry-redux@lbryio/lbry-redux#7316ee4646803aefbd4b74a7858ba4b2a102e60d: +lbry-redux@lbryio/lbry-redux#4aa1f6f379061becf4485380416ec00faed3be6c: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/7316ee4646803aefbd4b74a7858ba4b2a102e60d" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/4aa1f6f379061becf4485380416ec00faed3be6c" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0" uuid "^3.3.2" -lbryinc@lbryio/lbryinc#fb2e73ab31c2b9f80a53f082843a01e3f213ca45: +lbryinc@lbryio/lbryinc#061c782ff44b359b04aeaecf8b86431fabb069e0: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/fb2e73ab31c2b9f80a53f082843a01e3f213ca45" + resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/061c782ff44b359b04aeaecf8b86431fabb069e0" dependencies: reselect "^3.0.0"