mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 03:13:47 +00:00
V2 align (#321)
* fix: fetch in offline environments (#295) * Add arm platforms to docker build (#297) * add arm platforms to docker build --------- Co-authored-by: Fabian Posenau <fabian@fphome.de> * fix: docker build (#298) Co-authored-by: Fabian Posenau <fabian@fphome.de> * Timer: fix too many renders error when using ?progress (#305) * Timer: fix too many renders error when using ?progress * version bump (#314) * style: small tweaks * fix: prevent actions in roll mode * chore: update external assets * style: show shortcuts in quick blocks * refactor: revert optimisations on callbacks * fun: industry dictionary * style: indicators for event features --------- Co-authored-by: Fabian Posenau <fabian.p99@gmx.de> Co-authored-by: Fabian Posenau <fabian@fphome.de> Co-authored-by: Marks Polakovs <github@markspolakovs.me>
This commit is contained in:
@@ -7,7 +7,7 @@ import cors from 'cors';
|
||||
import { join, resolve } from 'path';
|
||||
|
||||
import { initSentry, reportSentryException } from './modules/sentry.js';
|
||||
import { currentDirectory, environment, isProduction, resolvedPath } from './setup.js';
|
||||
import { currentDirectory, environment, externalsStartDirectory, isProduction, resolvedPath } from './setup.js';
|
||||
import { ONTIME_VERSION } from './ONTIME_VERSION.js';
|
||||
import { OSCSettings } from 'ontime-types';
|
||||
|
||||
@@ -61,7 +61,7 @@ app.use('/ontime', ontimeRouter);
|
||||
app.use('/playback', playbackRouter);
|
||||
|
||||
// serve static - css
|
||||
app.use('/external', express.static(join(currentDirectory, 'external')));
|
||||
app.use('/external', express.static(externalsStartDirectory));
|
||||
|
||||
// serve static - react, in test mode we fetch the React app from module
|
||||
app.use(express.static(join(currentDirectory, resolvedPath())));
|
||||
|
||||
@@ -307,15 +307,17 @@ export class TimerService {
|
||||
_onFinish() {
|
||||
eventStore.set('timer', this.timer);
|
||||
integrationService.dispatch(TimerLifeCycle.onFinish);
|
||||
if (this.timer.endAction === EndAction.Stop) {
|
||||
PlaybackService.stop();
|
||||
} else if (this.timer.endAction === EndAction.LoadNext) {
|
||||
// we need to delay here to put this action in the queue stack. otherwise it won't be executed properly
|
||||
setTimeout(() => {
|
||||
PlaybackService.loadNext();
|
||||
}, 0);
|
||||
} else if (this.timer.endAction === EndAction.PlayNext) {
|
||||
PlaybackService.startNext();
|
||||
if (this.playback === Playback.Play) {
|
||||
if (this.timer.endAction === EndAction.Stop) {
|
||||
PlaybackService.stop();
|
||||
} else if (this.timer.endAction === EndAction.LoadNext) {
|
||||
// we need to delay here to put this action in the queue stack. otherwise it won't be executed properly
|
||||
setTimeout(() => {
|
||||
PlaybackService.loadNext();
|
||||
}, 0);
|
||||
} else if (this.timer.endAction === EndAction.PlayNext) {
|
||||
PlaybackService.startNext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,10 +66,14 @@ if (import.meta.url) {
|
||||
// path to server src folder
|
||||
export const currentDirectory = dirname(__dirname);
|
||||
|
||||
const appPath = isTest ? '../' : getAppDataPath();
|
||||
const testDbStartDirectory = isTest ? '../' : getAppDataPath();
|
||||
export const externalsStartDirectory = isProduction ? getAppDataPath() : join(currentDirectory, 'external');
|
||||
|
||||
// path to public db
|
||||
export const resolveDbDirectory = join(appPath, isTest ? config.database.testdb : config.database.directory);
|
||||
export const resolveDbDirectory = join(
|
||||
testDbStartDirectory,
|
||||
isTest ? config.database.testdb : config.database.directory,
|
||||
);
|
||||
export const resolveDbPath = join(resolveDbDirectory, config.database.filename);
|
||||
|
||||
export const pathToStartDb = isTest
|
||||
@@ -77,7 +81,7 @@ export const pathToStartDb = isTest
|
||||
: join(currentDirectory, '/preloaded-db/', config.database.filename);
|
||||
|
||||
// path to public styles
|
||||
export const resolveStylesDirectory = join(appPath, config.styles.directory);
|
||||
export const resolveStylesDirectory = join(externalsStartDirectory, config.styles.directory);
|
||||
export const resolveStylesPath = join(resolveStylesDirectory, config.styles.filename);
|
||||
|
||||
export const pathToStartStyles = join(currentDirectory, '/external/styles/', config.styles.filename);
|
||||
|
||||
+110
-2711
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user