PWA offline try to check if offline
This commit is contained in:
parent
16eab3f5d7
commit
b14b5443aa
@ -1,6 +1,10 @@
|
||||
////////////////////////////////////////////////////
|
||||
// [ Form Login ]
|
||||
(function ($) {
|
||||
if (!window.navigator.onLine){
|
||||
console.log("offline");
|
||||
$(".info_message").show();
|
||||
}
|
||||
"use strict";
|
||||
var input = $('.validate-input .input-forms');
|
||||
$('.validate').on('submit',(function(){
|
||||
@ -14,7 +18,6 @@
|
||||
}
|
||||
|
||||
if (check){
|
||||
if (window.navigator.onLine){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'controller/Auth.php',
|
||||
@ -30,9 +33,7 @@
|
||||
}, 1000);
|
||||
}
|
||||
}});
|
||||
} else {
|
||||
$(".info_message").show();
|
||||
}
|
||||
|
||||
}
|
||||
check = false;
|
||||
return check;
|
||||
|
||||
@ -18,6 +18,7 @@ self.addEventListener('install', (e) => {
|
||||
'index.php',
|
||||
'http://ctsstatic.fr/assets/css/index.css',
|
||||
'http://ctsstatic.fr/assets/js/index.js',
|
||||
'http://ctsstatic.fr/assets/images/logo_petit.png',
|
||||
'http://ctsstatic.fr/assets/vendors/jquery/jquery-3.6.0.min.js'
|
||||
];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user