| | |
| | | import * as Http from './http'; |
| | | import WebSocketClient from './websocket' |
| | | import ConfirmButton from "../page/components/ConfirmButton"; |
| | | import { FitScreen, AltRoute } from '@mui/icons-material'; |
| | | import { FitScreen, AltRoute, RotateRight } from '@mui/icons-material'; |
| | | import MapSearch from "./header/MapSearch"; |
| | | import { startupOrShutdown } from "./http"; |
| | | import PulseSignal from "../page/components/PulseSignal"; |
| | | import FakeFab from "./header/FakeFab"; |
| | | |
| | | let player; |
| | | let websocket; |
| | |
| | | Tool.generateDynamicGraphic(curZone, JSON.parse(wsMsg), setCurSprite); |
| | | } |
| | | |
| | | player.rotateMap(localStorage.getItem('mapRotation')); |
| | | setTimeout(() => { |
| | | notify.info(translate('page.map.welcome')); |
| | | player.adaptScreen(); |
| | |
| | | {mode === MAP_MODE.OBSERVER_MODE && ( |
| | | <> |
| | | <Box sx={{ mr: 2, display: 'flex', alignItems: 'center' }}> |
| | | <PulseSignal negative flag={rcsStatus} width={12} /> |
| | | <PulseSignal |
| | | negative |
| | | negativeColor='#a4b0be' |
| | | flag={rcsStatus} |
| | | width={12} |
| | | /> |
| | | </Box> |
| | | <Button |
| | | variant="contained" |
| | |
| | | }} |
| | | > |
| | | {mode !== MAP_MODE.MOVABLE_MODE && ( |
| | | <Fab |
| | | variant="extended" |
| | | color={showRoutes ? 'primary' : 'default'} |
| | | size="small" |
| | | onClick={() => { |
| | | showRoutes ? Tool.hideRoutes(curZone, setShowRoutes) : Tool.showRoutes(curZone, setShowRoutes) |
| | | }} |
| | | > |
| | | <AltRoute /> |
| | | </Fab> |
| | | <> |
| | | <Fab |
| | | variant="extended" |
| | | color={showRoutes ? 'primary' : 'default'} |
| | | size="small" |
| | | onClick={() => { |
| | | showRoutes ? Tool.hideRoutes(curZone, setShowRoutes) : Tool.showRoutes(curZone, setShowRoutes) |
| | | }} |
| | | > |
| | | <AltRoute /> |
| | | </Fab> |
| | | <FakeFab |
| | | /> |
| | | </> |
| | | )} |
| | | <Fab |
| | | variant="extended" |
| | | color="primary" |
| | | size="small" |
| | | onClick={() => { |
| | | player.rotateMap(Math.PI / 2); |
| | | }} |
| | | > |
| | | <RotateRight /> |
| | | {/* {translate('page.map.action.adapt')} */} |
| | | </Fab> |
| | | <Fab |
| | | variant="extended" |
| | | color="primary" |
| | | size="small" |
| | | onClick={() => { |
| | | player.adaptScreen(); |
| | | }} |
| | | > |