From f1b8af8ac494d3b3e0dae1c48c25fd017df95508 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 24 Aug 2022 13:06:40 -0700 Subject: [PATCH] Fixed mobile site logout when using with &key=xxx (#4420) --- views/default-mobile.handlebars | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index a43da118..c711f7fd 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -1186,7 +1186,7 @@ @@ -1227,6 +1227,8 @@ var domainUrl = '{{{domainurl}}}'; var authCookie = '{{{authCookie}}}'; var authRelayCookie = '{{{authRelayCookie}}}'; + var logoutControls = JSON.parse(decodeURIComponent('{{{logoutControls}}}')); + console.log(logoutControls); var authCookieRenewTimer = null; var webRelayPort = parseInt('{{{webRelayPort}}}'); var webRelayDns = '{{{webRelayDns}}}'; @@ -1300,6 +1302,9 @@ // Setup stared devices try { stars = JSON.parse(getstore('stars', '{}')); } catch (ex) { } + // Setup logout control + if (logoutControls && logoutControls.logoutUrl) { Q('logoutMenuOptionRef').href = logoutControls.logoutUrl; } + // Load desktop settings var t = localStorage.getItem('desktopsettings'); if (t != null) { desktopsettings = JSON.parse(t); }