feat: add async schedule recording

This commit is contained in:
Rohit
2025-08-08 14:27:23 +05:30
parent 3fa00c8add
commit 956e8a6eee

View File

@@ -235,15 +235,14 @@ export const MainPage = ({ handleEditRecording, initialContent }: MainPageProps)
} }
}, [runningRecordingName, sockets, ids, debugMessageHandler, user?.id, t, notify, setRerenderRuns, setQueuedRuns, navigate, setContent, setIds]); }, [runningRecordingName, sockets, ids, debugMessageHandler, user?.id, t, notify, setRerenderRuns, setQueuedRuns, navigate, setContent, setIds]);
const handleScheduleRecording = (settings: ScheduleSettings) => { const handleScheduleRecording = async (settings: ScheduleSettings) => {
scheduleStoredRecording(runningRecordingId, settings) const { message, runId }: ScheduleRunResponse = await scheduleStoredRecording(runningRecordingId, settings);
.then(({ message, runId }: ScheduleRunResponse) => { if (message === 'success') {
if (message === 'success') { notify('success', t('main_page.notifications.schedule_success', { name: runningRecordingName }));
notify('success', t('main_page.notifications.schedule_success', { name: runningRecordingName })); } else {
} else { notify('error', t('main_page.notifications.schedule_failed', { name: runningRecordingName }));
notify('error', t('main_page.notifications.schedule_failed', { name: runningRecordingName })); }
} return message === 'success';
});
} }
const DisplayContent = () => { const DisplayContent = () => {