| | |
| | | import RouteFab from "./header/RouteFab"; |
| | | import AreaFab from "./header/AreaFab"; |
| | | import MoreOperate from "./header/MoreOperate"; |
| | | import NewsLogDialog from "./NewsLogDialog"; |
| | | |
| | | let player; |
| | | let websocket; |
| | |
| | | const storedValue = localStorage.getItem('curZone'); |
| | | return storedValue !== null ? JSON.parse(storedValue) : null; |
| | | }); |
| | | const [logDialogOpen, setLogDialogOpen] = useState(false); |
| | | |
| | | const handleResize = () => { |
| | | if (!contentRef) { return; } |
| | | if (!contentRef.current || !player) { |
| | | return; |
| | | } |
| | | const width = contentRef.current.offsetWidth; |
| | | const height = contentRef.current.offsetHeight; |
| | | player.resize(width, height); |
| | |
| | | }, [sidebarOpen]); |
| | | |
| | | useEffect(() => { |
| | | if (!player) { |
| | | return; |
| | | } |
| | | player.setTheme(themeMode); |
| | | Tool.setThemeMode(themeMode); |
| | | }, [themeMode]) |
| | |
| | | </Box> |
| | | <Button |
| | | variant="contained" |
| | | color={rcsStatus ? 'inherit' : 'primary'} |
| | | color={rcsStatus ? 'error' : 'primary'} |
| | | sx={{ mr: 2 }} |
| | | onClick={() => { |
| | | startupOrShutdown(() => { |
| | |
| | | > |
| | | {rcsStatus ? translate('page.map.action.shutdown') : translate('page.map.action.startup')} |
| | | </Button> |
| | | <Button variant="contained" color="primary"> |
| | | <Button |
| | | variant="contained" |
| | | color="primary" |
| | | onClick={() => setLogDialogOpen(true)} |
| | | > |
| | | {translate('page.map.action.monitor')} |
| | | </Button> |
| | | <MoreOperate /> |
| | |
| | | width={378} |
| | | /> |
| | | |
| | | <NewsLogDialog |
| | | open={logDialogOpen} |
| | | onClose={() => setLogDialogOpen(false)} |
| | | /> |
| | | </Box> |
| | | ); |
| | | } |