Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/order-after-timeline-obj-rem…
Browse files Browse the repository at this point in the history
…oval-and-undo' into develop

# Conflicts:
#	apps/app/src/electron/SuperConductor.ts
  • Loading branch information
nytamin committed Jan 24, 2024
2 parents d0c4681 + 40be119 commit 502a14c
Show file tree
Hide file tree
Showing 27 changed files with 590 additions and 250 deletions.
1 change: 1 addition & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"deepmerge-ts": "^5.1.0",
"electron-is-dev": "^2.0.0",
"electron-updater": "^5.3.0",
"eventemitter3": "^5.0.1",
"file-loader": "^6.2.0",
"formik": "^2.2.9",
"formik-mui": "^5.0.0-alpha.0",
Expand Down
19 changes: 15 additions & 4 deletions apps/app/src/electron/ClientEventBus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ import { ActiveAnalog } from '../models/rundown/Analog'
import { AnalogInput } from '../models/project/AnalogInput'
import { BridgeId } from '@shared/api'
import { BridgePeripheralId } from '@shared/lib'
import { EventEmitter } from 'stream'
import EventEmitter from 'eventemitter3'
import { SerializableLedgers } from '../models/project/Project'

type ClientEventBusEvents = {
callMethod: (...args: any[]) => void // legacy
updateUndoLedgers: (undoLedgers: SerializableLedgers) => void
updateRundown: (rundown: Rundown) => void
updateProject: (rundown: Project) => void
}

// --- some of it might be needed, most of it hopefully not
export class ClientEventBus extends EventEmitter implements IPCClientMethods {
export class ClientEventBus extends EventEmitter<ClientEventBusEvents> implements IPCClientMethods {
close(): void {
// Nothing here
}
Expand All @@ -26,10 +34,13 @@ export class ClientEventBus extends EventEmitter implements IPCClientMethods {
this.emit('callMethod', 'updateAppData', appData)
}
updateProject(project: Project): void {
this.emit('updateProject', project) // TODO: some type safety, please
this.emit('updateProject', project)
}
updateRundown(_fileName: string, rundown: Rundown): void {
this.emit('updateRundown', rundown) // TODO: some type safety, please
this.emit('updateRundown', rundown)
}
updateUndoLedgers(data: SerializableLedgers): void {
this.emit('updateUndoLedgers', data)
}
updateResourcesAndMetadata(
resources: Array<{ id: ResourceId; resource: ResourceAny | null }>,
Expand Down
Loading

0 comments on commit 502a14c

Please sign in to comment.