mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Auth QR Code: Fix loading default lang pack
This commit is contained in:
parent
521b7e6505
commit
b43eab4ccb
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user