mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 02:43:50 +00:00
82ac8f1ba5
* fix: reset rundown on upload * style: facilitate reaching event id * fix: show rundown on half screens * style: prevent tab overflow * style: remove redundant information * style: improve editor in small screens * style: small tweaks to editor sizes
53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
import { useInfoPanel } from '../../common/hooks/useSocket';
|
|
|
|
import CollapsableInfo from './CollapsableInfo';
|
|
import InfoLogger from './InfoLogger';
|
|
import InfoNif from './InfoNif';
|
|
import InfoTitles from './InfoTitles';
|
|
|
|
import style from './Info.module.scss';
|
|
|
|
export default function Info() {
|
|
const data = useInfoPanel();
|
|
|
|
const titlesNow = {
|
|
title: data.titles.titleNow || '',
|
|
subtitle: data.titles.subtitleNow || '',
|
|
presenter: data.titles.presenterNow || '',
|
|
note: data.titles.noteNow || '',
|
|
};
|
|
|
|
const titlesNext = {
|
|
title: data.titles.titleNext || '',
|
|
subtitle: data.titles.subtitleNext || '',
|
|
presenter: data.titles.presenterNext || '',
|
|
note: data.titles.noteNext || '',
|
|
};
|
|
|
|
const selected = !data.numEvents
|
|
? 'No events'
|
|
: `Event ${data.selectedEventIndex !== null ? data.selectedEventIndex + 1 : '-'} / ${
|
|
data.numEvents ? data.numEvents : '-'
|
|
}`;
|
|
|
|
return (
|
|
<>
|
|
<div className={style.panelHeader}>
|
|
<span>{selected}</span>
|
|
</div>
|
|
<CollapsableInfo title='Network Info'>
|
|
<InfoNif />
|
|
</CollapsableInfo>
|
|
<CollapsableInfo title='Playing Now'>
|
|
<InfoTitles data={titlesNow} />
|
|
</CollapsableInfo>
|
|
<CollapsableInfo title='Playing Next'>
|
|
<InfoTitles data={titlesNext} />
|
|
</CollapsableInfo>
|
|
<CollapsableInfo title='Log'>
|
|
<InfoLogger />
|
|
</CollapsableInfo>
|
|
</>
|
|
);
|
|
}
|