Fix double monkey on SRP after entering auth code
Fix big thumbs in password input
This commit is contained in:
parent
26117fa8e8
commit
c835cee624
@ -160,15 +160,12 @@ let onFirstMount = (): Promise<any> => {
|
|||||||
codeInput.innerText = response._;
|
codeInput.innerText = response._;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(async(err) => {
|
||||||
codeInput.removeAttribute('disabled');
|
|
||||||
|
|
||||||
switch(err.type) {
|
switch(err.type) {
|
||||||
case 'SESSION_PASSWORD_NEEDED':
|
case 'SESSION_PASSWORD_NEEDED':
|
||||||
//console.warn('pageAuthCode: SESSION_PASSWORD_NEEDED');
|
//console.warn('pageAuthCode: SESSION_PASSWORD_NEEDED');
|
||||||
err.handled = true;
|
err.handled = true;
|
||||||
cleanup();
|
await pagePassword.mount();
|
||||||
pagePassword.mount();
|
|
||||||
break;
|
break;
|
||||||
case 'PHONE_CODE_EMPTY':
|
case 'PHONE_CODE_EMPTY':
|
||||||
case 'PHONE_CODE_INVALID':
|
case 'PHONE_CODE_INVALID':
|
||||||
@ -179,6 +176,8 @@ let onFirstMount = (): Promise<any> => {
|
|||||||
codeInputLabel.innerText = err.type;
|
codeInputLabel.innerText = err.type;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
codeInput.removeAttribute('disabled');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
//import apiManager from '../lib/mtproto/apiManager';
|
//import apiManager from '../lib/mtproto/apiManager';
|
||||||
import { putPreloader } from '../components/misc';
|
import { putPreloader } from '../components/misc';
|
||||||
import mediaSizes from '../helpers/mediaSizes';
|
import mediaSizes from '../helpers/mediaSizes';
|
||||||
|
import { isAppleMobile, isSafari } from '../helpers/userAgent';
|
||||||
import { AccountPassword } from '../layer';
|
import { AccountPassword } from '../layer';
|
||||||
import LottieLoader, { RLottiePlayer } from '../lib/lottieLoader';
|
import LottieLoader, { RLottiePlayer } from '../lib/lottieLoader';
|
||||||
//import passwordManager from '../lib/mtproto/passwordManager';
|
//import passwordManager from '../lib/mtproto/passwordManager';
|
||||||
@ -11,7 +12,7 @@ import { cancelEvent } from '../lib/utils';
|
|||||||
import Page from './page';
|
import Page from './page';
|
||||||
import pageIm from './pageIm';
|
import pageIm from './pageIm';
|
||||||
|
|
||||||
|
const TEST = false;
|
||||||
let passwordInput: HTMLInputElement;
|
let passwordInput: HTMLInputElement;
|
||||||
|
|
||||||
let onFirstMount = (): Promise<any> => {
|
let onFirstMount = (): Promise<any> => {
|
||||||
@ -26,7 +27,7 @@ let onFirstMount = (): Promise<any> => {
|
|||||||
const toggleVisible = page.pageEl.querySelector('.toggle-visible') as HTMLSpanElement;
|
const toggleVisible = page.pageEl.querySelector('.toggle-visible') as HTMLSpanElement;
|
||||||
|
|
||||||
let getState = () => {
|
let getState = () => {
|
||||||
return passwordManager.getState().then(_state => {
|
return !TEST && passwordManager.getState().then(_state => {
|
||||||
state = _state;
|
state = _state;
|
||||||
|
|
||||||
passwordInputLabel.innerText = state.hint ?? 'Password';
|
passwordInputLabel.innerText = state.hint ?? 'Password';
|
||||||
@ -145,7 +146,9 @@ let onFirstMount = (): Promise<any> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const page = new Page('page-password', true, onFirstMount, null, () => {
|
const page = new Page('page-password', true, onFirstMount, null, () => {
|
||||||
|
//if(!isAppleMobile) {
|
||||||
passwordInput.focus();
|
passwordInput.focus();
|
||||||
|
//}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default page;
|
export default page;
|
||||||
|
@ -90,9 +90,7 @@ let onFirstMount = () => import('../lib/appManagers/appProfileManager').then(imp
|
|||||||
id: response.user.id
|
id: response.user.id
|
||||||
});
|
});
|
||||||
|
|
||||||
sendAvatar().then(() => {
|
sendAvatar().finally(() => {
|
||||||
pageIm.mount();
|
|
||||||
}, () => {
|
|
||||||
pageIm.mount();
|
pageIm.mount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6,10 +6,15 @@
|
|||||||
font-size: 2.25rem;
|
font-size: 2.25rem;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
||||||
html.is-ios & {
|
@media (-webkit-min-device-pixel-ratio: 2) {
|
||||||
font-size: .75rem;
|
font-size: 1.75rem;
|
||||||
letter-spacing: .125rem;
|
letter-spacing: .125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html.is-ios & {
|
||||||
|
// ! меньше 1rem будет зумить поле
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user