diff --git a/package.json b/package.json index e0dec5bf9..6c31cab6a 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#7d2e8ba1707100393975897a70a28a63b288bc47", + "lbry-redux": "lbryio/lbry-redux#341d60661468b654b9baf5b96ca4a08ee202f0f2", "lbryinc": "lbryio/lbryinc#1e897d2c9108848637e1915700d3ae8ce176f9f8", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/static/app-strings.json b/static/app-strings.json index a8d2995b3..0da4b0511 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -935,5 +935,9 @@ "%numberOfMonthsSincePublish% months ago": "%numberOfMonthsSincePublish% months ago", "%numberOfDaysSincePublish% months ago": "%numberOfDaysSincePublish% months ago", "%numberOfDaysSincePublish% days ago": "%numberOfDaysSincePublish% days ago", - "The wallet server took a bit too long. Resetting defaults just in case. Shutdown (Cmd/Ctrl+Q) LBRY and restart if this continues.": "The wallet server took a bit too long. Resetting defaults just in case. Shutdown (Cmd/Ctrl+Q) LBRY and restart if this continues." + "The wallet server took a bit too long. Resetting defaults just in case. Shutdown (Cmd/Ctrl+Q) LBRY and restart if this continues.": "The wallet server took a bit too long. Resetting defaults just in case. Shutdown (Cmd/Ctrl+Q) LBRY and restart if this continues.", + "Provide a description and link to your license": "Provide a description and link to your license", + "Walletserver preference": "Walletserver preference", + "Wallet servers": "Wallet servers", + "lbry.tv": "lbry.tv" } diff --git a/ui/component/settingWalletServer/index.js b/ui/component/settingWalletServer/index.js index 79d9e4b19..bc21225fd 100644 --- a/ui/component/settingWalletServer/index.js +++ b/ui/component/settingWalletServer/index.js @@ -1,20 +1,21 @@ import { connect } from 'react-redux'; import { DAEMON_SETTINGS } from 'lbry-redux'; -import { doSetDaemonSetting, doClearDaemonSetting, doGetDaemonStatus, doCacheCustomWalletServers, doFetchDaemonSettings } from 'redux/actions/settings'; -import { selectDaemonSettings, selectCachedWalletServers, makeSelectSharedPrefsForKey } from 'redux/selectors/settings'; +import { doSetDaemonSetting, doClearDaemonSetting, doGetDaemonStatus, doSaveCustomWalletServers, doFetchDaemonSettings } from 'redux/actions/settings'; +import { selectDaemonSettings, selectSavedWalletServers, selectDaemonStatus, selectHasWalletServerPrefs } from 'redux/selectors/settings'; import SettingWalletServer from './view'; const select = state => ({ daemonSettings: selectDaemonSettings(state), - customServers: selectCachedWalletServers(state), - serverPrefs: makeSelectSharedPrefsForKey(DAEMON_SETTINGS.LBRYUM_SERVERS)(state), + daemonStatus: selectDaemonStatus(state), + customWalletServers: selectSavedWalletServers(state), + hasWalletServerPrefs: selectHasWalletServerPrefs(state), }); const perform = dispatch => ({ - setWalletServers: (value) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.LBRYUM_SERVERS, value)), + setCustomWalletServers: (value) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.LBRYUM_SERVERS, value)), clearWalletServers: () => dispatch(doClearDaemonSetting(DAEMON_SETTINGS.LBRYUM_SERVERS)), getDaemonStatus: () => dispatch(doGetDaemonStatus()), - saveServers: (servers) => dispatch(doCacheCustomWalletServers(servers)), + saveServerConfig: (servers) => dispatch(doSaveCustomWalletServers(servers)), fetchDaemonSettings: () => dispatch(doFetchDaemonSettings()), }); diff --git a/ui/component/settingWalletServer/internal/displayRow.jsx b/ui/component/settingWalletServer/internal/displayRow.jsx deleted file mode 100644 index da17294d8..000000000 --- a/ui/component/settingWalletServer/internal/displayRow.jsx +++ /dev/null @@ -1,35 +0,0 @@ -// @flow -import * as ICONS from 'constants/icons'; -import React from 'react'; -import Button from 'component/button'; -import Icon from 'component/common/icon'; - -type Props = { - host: string, - port: string, - available: boolean, - index: number, - remove: number => void, -}; - -function ServerDisplayRow(props: Props) { - const { host, port, available, index, remove } = props; - return ( -
{t.host} | +{t.port} | +{t.available && |
+
+ |
+