From 85e660423e086d872678aa20ae3dd40427b8b8c1 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sat, 11 Feb 2023 19:59:27 -0500 Subject: [PATCH] Add emergency message if backend is unavailable --- src/index.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 4b0d5cb..f174483 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -210,6 +210,24 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => { reloadGUI("periodic" + (new Date()).getTime().toString()); }, 1000); + if (!usdplReady || !get_value(LIMITS_INFO)) { + // Not translated on purpose (to avoid USDPL issues) + return ( + + USDPL or PowerTools's backend did not start correctly! + { + console.log("POWERTOOLS: manual reload after startup failure"); + reload(); + }} + > + Reload + + + ) + } + return (