mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
Fix/102 (#106)
* fix/102 improve osx feedback on navigation * fix/102 refactor enable / disable OSC in
This commit is contained in:
@@ -169,7 +169,6 @@ export default function OscSettingsModal() {
|
|||||||
active={formData.enabled}
|
active={formData.enabled}
|
||||||
text={formData.enabled ? 'OSC IN Enabled' : 'OSC IN Disabled'}
|
text={formData.enabled ? 'OSC IN Enabled' : 'OSC IN Disabled'}
|
||||||
actionHandler={() => handleChange('enabled', !formData.enabled)}
|
actionHandler={() => handleChange('enabled', !formData.enabled)}
|
||||||
onClick={() => console.log('yay')}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl id='portIn'>
|
<FormControl id='portIn'>
|
||||||
|
|||||||
@@ -336,8 +336,11 @@ export class EventTimer extends Timer {
|
|||||||
case 'onPause':
|
case 'onPause':
|
||||||
// broadcast current state
|
// broadcast current state
|
||||||
this.broadcastState();
|
this.broadcastState();
|
||||||
|
|
||||||
// send OSC
|
// send OSC
|
||||||
this.sendOsc(this.osc.implemented.pause);
|
if (this.prevCycle === this.cycleState.onUpdate) {
|
||||||
|
this.sendOsc(this.osc.implemented.pause);
|
||||||
|
}
|
||||||
|
|
||||||
// check integrations - http
|
// check integrations - http
|
||||||
if (h?.onLoad?.enabled) {
|
if (h?.onLoad?.enabled) {
|
||||||
@@ -1278,9 +1281,12 @@ export class EventTimer extends Timer {
|
|||||||
if (this.selectedEventIndex === 0) return;
|
if (this.selectedEventIndex === 0) return;
|
||||||
|
|
||||||
// if there is no event running, go to first
|
// if there is no event running, go to first
|
||||||
if (this.selectedEventIndex == null) {
|
if (!this.selectedEventIndex) {
|
||||||
this.loadEvent(0);
|
this.loadEvent(0);
|
||||||
return;
|
} else {
|
||||||
|
const gotoEvent = this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
||||||
|
if (gotoEvent === this.selectedEventIndex) return;
|
||||||
|
this.loadEvent(gotoEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// send OSC
|
// send OSC
|
||||||
@@ -1288,11 +1294,6 @@ export class EventTimer extends Timer {
|
|||||||
|
|
||||||
// change playstate
|
// change playstate
|
||||||
this.pause();
|
this.pause();
|
||||||
|
|
||||||
const gotoEvent = this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
|
||||||
|
|
||||||
if (gotoEvent === this.selectedEventIndex) return;
|
|
||||||
this.loadEvent(gotoEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
next() {
|
next() {
|
||||||
@@ -1303,9 +1304,15 @@ export class EventTimer extends Timer {
|
|||||||
if (this.selectedEventIndex === this.numEvents - 1) return;
|
if (this.selectedEventIndex === this.numEvents - 1) return;
|
||||||
|
|
||||||
// if there is no event running, go to first
|
// if there is no event running, go to first
|
||||||
if (this.selectedEventIndex == null) {
|
if (!this.selectedEventIndex) {
|
||||||
this.loadEvent(0);
|
this.loadEvent(0);
|
||||||
return;
|
} else {
|
||||||
|
const gotoEvent =
|
||||||
|
this.selectedEventIndex < this.numEvents - 1
|
||||||
|
? this.selectedEventIndex + 1
|
||||||
|
: this.numEvents - 1;
|
||||||
|
if (gotoEvent === this.selectedEventIndex) return;
|
||||||
|
this.loadEvent(gotoEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// send OSC
|
// send OSC
|
||||||
@@ -1313,14 +1320,6 @@ export class EventTimer extends Timer {
|
|||||||
|
|
||||||
// change playstate
|
// change playstate
|
||||||
this.pause();
|
this.pause();
|
||||||
|
|
||||||
const gotoEvent =
|
|
||||||
this.selectedEventIndex < this.numEvents - 1
|
|
||||||
? this.selectedEventIndex + 1
|
|
||||||
: this.numEvents - 1;
|
|
||||||
|
|
||||||
if (gotoEvent === this.selectedEventIndex) return;
|
|
||||||
this.loadEvent(gotoEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unload() {
|
unload() {
|
||||||
|
|||||||
Reference in New Issue
Block a user