/** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ import { Button, Section, Stack } from 'tgui/components'; import { Pane } from 'tgui/layouts'; import { NowPlayingWidget, useAudio } from './audio'; import { ChatPanel, ChatTabs } from './chat'; import { useGame } from './game'; import { Notifications } from './Notifications'; import { PingIndicator } from './ping'; import { ReconnectButton } from './reconnect'; import { SettingsPanel, useSettings } from './settings'; export const Panel = (props) => { const audio = useAudio(); const settings = useSettings(); const game = useGame(); if (process.env.NODE_ENV !== 'production') { const { useDebug, KitchenSink } = require('tgui/debug'); const debug = useDebug(); if (debug.kitchenSink) { return ; } } return (
{audio.visible && (
)} {settings.visible && ( )}
{settings.showReconnectWarning && game.connectionLostAt && !game.dismissedConnectionWarning && ( }> You are either AFK, experiencing lag or the connection has closed. )} {settings.showReconnectWarning && game.roundRestartedAt && ( The connection has been closed because the server is restarting. Please wait while you automatically reconnect. )}
); };