|
@@ -272,13 +272,11 @@
|
|
|
window.location.reload(); // see https://github.com/zauberzeug/nicegui/issues/198
|
|
|
}
|
|
|
},
|
|
|
- try_reconnect: () => {
|
|
|
- const checkAndReload = async () => {
|
|
|
- await fetch(window.location.href, { headers: { 'NiceGUI-Check': 'try_reconnect' } });
|
|
|
- console.log('reloading because reconnect was requested')
|
|
|
- window.location.reload();
|
|
|
- };
|
|
|
- setInterval(checkAndReload, 500);
|
|
|
+ try_reconnect: async () => {
|
|
|
+ document.getElementById('popup').style.opacity = 1;
|
|
|
+ await fetch(window.location.href, { headers: { 'NiceGUI-Check': 'try_reconnect' } });
|
|
|
+ console.log('reloading because reconnect was requested')
|
|
|
+ window.location.reload();
|
|
|
},
|
|
|
disconnect: () => {
|
|
|
document.getElementById('popup').style.opacity = 1;
|