mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
Patch for "7839bbf2: Fix language-change not applied to all components immediately"
- Missed the "Account Password" card that is used for authenticated case. - For cards that are only used in Settings, listen to the language change in "select" instead of passing in as a prop. I think this is cleaner.
This commit is contained in:
parent
f50eb2b5ab
commit
1a3669ca76
4 changed files with 7 additions and 2 deletions
|
@ -1,13 +1,16 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectUser, selectPasswordSetSuccess, selectPasswordSetError } from 'redux/selectors/user';
|
import { selectUser, selectPasswordSetSuccess, selectPasswordSetError } from 'redux/selectors/user';
|
||||||
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import { doUserPasswordSet, doClearPasswordEntry } from 'redux/actions/user';
|
import { doUserPasswordSet, doClearPasswordEntry } from 'redux/actions/user';
|
||||||
import { doToast } from 'redux/actions/notifications';
|
import { doToast } from 'redux/actions/notifications';
|
||||||
import UserSignIn from './view';
|
import UserSignIn from './view';
|
||||||
|
import * as SETTINGS from 'constants/settings';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
passwordSetSuccess: selectPasswordSetSuccess(state),
|
passwordSetSuccess: selectPasswordSetSuccess(state),
|
||||||
passwordSetError: selectPasswordSetError(state),
|
passwordSetError: selectPasswordSetError(state),
|
||||||
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, {
|
export default connect(select, {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import SettingAutoLaunch from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
autoLaunch: makeSelectClientSetting(SETTINGS.AUTO_LAUNCH)(state),
|
autoLaunch: makeSelectClientSetting(SETTINGS.AUTO_LAUNCH)(state),
|
||||||
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -10,6 +10,7 @@ const select = state => ({
|
||||||
syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state),
|
syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state),
|
||||||
verifiedEmail: selectUserVerifiedEmail(state),
|
verifiedEmail: selectUserVerifiedEmail(state),
|
||||||
getSyncError: selectGetSyncErrorMessage(state),
|
getSyncError: selectGetSyncErrorMessage(state),
|
||||||
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -279,7 +279,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
? __("To enable this feature, check 'Save Password' the next time you start the app.")
|
? __("To enable this feature, check 'Save Password' the next time you start the app.")
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
actions={<SyncToggle language={language} disabled={walletEncrypted && !storedPassword} />}
|
actions={<SyncToggle disabled={walletEncrypted && !storedPassword} />}
|
||||||
/>
|
/>
|
||||||
<Card
|
<Card
|
||||||
title={__('Download Directory')}
|
title={__('Download Directory')}
|
||||||
|
@ -792,7 +792,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
|
|
||||||
{/* @if TARGET='app' */}
|
{/* @if TARGET='app' */}
|
||||||
{/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */}
|
{/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */}
|
||||||
{!IS_MAC && <Card title={__('Startup Preferences')} actions={<SettingAutoLaunch language={language} />} />}
|
{!IS_MAC && <Card title={__('Startup Preferences')} actions={<SettingAutoLaunch />} />}
|
||||||
{/* @endif */}
|
{/* @endif */}
|
||||||
|
|
||||||
<Card
|
<Card
|
||||||
|
|
Loading…
Add table
Reference in a new issue