mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 02:43:50 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import useScrollIntoView from '../../../../common/hooks/useScrollIntoView';
|
|
import { isOntimeCloud } from '../../../../externals';
|
|
import GenerateLinkFormExport from '../../../sharing/GenerateLinkFormExport';
|
|
import type { PanelBaseProps } from '../../panel-list/PanelList';
|
|
import * as Panel from '../../panel-utils/PanelUtils';
|
|
import InfoNif from '../network-panel/NetworkInterfaces';
|
|
import ReportSettings from './ReportSettings';
|
|
import URLPresets from './URLPresets';
|
|
|
|
export default function FeaturePanel({ location }: PanelBaseProps) {
|
|
const presetsRef = useScrollIntoView<HTMLDivElement>('presets', location);
|
|
const linkRef = useScrollIntoView<HTMLDivElement>('link', location);
|
|
const reportRef = useScrollIntoView<HTMLDivElement>('report', location);
|
|
|
|
return (
|
|
<>
|
|
<Panel.Header>Sharing and reporting</Panel.Header>
|
|
<div ref={presetsRef}>
|
|
<URLPresets />
|
|
</div>
|
|
<div ref={linkRef}>
|
|
<Panel.Section>
|
|
<Panel.Card>
|
|
<Panel.SubHeader>Share Ontime Link</Panel.SubHeader>
|
|
{!isOntimeCloud && (
|
|
<>
|
|
<Panel.Paragraph>Ontime is streaming on the following network interfaces</Panel.Paragraph>
|
|
<InfoNif />
|
|
</>
|
|
)}
|
|
<Panel.Divider />
|
|
<GenerateLinkFormExport />
|
|
</Panel.Card>
|
|
</Panel.Section>
|
|
</div>
|
|
<div ref={reportRef}>
|
|
<ReportSettings />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|