Remove public event feature (#1645)

This commit is contained in:
Alex Christoffer Rasmussen
2025-06-19 18:07:42 +02:00
committed by Carlos Valente
parent 0649678dca
commit 08d9e24871
99 changed files with 173 additions and 1129 deletions
@@ -17,7 +17,7 @@ import { getTimeToStart, getUpcomingEvents, useScopedRundown } from './timeline.
import './TimelinePage.scss';
interface TimelinePageProps {
backstageEvents: OntimeEvent[];
events: OntimeEvent[];
general: ProjectData;
runtime: Runtime;
selectedId: MaybeString;
@@ -31,9 +31,9 @@ interface TimelinePageProps {
* There is little point splitting or memoising top level elements
*/
export default function TimelinePage(props: TimelinePageProps) {
const { backstageEvents, general, runtime, selectedId, settings, time } = props;
const { events, general, runtime, selectedId, settings, time } = props;
// holds copy of the rundown with only relevant events
const { scopedRundown, firstStart, totalDuration } = useScopedRundown(backstageEvents, selectedId);
const { scopedRundown, firstStart, totalDuration } = useScopedRundown(events, selectedId);
const { getLocalizedString } = useTranslation();
const clock = formatTime(time.clock);
@@ -15,13 +15,6 @@ export const getTimelineOptions = (timeFormat: string): ViewOption[] => {
type: 'boolean',
defaultValue: false,
},
{
id: 'hideBackstage',
title: 'Hide Private Events',
description: 'Whether to hide non-public events',
type: 'boolean',
defaultValue: false,
},
],
},
];
@@ -95,7 +95,6 @@ export function useScopedRundown(rundown: OntimeEntry[], selectedEventId: MaybeS
return { scopedRundown: [], firstStart: 0, totalDuration: 0 };
}
const hideBackstage = isStringBoolean(searchParams.get('hideBackstage'));
const hidePast = isStringBoolean(searchParams.get('hidePast'));
const scopedRundown: PlayableEvent[] = [];
@@ -117,11 +116,6 @@ export function useScopedRundown(rundown: OntimeEntry[], selectedEventId: MaybeS
continue;
}
// maybe filter backstage
if (!currentEntry.isPublic && hideBackstage) {
continue;
}
// add to scopedRundown
scopedRundown.push(currentEntry);