diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 5acb57b3e..14c2dd2c0 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -95,6 +95,14 @@ } } }, + "tabLayout": { + "statusBar": { + "prerun": { + "message": "This scenario has not been run yet.", + "tooltip": "This scenario has not been run yet." + } + } + }, "cytoviz": { "elementDetails": "Details", "loading": "Loading...", diff --git a/src/components/AppBar/AppBar.js b/src/components/AppBar/AppBar.js index b6f5ce463..9ced7e930 100644 --- a/src/components/AppBar/AppBar.js +++ b/src/components/AppBar/AppBar.js @@ -1,33 +1,47 @@ // Copyright (c) Cosmo Tech. // Licensed under the MIT license. +import { Bot, Languages } from 'lucide-react'; import React from 'react'; import PropTypes from 'prop-types'; -import { AppBar as MuiAppBar, Toolbar } from '@mui/material'; -import { HelpMenuWrapper, Logo, ThemeSwitch, UserInfoWrapper, WorkspaceInfo } from './components'; +import { Button, AppBar as MuiAppBar, Toolbar } from '@mui/material'; +import { StatusBar } from '../'; +import { useCurrentSimulationRunner } from '../../state/runner/hooks'; +import { ThemeSwitch } from './components'; export const AppBar = ({ children }) => { + const currentScenario = useCurrentSimulationRunner(); + return ( theme.palette.appbar.main, - color: (theme) => theme.palette.appbar.contrastText, + backgroundColor: (theme) => theme.palette.background.background01.main, + color: (theme) => theme.palette.neutral.neutral02.main, + boxShadow: 'none', + borderBottom: (theme) => `1px solid ${theme.palette.background.background02.main}`, }} > - - -
{children}
+ +
{children}
+ {currentScenario?.data?.name && ( + + )} + - - - +
); }; AppBar.propTypes = { - /** - * React component to be implemented in dynamic part of the app bar - */ children: PropTypes.node, }; diff --git a/src/components/AppBar/components/ThemeSwitch.js b/src/components/AppBar/components/ThemeSwitch.js index 6034d799a..d6f4607f3 100644 --- a/src/components/AppBar/components/ThemeSwitch.js +++ b/src/components/AppBar/components/ThemeSwitch.js @@ -1,30 +1,33 @@ // Copyright (c) Cosmo Tech. // Licensed under the MIT license. +import { Moon, Sun } from 'lucide-react'; import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Brightness2 as Brightness2Icon, WbSunny as WbSunnyIcon } from '@mui/icons-material'; -import { Fade, IconButton, Tooltip } from '@mui/material'; +import { Button, Fade, Tooltip } from '@mui/material'; import { useApplicationTheme } from '../../../state/app/hooks'; export const ThemeSwitch = () => { const { t } = useTranslation(); const { isDarkTheme, toggleTheme } = useApplicationTheme(); - const { tooltipText, icon } = useMemo( + const { tooltipText } = useMemo( () => ({ tooltipText: isDarkTheme ? t('genericcomponent.switchtheme.light', 'Switch to light') : t('genericcomponent.switchtheme.dark', 'Switch to dark'), - icon: isDarkTheme ? : , }), [t, isDarkTheme] ); return ( - theme.palette.appbar.contrastText }} onClick={toggleTheme} size="large"> - {icon} - +