@@ -182,6 +182,71 @@ ipcMain.on("getActReactCouples", (event, arg) => {
182
182
}
183
183
} ) ;
184
184
185
+ ipcMain . on ( "getSubtitlesSettings" , ( event , arg ) => {
186
+ if ( isDev ) {
187
+ let res = {
188
+ statusCode : 200 ,
189
+ message : "OK" ,
190
+ data : {
191
+ length : 2 ,
192
+ text_fields : [
193
+ {
194
+ "uuid" : "27705058-7a54-4057-ad17-a810c08e8db9" ,
195
+ "name" : "Text lambda 1" ,
196
+ } ,
197
+ {
198
+ "uuid" : "4f712d61-094a-4b7b-9905-4fa928329de4" ,
199
+ "name" : "Text EN" ,
200
+ }
201
+ ] ,
202
+ }
203
+ } ;
204
+ event . returnValue = res ;
205
+ return res ;
206
+ } else {
207
+ return tcpConn . getSubtitlesSettings ( ) . then ( ( res ) => {
208
+ console . log ( "getSubtitlesSettings : " + res ) ;
209
+ event . returnValue = res ;
210
+ } ) ;
211
+ }
212
+ } ) ;
213
+
214
+ ipcMain . on ( "getAllTextFields" , ( event , arg ) => {
215
+ if ( isDev ) {
216
+ let res = {
217
+ statusCode : 200 ,
218
+ message : "OK" ,
219
+ data : {
220
+ length : 3 ,
221
+ text_fields : [
222
+ {
223
+ "name" : "Text lambda 1" ,
224
+ "parent_scene" : "Scene 1" ,
225
+ "uuid" : "27705058-7a54-4057-ad17-a810c08e8db9" ,
226
+ } ,
227
+ {
228
+ "name" : "Text EN" ,
229
+ "parent_scene" : "Scene 1" ,
230
+ "uuid" : "4f712d61-094a-4b7b-9905-4fa928329de4" ,
231
+ } ,
232
+ {
233
+ "name" : "Blop 3" ,
234
+ "parent_scene" : "Scene 2" ,
235
+ "uuid" : "4fa92094a-832-94fde4-712d61-4b7b-9905" ,
236
+ }
237
+ ] ,
238
+ }
239
+ } ;
240
+ event . returnValue = res ;
241
+ return res ;
242
+ } else {
243
+ return tcpConn . getAllTextFields ( ) . then ( ( res ) => {
244
+ console . log ( "getAllTextFields : " + res ) ;
245
+ event . returnValue = res ;
246
+ } ) ;
247
+ }
248
+ } ) ;
249
+
185
250
ipcMain . on ( "setCompressorLevel" , ( event , arg ) => {
186
251
if ( isDev ) {
187
252
let res = {
@@ -263,6 +328,14 @@ ipcMain.on("scenes-updated", (evt, arg) => { // Get from socket broadcast
263
328
mainWindow . webContents . send ( 'scenes-updated' ) ; // To renderer
264
329
} ) ;
265
330
331
+ ipcMain . on ( "actions-reactions-updated" , ( evt , arg ) => { // Get from socket broadcast
332
+ mainWindow . webContents . send ( 'actions-reactions-updated' ) ; // To renderer
333
+ } ) ;
334
+
335
+ ipcMain . on ( "subtitles-updated" , ( evt , arg ) => { // Get from socket broadcast
336
+ mainWindow . webContents . send ( 'subtitles-updated' ) ; // To renderer
337
+ } ) ;
338
+
266
339
ipcMain . on ( "connection-server-lost" , ( evt , arg ) => {
267
340
// Quit main app
268
341
if ( mainWindow )
0 commit comments