import React from 'react'; import { styled } from '@mui/material/styles'; import { Trans } from '@lingui/macro'; import makeStyles from '@mui/styles/makeStyles'; import BugReportIcon from '@mui/icons-material/BugReport'; import Divider from '@mui/material/Divider'; import Fab from '@mui/material/Fab'; import Grid from '@mui/material/Grid'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import LayersIcon from '@mui/icons-material/Layers'; import Link from '@mui/material/Link'; import ListItemIcon from '@mui/material/ListItemIcon'; import Logout from '@mui/icons-material/Logout'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import MenuOpenIcon from '@mui/icons-material/MenuOpen'; import Modal from '@mui/material/Modal'; import RocketLaunchIcon from '@mui/icons-material/RocketLaunch'; import Settings from '@mui/icons-material/Settings'; import Stack from '@mui/material/Stack'; import TranslateIcon from '@mui/icons-material/Translate'; import Typography from '@mui/material/Typography'; import VideocamIcon from '@mui/icons-material/Videocam'; import WebIcon from '@mui/icons-material/Web'; import * as Storage from './utils/storage'; import * as Version from './version'; import welcomeImage from './assets/images/welcome.png'; import LanguageSelect from './misc/LanguageSelect'; import Logo from './misc/Logo/rsLogo'; import ModalContent from './misc/ModalContent'; import PaperThumb from './misc/PaperThumb'; const useStyles = makeStyles((theme) => ({ header: { width: '100%', height: 132, lineHeight: '132px', backgroundColor: 'transparent', color: theme.palette.text.secondary, '& .headerRight': { float: 'right', marginRight: 42, }, '& .headerFab': { height: 60, width: 60, marginLeft: '1em', boxShadow: 'unset', '& .fabIcon': { fontSize: 30, }, '&:hover': { backgroundColor: theme.palette.background.box_default, }, }, '& .headerFabHighlight': { height: 60, width: 60, marginLeft: '1em', boxShadow: 'unset', border: `3px solid ${theme.palette.secondary.main}`, '& .fabIcon': { fontSize: 30, }, '&:hover': { backgroundColor: theme.palette.background.box_default, }, }, '& .headerLeft': { fontSize: '3.5rem', fontWeight: 300, marginLeft: 40, }, '& .headerTitle': { fontFamily: '"Dosis", "Roboto", "Helvetica", "Arial", sans-serif', fontSize: '3rem', fontWeight: 300, marginLeft: 10, marginBottom: '0.2em', }, '@media (max-width: 599px)': { '& .headerRight': { marginRight: 20, }, '& .headerLeft': { marginLeft: 20, }, '& .headerTitle': { fontSize: '2.4rem', }, }, '@media (max-width: 415px)': { '& .headerRight': { marginRight: 20, }, '& .headerLeft': { marginLeft: 20, }, '& .headerTitle': { display: 'none', }, }, }, modalPaper: { padding: '1em 1.5em 1.3em 1.5em', width: '95%', maxWidth: 350, maxHeight: '95%', overflow: 'scroll', backgroundColor: theme.palette.background.modal, color: theme.palette.text.primary, }, aboutImage: { paddingLeft: '1em', }, colorHighlight: { color: `${theme.palette.secondary.main}!important`, }, })); const StyledMenu = styled((props) => ( ))(({ theme }) => ({ '& .MuiPaper-root': { borderRadius: 5, marginTop: theme.spacing(1), minWidth: 180, boxShadow: 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px', '& .MuiMenu-list': { padding: '4px 0', backgroundColor: theme.palette.background.paper, }, '& .MuiMenuItem-root': { '& .MuiSvgIcon-root': { fontSize: 18, color: theme.palette.common.white, marginRight: theme.spacing(1.5), }, '&:active': { backgroundColor: theme.palette.background.box_default, }, '&:hover': { backgroundColor: theme.palette.background.box_default, }, }, }, })); function AboutModal(props) { const classes = useStyles(); return ( This is the frontend and a part of a free open source livestreaming solution for video data. The second part is the{' '} datarhei Core {' '} which can be operated separately. Release: {Version.UI} Repo:{' '} github.com/datarhei/restreamer Licence:{' '} Apache License 2.0 Donation:{' '} patreon.com/datarhei Website:{' '} datarhei.com ); } AboutModal.defaultProps = { open: false, onClose: () => {}, }; function HeaderMenu(props) { const classes = useStyles(); const [$anchorEl, setAnchorEl] = React.useState(null); const [$about, setAbout] = React.useState(false); const handleMenuOpen = (event) => { setAnchorEl(event.currentTarget); }; const handleMenuClose = () => { setAnchorEl(null); }; const handleLanguageChange = (language) => { Storage.Set('language', language); }; if (props.expand === true) { return ( {props.hasService === true && ( Service )} {props.showPlayersite === true && ( Playersite )} {props.showSettings === true && ( System )} setAbout(true)}> About Docs Issue alert Logout setAbout(false)} /> ); } else { return ( setAbout(true)}> About Docs Issue alert setAbout(false)} /> ); } } HeaderMenu.defaultProps = { onChannel: () => {}, onPlayersite: () => {}, onSettings: () => {}, onLogout: () => {}, expand: false, showPlayersite: false, showSettings: false, hasUpdates: false, hasService: false, }; export default function Header(props) { const classes = useStyles(); return ( Restreamer ); } Header.defaultProps = { expand: false, };