mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-22 00:45:12 +01:00
Update content of files
This commit is contained in:
parent
a849ee5851
commit
ecace47c4b
4 changed files with 9 additions and 6 deletions
|
@ -1174,7 +1174,7 @@
|
||||||
}
|
}
|
||||||
receiveWebViewEvent('biometricManagerUpdated');
|
receiveWebViewEvent('biometricManagerUpdated');
|
||||||
}
|
}
|
||||||
function onBiometryAuthRequested() {
|
function onBiometryAuthRequested(eventType, eventData) {
|
||||||
var isAuthenticated = (eventData.status == 'authorized'),
|
var isAuthenticated = (eventData.status == 'authorized'),
|
||||||
biometricToken = eventData.token || '';
|
biometricToken = eventData.token || '';
|
||||||
if (authRequestState) {
|
if (authRequestState) {
|
||||||
|
@ -1191,7 +1191,7 @@
|
||||||
isAuthenticated: false
|
isAuthenticated: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function onBiometryTokenUpdated() {
|
function onBiometryTokenUpdated(eventType, eventData) {
|
||||||
var applied = false;
|
var applied = false;
|
||||||
if (isBiometricAvailable &&
|
if (isBiometricAvailable &&
|
||||||
isAccessRequested) {
|
isAccessRequested) {
|
||||||
|
@ -1285,7 +1285,7 @@
|
||||||
WebView.postEvent('web_app_biometry_request_auth', false);
|
WebView.postEvent('web_app_biometry_request_auth', false);
|
||||||
return biometricManager;
|
return biometricManager;
|
||||||
};
|
};
|
||||||
biometricManager.saveBiometricToken = function(token, callback) {
|
biometricManager.updateBiometricToken = function(token, callback) {
|
||||||
if (!checkVersion()) {
|
if (!checkVersion()) {
|
||||||
return biometricManager;
|
return biometricManager;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<meta name="MobileOptimized" content="176" />
|
<meta name="MobileOptimized" content="176" />
|
||||||
<meta name="HandheldFriendly" content="True" />
|
<meta name="HandheldFriendly" content="True" />
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<script src="https://tg.dev/js/telegram-web-app.js?42"></script>
|
<script src="https://tg.dev/js/telegram-web-app.js?43"></script>
|
||||||
<script>
|
<script>
|
||||||
function setThemeClass() {
|
function setThemeClass() {
|
||||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<meta name="MobileOptimized" content="176" />
|
<meta name="MobileOptimized" content="176" />
|
||||||
<meta name="HandheldFriendly" content="True" />
|
<meta name="HandheldFriendly" content="True" />
|
||||||
<meta name="robots" content="noindex,nofollow" />
|
<meta name="robots" content="noindex,nofollow" />
|
||||||
<script src="https://tg.dev/js/telegram-web-app.js?42"></script>
|
<script src="https://tg.dev/js/telegram-web-app.js?43"></script>
|
||||||
<script>
|
<script>
|
||||||
function setThemeClass() {
|
function setThemeClass() {
|
||||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
<div class="viewport-stable_border"></div>
|
<div class="viewport-stable_border"></div>
|
||||||
<script src="/js/jquery.min.js"></script>
|
<script src="/js/jquery.min.js"></script>
|
||||||
<script src="https://tg.dev/js/bootstrap.min.js"></script>
|
<script src="https://tg.dev/js/bootstrap.min.js"></script>
|
||||||
<script src="/js/webappdemo.js?23"></script>
|
<script src="/js/webappdemo.js?24"></script>
|
||||||
<script>DemoApp.apiUrl = "/demo/api";
|
<script>DemoApp.apiUrl = "/demo/api";
|
||||||
|
|
||||||
Telegram.WebApp.onEvent('themeChanged', function() {
|
Telegram.WebApp.onEvent('themeChanged', function() {
|
||||||
|
|
|
@ -321,6 +321,7 @@ var DemoApp = {
|
||||||
if (!biometricManager.isInited) {
|
if (!biometricManager.isInited) {
|
||||||
return DemoApp.showAlert('Biometric not inited yet!');
|
return DemoApp.showAlert('Biometric not inited yet!');
|
||||||
}
|
}
|
||||||
|
$(el).next('span').text('').attr('class', '');
|
||||||
biometricManager.authenticate(function(success, token) {
|
biometricManager.authenticate(function(success, token) {
|
||||||
if (success) {
|
if (success) {
|
||||||
$(el).next('span').text('(Success, token: ' + token + ')').attr('class', 'ok');
|
$(el).next('span').text('(Success, token: ' + token + ')').attr('class', 'ok');
|
||||||
|
@ -337,6 +338,7 @@ var DemoApp = {
|
||||||
var token = parseInt(Math.random().toString().substr(2)).toString(16);
|
var token = parseInt(Math.random().toString().substr(2)).toString(16);
|
||||||
biometricManager.updateBiometricToken(token, function(updated) {
|
biometricManager.updateBiometricToken(token, function(updated) {
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
$('#bm_token_saved').text(biometricManager.isBiometricTokenSaved ? 'true' : 'false');
|
||||||
$(el).next('span').text('(Updated)').attr('class', 'ok');
|
$(el).next('span').text('(Updated)').attr('class', 'ok');
|
||||||
} else {
|
} else {
|
||||||
$(el).next('span').text('(Failed)').attr('class', 'err');
|
$(el).next('span').text('(Failed)').attr('class', 'err');
|
||||||
|
@ -350,6 +352,7 @@ var DemoApp = {
|
||||||
}
|
}
|
||||||
biometricManager.updateBiometricToken('', function(updated) {
|
biometricManager.updateBiometricToken('', function(updated) {
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
$('#bm_token_saved').text(biometricManager.isBiometricTokenSaved ? 'true' : 'false');
|
||||||
$(el).next('span').text('(Removed)').attr('class', 'ok');
|
$(el).next('span').text('(Removed)').attr('class', 'ok');
|
||||||
} else {
|
} else {
|
||||||
$(el).next('span').text('(Failed)').attr('class', 'err');
|
$(el).next('span').text('(Failed)').attr('class', 'err');
|
||||||
|
|
Loading…
Add table
Reference in a new issue