telegram-crawler/data/themes.telegram.org/auth.html
2021-08-05 21:52:34 +00:00

163 lines
6.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Telegram Themes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" />
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="alternate icon" href="/favicon.ico?4" type="image/x-icon" />
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet">
<link href="/css/themes.css?7" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
</head>
<body class="emoji_image no-transition">
<div id="aj_progress" class="progress-bar"></div>
<div id="aj_content"><a class="th-dl-button" href="//telegram.org/dl">
Don&#39;t have <b>Telegram</b> yet? <span class="th-dl-button-try">Try it now</span>
</a>
<section class="th-main">
<div class="th-main-content">
<div class="th-main-icon"></div>
<h1>Telegram Theme Editor</h1>
<p>The online theme editor allows you to create and modify your existing cloud themes for every platform. Any changes will appear in the apps immediately after you save them.</p>
<a href="/auth" class="th-login-editor-btn need-auth">Log in to Theme Editor</a>
</div>
</section><div class="popup-container login-popup-container hide" id="login-popup-container">
<div class="popup">
<div class="popup-body">
<section>
<h2>Log In</h2>
<p>Log in here to modify your cloud themes on the fly. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
<form id="send-form" class="login-form">
<div class="form-group">
<input type="tel" class="form-control th-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
</div>
</form>
<div id="login-form" class="hide">
<div class="form-group">
<span class="form-control th-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
<p class="help-block dots-animated">We&#39;ve just sent you a message.<br/>Please confirm access via Telegram</p>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
</div>
</div>
</section>
</div>
</div>
</div></div>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/main-aj.js?52"></script>
<script src="/js/themes.js?6"></script>
<script src="/js/jquery-ui.min.js?1"></script>
<script>ajInit({"version":284,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
<script id="aj_script">openPopup('#login-popup-container');
Aj.onLoad(function(state) {
function requestConfirmation(event) {
event && event.preventDefault();
var phone = $('#phone-number').val();
$.ajax({
type: 'POST',
url: '/auth/request',
data: {
phone: phone
},
success: function(result) {
$('#phone-number-field').text(phone);
$('#send-form').addClass('hide');
$('#login-form').removeClass('hide');
checkAuth(result.temp_session);
},
error: function(xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event && event.preventDefault();
$('#phone-number-field').text('');
$('#send-form').removeClass('hide');
$('#login-form').addClass('hide');
$('#phone-number').focus();
clearTimeout(window.authTimeout);
return false;
}
function checkAuth(temp_session) {
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(function doCheckAuth() {
$.ajax({
type: 'POST',
url: '/auth/login',
data: {
temp_session: temp_session
},
success: function(result) {
if (result) {
location.reload();
} else {
checkAuth(temp_session);
}
},
error: function (xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
}, 700);
}
$('#login-popup-container').on('popup:open', function() {
$('#phone-number').focus();
});
$('#login-popup-container').on('popup:close', function() {
cancelConfirmation();
if (location.pathname == '/auth') {
window.history && history.replaceState(null, null, '/');
}
});
$('#login-popup-container #send-form').on('submit', requestConfirmation);
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
e.preventDefault();
closePopup('#login-popup-container');
});
$('#login-popup-container .login-back').on('click', cancelConfirmation);
$('.login-link').on('click', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
openPopup('#login-popup-container');
});
});
Aj.onUnload(function(state) {
$('#login-popup-container').off('popup:open');
$('#login-popup-container').off('popup:close');
$('#login-popup-container #send-form').off('submit');
$('#login-popup-container .login-cancel-btn').off('click');
$('#login-popup-container .login-back').off('click');
$('.login-link').off('click');
});
</script>
<script>Aj.pageLoaded();</script>
</body>
</html>