From 2edfff5592575844d9fdf4d9867cb8a8b185d0f9 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 10 May 2024 11:40:38 +0200 Subject: [PATCH] change(ui): added hideTools to hide player tools bug-report, notes, share, nav --- frontend/app/components/Session_/Subheader.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js index a6187b4e5..a1139e315 100644 --- a/frontend/app/components/Session_/Subheader.js +++ b/frontend/app/components/Session_/Subheader.js @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { Icon, Tooltip, Button } from 'UI'; import QueueControls from './QueueControls'; import Bookmark from 'Shared/Bookmark'; @@ -25,6 +25,7 @@ function SubHeader(props) { const { player, store } = React.useContext(PlayerContext); const { width, height, endTime, location: currentLocation = 'loading...', } = store.get(); const hasIframe = localStorage.getItem(IFRAME) === "true"; + const [hideTools, setHideTools] = useState(false); const enabledIntegration = useMemo(() => { const { integrations } = props; @@ -42,6 +43,11 @@ function SubHeader(props) { ? `${currentLocation.slice(0, 25)}...${currentLocation.slice(-40)}` : currentLocation; + useEffect(() => { + const isHideTools = new URLSearchParams(window.location.search).get('hideTools'); + setHideTools(isHideTools === 'true'); + }, []); + const showReportModal = () => { const { tabStates, currentTab } = store.get(); const resourceList = tabStates[currentTab]?.resourceList || []; @@ -105,6 +111,7 @@ function SubHeader(props) { ) : null} + {!hideTools && (
+ )} {location && (