allow changing language for unauth users

This commit is contained in:
Sean Yesmunt 2020-11-10 15:26:00 -05:00
parent 3da7ec5c2c
commit 73e1db7bb4
2 changed files with 7 additions and 5 deletions

View file

@ -195,6 +195,11 @@ class SettingsPage extends React.PureComponent<Props, State> {
}} }}
className="card-stack" className="card-stack"
> >
<Card title={__('Language')} actions={<SettingLanguage />} />
{homepages && Object.keys(homepages).length > 1 && (
<Card title={__('Homepage')} actions={<HomepageSelector />} />
)}
{!isAuthenticated && IS_WEB && ( {!isAuthenticated && IS_WEB && (
<div className="main--empty"> <div className="main--empty">
<Yrbl <Yrbl
@ -216,10 +221,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
</section> </section>
) : ( ) : (
<div className={classnames({ 'card--disabled': IS_WEB && !isAuthenticated })}> <div className={classnames({ 'card--disabled': IS_WEB && !isAuthenticated })}>
<Card title={__('Language')} actions={<SettingLanguage />} />
{homepages && Object.keys(homepages).length > 1 && (
<Card title={__('Homepage')} actions={<HomepageSelector />} />
)}
{isAuthenticated && <SettingAccountPassword />} {isAuthenticated && <SettingAccountPassword />}
{/* @if TARGET='app' */} {/* @if TARGET='app' */}
<Card <Card

View file

@ -143,7 +143,7 @@ export function doSetClientSetting(key, value, pushPrefs) {
const state = getState(); const state = getState();
const ready = selectPrefsReady(state); const ready = selectPrefsReady(state);
if (!ready) { if (!ready && pushPrefs) {
return dispatch(doAlertWaitingForSync()); return dispatch(doAlertWaitingForSync());
} }
@ -154,6 +154,7 @@ export function doSetClientSetting(key, value, pushPrefs) {
value, value,
}, },
}); });
if (pushPrefs) { if (pushPrefs) {
dispatch(doPushSettingsToPrefs()); dispatch(doPushSettingsToPrefs());
} }