diff --git a/public/libs/jsroot b/public/libs/jsroot deleted file mode 160000 index 0e24188b7..000000000 --- a/public/libs/jsroot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0e24188b715dd9542f0c0f2f78e4c043ffb28f6f diff --git a/src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx b/src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx index 4dbc2d526..d5ffeb5d0 100644 --- a/src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx +++ b/src/ThreeEditor/components/Editor/EditorAppBar/components/EditorTitlebar.tsx @@ -9,7 +9,6 @@ import { } from '@mui/material'; import { bindContextMenu, bindMenu, usePopupState } from 'material-ui-popup-state/hooks'; import { useCallback, useEffect, useRef, useState } from 'react'; -import { useDocumentTitle } from 'usehooks-ts'; import { useDialog } from '../../../../../services/DialogService'; import { useStore } from '../../../../../services/StoreService'; @@ -21,7 +20,6 @@ export function EditorTitleBar() { const [editMode, setEditMode] = useState(false); const [title, setTitle] = useState(yaptideEditor?.config.getKey('project/title')); const titleRef = useRef(title); - useDocumentTitle(titleRef.current); const startSave = useCallback(() => { setSaving(true); diff --git a/src/WrapperApp/WrapperApp.tsx b/src/WrapperApp/WrapperApp.tsx index 7d332ff5f..bad432b0e 100644 --- a/src/WrapperApp/WrapperApp.tsx +++ b/src/WrapperApp/WrapperApp.tsx @@ -15,6 +15,7 @@ import LoginPanel from './components/Panels/LoginPanel'; import { TabPanel } from './components/Panels/TabPanel'; import ResultsPanel from './components/Results/ResultsPanel'; import SimulationPanel from './components/Simulation/SimulationPanel'; +import {camelCaseToNormalText} from '../util/camelCaseToSentenceCase' function WrapperApp() { const { demoMode } = useConfig(); @@ -51,6 +52,13 @@ function WrapperApp() { if (isAuthorized && tabsValue === 'login') setTabsValue('editor'); }, [isAuthorized, tabsValue]); + useEffect(() => { + //The document.title is used by web browser to display a name on the browser tab. + //There we would like to see the name extracted from a tabsValue, which can sugest user in which tab of our application is at the moment. + //We want to make the text which be a title as a normal text, not cammel case text, to make it similar to values of tabs user can see on navbar. + document.title = camelCaseToNormalText(tabsValue); //e.g. we've got 'inputFiles' as a value of tabsValue and this function converts this value to 'Input Files' + }, [tabsValue]); + return (