From fa065c85a31453970f720007e00252cf8fe3bd45 Mon Sep 17 00:00:00 2001 From: hq1 Date: Tue, 25 Jun 2024 14:41:09 +0200 Subject: [PATCH] Make new tab dashboard links work (#4276) * Make new tab dashboard links work * Urlencode domain * Recognize shared links --- assets/js/dashboard.js | 3 ++- assets/js/dashboard/router.js | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js index a172b05264d4..693e17986649 100644 --- a/assets/js/dashboard.js +++ b/assets/js/dashboard.js @@ -31,7 +31,8 @@ if (container) { background: container.dataset.background, isDbip: container.dataset.isDbip === 'true', flags: JSON.parse(container.dataset.flags), - validIntervalsByPeriod: JSON.parse(container.dataset.validIntervalsByPeriod) + validIntervalsByPeriod: JSON.parse(container.dataset.validIntervalsByPeriod), + shared: !!container.dataset.sharedLinkAuth, } const loggedIn = container.dataset.loggedIn === 'true' diff --git a/assets/js/dashboard/router.js b/assets/js/dashboard/router.js index 4605c9fd15c6..0d6318131b3d 100644 --- a/assets/js/dashboard/router.js +++ b/assets/js/dashboard/router.js @@ -27,9 +27,10 @@ function ScrollToTop() { } export default function Router({ site, loggedIn, currentUserRole }) { + console.info('xxx', site); return ( - - + + @@ -52,7 +53,7 @@ export default function Router({ site, loggedIn, currentUserRole }) { - + @@ -71,7 +72,7 @@ export default function Router({ site, loggedIn, currentUserRole }) { - + ); }