mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 10:23:54 +00:00
v2 beta 4 (#361)
* ux: rename end action * chore: update demo db * style: tweaks on extracted rundown * chore: prevent console logs in production code * feat: go mode * style: remove window size limits * style: rename delete action * style: small tweaks on icons * fix: style override on params * chore: update test db * refactor: small code quality improvements * refactor: prevent circular imports
This commit is contained in:
@@ -82,6 +82,11 @@ export function dispatchFromAdapter(type: string, payload: unknown, source?: 'os
|
||||
break;
|
||||
}
|
||||
|
||||
case 'start-next': {
|
||||
PlaybackService.startNext();
|
||||
break;
|
||||
}
|
||||
|
||||
case 'startindex': {
|
||||
const eventIndex = Number(payload);
|
||||
if (isNaN(eventIndex) || eventIndex <= 0) {
|
||||
|
||||
@@ -5,7 +5,7 @@ export const event: Omit<OntimeEvent, 'id'> = {
|
||||
subtitle: '',
|
||||
presenter: '',
|
||||
note: '',
|
||||
endAction: EndAction.Continue,
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
timeStart: 0,
|
||||
timeEnd: 0,
|
||||
|
||||
@@ -116,15 +116,15 @@ export class PlaybackService {
|
||||
return true;
|
||||
}
|
||||
} else if (fallbackAction === 'stop') {
|
||||
logger.info('PLAYBACK', `No next event found! Stopping playback`);
|
||||
logger.info('PLAYBACK', 'No next event found! Stopping playback');
|
||||
PlaybackService.stop();
|
||||
return false;
|
||||
} else if (fallbackAction === 'pause') {
|
||||
logger.info('PLAYBACK', `No next event found! Pausing playback`);
|
||||
logger.info('PLAYBACK', 'No next event found! Pausing playback');
|
||||
PlaybackService.pause();
|
||||
return false;
|
||||
} else {
|
||||
logger.info('PLAYBACK', `No next event found! Continuing playback`);
|
||||
logger.info('PLAYBACK', 'No next event found! Continuing playback');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,10 +371,11 @@ export const fileHandler = async (file) => {
|
||||
res.data.userFields = parseUserFields(dataFromExcel);
|
||||
res.message = 'success';
|
||||
} else {
|
||||
console.log('Error: No sheets found named ontime or event schedule');
|
||||
const errorMessage = 'No sheet found named ontime or event schedule';
|
||||
console.log(errorMessage);
|
||||
res = {
|
||||
error: true,
|
||||
message: `No sheets found named ontime or event schedule`,
|
||||
message: errorMessage,
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -91,7 +91,7 @@ export const parseEventData = (data, enforce): EventData => {
|
||||
};
|
||||
} else if (enforce) {
|
||||
newEventData = { ...dbModel.eventData };
|
||||
console.log(`Created event object in db`);
|
||||
console.log('Created event object in db');
|
||||
}
|
||||
return newEventData as EventData;
|
||||
};
|
||||
@@ -126,7 +126,7 @@ export const parseSettings = (data, enforce): Settings => {
|
||||
}
|
||||
} else if (enforce) {
|
||||
newSettings = dbModel.settings;
|
||||
console.log(`Created settings object in db`);
|
||||
console.log('Created settings object in db');
|
||||
}
|
||||
return newSettings as Settings;
|
||||
};
|
||||
@@ -153,7 +153,7 @@ export const parseViewSettings = (data, enforce): ViewSettings => {
|
||||
};
|
||||
} else if (enforce) {
|
||||
newViews = dbModel.viewSettings;
|
||||
console.log(`Created viewSettings object in db`);
|
||||
console.log('Created viewSettings object in db');
|
||||
}
|
||||
return newViews as ViewSettings;
|
||||
};
|
||||
@@ -201,7 +201,7 @@ export const parseOsc = (data: { osc?: Partial<OSCSettings> }, enforce: boolean)
|
||||
subscriptions: validatedSubscriptions,
|
||||
};
|
||||
} else if (enforce) {
|
||||
console.log(`Created OSC object in db`);
|
||||
console.log('Created OSC object in db');
|
||||
return { ...dbModel.osc };
|
||||
} else return {};
|
||||
};
|
||||
@@ -232,7 +232,7 @@ export const parseHttp = (data, enforce) => {
|
||||
} else if (enforce) {
|
||||
// @ts-expect-error -- not yet
|
||||
newHttp.http = { ...dbModel.http };
|
||||
console.log(`Created http object in db`);
|
||||
console.log('Created http object in db');
|
||||
}
|
||||
return newHttp;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user