From 62149c500b624cb5019505a9fa63b8869ecbbcde Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 4 Mar 2024 17:44:10 +0100 Subject: [PATCH] test gestione reload auto --- MP.Mon/Pages/_Layout.cshtml | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/MP.Mon/Pages/_Layout.cshtml b/MP.Mon/Pages/_Layout.cshtml index 720010ea..0c0e730f 100644 --- a/MP.Mon/Pages/_Layout.cshtml +++ b/MP.Mon/Pages/_Layout.cshtml @@ -65,27 +65,28 @@ maxRetries: 600, retryIntervalMilliseconds: 1000 }, - // reconnectionHandler: { - // onConnectionDown: (options, error) => { - // console.error(error); - // // setTimeout(function () { - // // document.location.reload(); - // // }, 10000); - // }, - // onConnectionUp: () => { + reconnectionHandler: { + // onConnectionDown: (options, error) => { + // console.error(error); + // // setTimeout(function () { + // // document.location.reload(); + // // }, 10000); + // }, + onConnectionUp: () => { + console.log("Client reconnected!"); + document.location.reload(); + } + } + // }).then(() => { + // Blazor.defaultReconnectionHandler._reconnectCallback = function (d) { // console.log("Client reconnected!"); + // // document.location.reload(); // } - // } - // }).then(() => { - // Blazor.defaultReconnectionHandler._reconnectCallback = function (d) { - // console.log("Client reconnected!"); - // // document.location.reload(); - // } - // // Blazor.defaultReconnectionHandler._reconnectionDisplay = { - // // show: () => value.show(), - // // update: (d) => value.update(d), - // // rejected: (d) => document.location.reload() - // // }; + // // Blazor.defaultReconnectionHandler._reconnectionDisplay = { + // // show: () => value.show(), + // // update: (d) => value.update(d), + // // rejected: (d) => document.location.reload() + // // }; });