Auth QR Code: Fix loading default lang pack

This commit is contained in:
Alexander Zinchuk 2021-12-14 22:40:57 +04:00
parent 521b7e6505
commit b43eab4ccb
3 changed files with 11 additions and 6 deletions

View File

@ -2,16 +2,14 @@
width: 100%;
max-width: 25.5rem;
margin: 0 auto;
padding: 1rem;
padding-top: 6rem;
padding: 6rem 1rem 1rem;
text-align: center;
@media (min-width: 600px) and (min-height: 450px) {
padding: 1.5rem;
padding-top: 6.8rem;
padding: 6.8rem 1.5rem 1.5rem;
&.qr {
padding-top: 5rem;
padding-top: 4rem;
}
}

View File

@ -7,6 +7,7 @@ import { withGlobal } from '../../lib/teact/teactn';
import { GlobalState, GlobalActions } from '../../global/types';
import { LangCode } from '../../types';
import { DEFAULT_LANG_CODE } from '../../config';
import { pick } from '../../util/iteratees';
import { setLanguage } from '../../util/langProvider';
import renderText from '../common/helpers/renderText';
@ -61,6 +62,12 @@ const AuthCode: FC<StateProps & DispatchProps> = ({
}, container);
}, [connectionState, authQrCode]);
useEffect(() => {
if (connectionState === 'connectionStateReady') {
void setLanguage(DEFAULT_LANG_CODE);
}
}, [connectionState]);
const handleLangChange = useCallback(() => {
markIsLoading();

View File

@ -1771,7 +1771,7 @@ export default {
},
'Login.QR.Help2': {
key: 'Login.QR.Help2',
value: 'Go to **Settings** > **Devices** > **Scan QR**',
value: 'Go to **Settings** > **Devices** > **Link Desktop Device**',
},
'Login.QR.Help3': {
key: 'Login.QR.Help3',