From 6296bdc2d8a014b3b1a3ad2774c6e8668041c882 Mon Sep 17 00:00:00 2001 From: Davide Passoni Date: Tue, 16 Apr 2024 17:28:52 +0200 Subject: [PATCH] Small tweak to setupApp callback --- frontend/react/src/olympusapp.ts | 8 +++++--- frontend/react/src/ui/ui.tsx | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/react/src/olympusapp.ts b/frontend/react/src/olympusapp.ts index fd9b3a1f..8f6f545e 100644 --- a/frontend/react/src/olympusapp.ts +++ b/frontend/react/src/olympusapp.ts @@ -2,8 +2,10 @@ var app: OlympusApp; export function setupApp() { - app = new OlympusApp(); - app.start(); + if (app === undefined) { + app = new OlympusApp(); + app.start(); + } } export function getApp() { @@ -477,7 +479,7 @@ export class OlympusApp { } /* Temporary */ - this.getServerManager().setCredentials("admin", "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"); + this.getServerManager().setCredentials("admin", "4b8823ed9e5c2392ab4a791913bb8ce41956ea32e308b760eefb97536746dd33"); this.getServerManager().startUpdate(); /* Reload the page, used to mimic a restart of the app */ diff --git a/frontend/react/src/ui/ui.tsx b/frontend/react/src/ui/ui.tsx index f920a21c..23e42d3c 100644 --- a/frontend/react/src/ui/ui.tsx +++ b/frontend/react/src/ui/ui.tsx @@ -49,7 +49,7 @@ export function UI() { } return ( -
+
{ hideAllMenus(); setDrawingMenuVisible(!drawingMenuVisible) }, } }> -
+