generated from sindresorhus/electron-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
802 lines (758 loc) · 27.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>PresentationBridge Client</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="index.css" />
<script>
window.$ = window.jQuery = require('./node_modules/jquery/dist/jquery.min.js')
</script>
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<script src="./node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script src="./static/mask.ip-input.js"></script>
<script>
const ipc = require('electron').ipcRenderer
//const remote = require('electron').remote;
const { shell } = require('electron')
const config = require('./config')
const marked = require('marked')
const helpFile = './help.md'
const { readFile } = require('fs')
const package_json = require('./package.json')
var propresenter_status = 'disconnected'
var mdns_propresenter_hosts = []
var mdns_midirelay_hosts = []
var presentationbridge_status = 'disconnected'
var plugin_midirelay_enabled = true
var plugin_vista_enabled = true
var plugin_http_enabled = true
var plugin_companion_enabled = true
//IPCs
ipc.on('propresenter_status', function (event, status) {
let displayText = ''
propresenter_status = status
switch (propresenter_status) {
case 'force_disconnected':
displayText = 'Connect'
$('#divProPresenterStatus').text('Disconnected.')
propresenter_disablefields(false)
$('#btnProPresenterConnect').removeClass('btn-primary btn-danger btn-warning')
$('#btnProPresenterConnect').addClass('btn-primary')
break
case 'connecting':
displayText = 'Connecting...'
propresenter_disablefields(true)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-warning')
break
case 'reconnecting':
displayText = 'Reconnecting...'
propresenter_disablefields(true)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-warning')
break
case 'open':
displayText = 'Open, Not Authenticated.'
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-warning')
break
case 'authenticated':
displayText = 'Disconnect'
$('#divProPresenterStatus').text('Connected')
propresenter_disablefields(true)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-danger')
break
case 'badpassword':
displayText = 'Connect'
$('#divProPresenterStatus').text('Incorrect Password.')
propresenter_disablefields(false)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-primary')
break
case 'econnrefused':
displayText = 'Connect'
$('#divProPresenterStatus').text(
'Connection Refused. Is ProPresenter running and configured for network access?'
)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-primary')
propresenter_disablefields(false)
break
case 'etimedout':
displayText = 'Connect'
$('#divProPresenterStatus').text(
'Connection Timed Out. Is ProPresenter running and configured for network access?'
)
$('#btnProPresenterConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnProPresenterConnect').addClass('btn-primary')
propresenter_disablefields(false)
break
default:
displayText = propresenter_status
break
}
$('#btnProPresenterConnect').text(displayText)
})
ipc.on('mdns_propresenter_hosts', function (event, hosts) {
mdns_propresenter_hosts = hosts
let htmlAppend = ''
for (let i = 0; i < mdns_propresenter_hosts.length; i++) {
htmlAppend +=
'<a class="badge badge-pill badge-info" href="#" onclick="propresenter_usemdns(\'' +
mdns_propresenter_hosts[i].ip +
"','" +
mdns_propresenter_hosts[i].port +
'\');">' +
mdns_propresenter_hosts[i].name +
' (' +
mdns_propresenter_hosts[i].ip +
')</a>'
}
$('#divProPresenterHosts').html(htmlAppend)
})
ipc.on('mdns_midirelay_hosts', function (event, hosts) {
mdns_midirelay_hosts = hosts
let htmlAppend = ''
console.log(mdns_midirelay_hosts)
for (let i = 0; i < mdns_midirelay_hosts.length; i++) {
htmlAppend +=
'<a class="badge badge-pill badge-info" href="#" onclick="midirelay_usemdns(\'' +
mdns_midirelay_hosts[i].ip +
"','" +
mdns_midirelay_hosts[i].port +
'\');">' +
mdns_midirelay_hosts[i].ip +
' (' +
mdns_midirelay_hosts[i].port +
')</a>'
}
$('#divMidiRelayHosts').html(htmlAppend)
})
ipc.on('presentationbridge_status', function (event, status) {
let displayText = ''
presentationbridge_status = status
switch (presentationbridge_status) {
case 'disconnected':
displayText = 'Connect'
$('#divPPresentationBridgeStatus').text('Disconnected.')
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
presentationbridge_disablefields(false)
break
case 'connecting':
displayText = 'Connecting...'
presentationbridge_disablefields(false)
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-warning')
break
case 'connected':
displayText = 'Authenticating...'
presentationbridge_disablefields(true)
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-warning')
break
case 'authenticated':
displayText = 'Disconnect'
$('#divPresentationBridgeStatus').text('Connected')
presentationbridge_disablefields(true)
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-danger')
break
case 'badid':
displayText = 'Connect'
presentationbridge_disablefields(false)
$('#divPresentationBridgeStatus').text('Invalid Bridge ID.')
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
break
case 'badpassword':
displayText = 'Connect'
presentationbridge_disablefields(false)
$('#divPresentationBridgeStatus').text('Incorrect Bridge ID or Password.')
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
break
case 'inuse':
displayText = 'Connect'
presentationbridge_disablefields(false)
$('#divPresentationBridgeStatus').text('This Bridge is already in use elsewhere.')
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
break
case 'econnrefused':
displayText = 'Connect'
presentationbridge_disablefields(false)
$('#divPresentationBridgeStatus').text('Connection Refused. Is Presentation Bridge running on the server?')
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
break
case 'etimedout':
displayText = 'Connect'
presentationbridge_disablefields(false)
$('#divPresentationBridgeStatus').text(
'Connection Timed Out. Is Presentation Bridge running on the server?'
)
$('#btnPresentationBridgeConnect').removeClass('btn-primary btn-warning btn-danger')
$('#btnPresentationBridgeConnect').addClass('btn-primary')
break
default:
displayText = presentationbridge_status
break
}
$('#btnPresentationBridgeConnect').text(displayText)
})
$(document).ready(function () {
$('#divTopLine').html(' v' + package_json.version)
$('#switchPPimages').prop('checked', config.get('switch_PPimages'))
$('#switchPPUCase').prop('checked', config.get('switch_PPUCase'))
$('#txtProPresenterIP').val(config.get('propresenterIP'))
$('#txtProPresenterPort').val(config.get('propresenterPort'))
$('#txtProPresenterPassword').val(config.get('propresenterPassword'))
$('#txtPresentationBridgeHost').val(config.get('presentationbridgeHost'))
$('#txtPresentationBridgePort').val(config.get('presentationbridgePort'))
$('#txtPresentationBridgeID').val(config.get('presentationbridgeID'))
$('#txtPresentationBridgePassword').val(config.get('presentationbridgePassword'))
$('#switchMidiRelay').prop('checked', config.get('plugin_midirelay'))
plugin_enable('midirelay')
$('#txtMIDIRelayIP').val(config.get('midirelayIP'))
$('#txtMIDIRelayPort').val(config.get('midirelayPort'))
$('#txtMIDIRelayMIDIPort').val(config.get('midirelayMIDIPort'))
$('#switchVista').prop('checked', config.get('plugin_vista'))
plugin_enable('vista')
$('#txtVistaIP').val(config.get('vistaIP'))
$('#txtVistaPort').val(config.get('vistaPort'))
$('#txtVistaMIDIPort').val(config.get('vistaMIDIPort'))
$('#switchHttp').prop('checked', config.get('plugin_http'))
$('#switchCompanion').prop('checked', config.get('plugin_companion'))
plugin_enable('companion')
$('#txtCompanionIP').val(config.get('companionIP'))
$('#txtCompanionPort').val(config.get('companionPort'))
$('#switchMdns').prop('checked', config.get('switch_mdns'))
$('#switchSettings').prop('checked', config.get('switch_settings'))
$('#switchMonitor').prop('checked', config.get('switch_monitor'))
ipc.send('propresenter_status')
ipc.send('mdns_propresenter_hosts')
ipc.send('mdns_midirelay_hosts')
$('body').tooltip({ selector: '[data-toggle=tooltip]' })
readFile(helpFile, 'utf8', (err, data) => {
if (err) {
console.error(err)
return
}
$('#divHelpBody').html(marked(data))
})
$('[ip-mask]').ipAddress()
})
function propresenter_connect() {
let propresenterIP = $('#txtProPresenterIP').val()
let propresenterPort = $('#txtProPresenterPort').val()
let propresenterPassword = $('#txtProPresenterPassword').val()
ipc.send('propresenter_disconnect')
if (propresenter_status === 'authenticated' || propresenter_status === 'connecting') {
$('#btnProPresenterConnect').text('Disconnecting...')
$('#btnProPresenterConnect').removeClass('btn-primary').addClass('btn-warning')
//ipc.send('propresenter_disconnect');
} else {
$('#btnProPresenterConnect').text('Connecting...')
$('#btnProPresenterConnect').removeClass('btn-primary').addClass('btn-warning')
config.set('propresenterIP', propresenterIP)
config.set('propresenterPort', propresenterPort)
config.set('propresenterPassword', propresenterPassword)
ipc.send('propresenter_connect')
}
}
function presentationbridge_connect() {
let presentationbridgeHost = $('#txtPresentationBridgeHost').val()
let presentationbridgePort = $('#txtPresentationBridgePort').val()
let presentationbridgeID = $('#txtPresentationBridgeID').val()
let presentationbridgePassword = $('#txtPresentationBridgePassword').val()
if (presentationbridge_status === 'connecting') {
ipc.send('presentationbridge_force_disconnect')
}
if (presentationbridge_status === 'authenticated') {
ipc.send('presentationbridge_disconnect')
} else {
config.set('presentationbridgeHost', presentationbridgeHost)
config.set('presentationbridgePort', presentationbridgePort)
config.set('presentationbridgeID', presentationbridgeID)
config.set('presentationbridgePassword', presentationbridgePassword)
ipc.send('presentationbridge_connect')
}
}
function propresenter_disconnect() {
ipc.send('propresenter_disconnect')
}
function propresenter_disablefields(value) {
$('#txtProPresenterIP').prop('disabled', value)
$('#txtProPresenterPort').prop('disabled', value)
$('#txtProPresenterPassword').prop('disabled', value)
}
function propresenter_usemdns(ip, port) {
propresenter_disconnect()
$('#txtProPresenterIP').val(ip)
$('#txtProPresenterPort').val(port)
}
function midirelay_usemdns(ip, port) {
$('#txtMIDIRelayIP').val(ip)
$('#txtMIDIRelayPort').val(port)
}
function presentationbridge_disablefields(value) {
$('#txtPresentationBridgeHost').prop('disabled', value)
$('#txtPresentationBridgePort').prop('disabled', value)
$('#txtPresentationBridgeID').prop('disabled', value)
$('#txtPresentationBridgePassword').prop('disabled', value)
}
function plugin_enable(plugin) {
let enable = ''
let divTarget = '#' + plugin + 'Settings'
switch (plugin) {
case 'midirelay':
enable = $('#switchMidiRelay').prop('checked')
break
case 'vista':
enable = $('#switchVista').prop('checked')
break
case 'http':
enable = $('#switchHttp').prop('checked')
break
case 'companion':
enable = $('#switchCompanion').prop('checked')
break
default:
break
}
enable ? $(divTarget).collapse('show') : $(divTarget).collapse('hide')
config.set('plugin_' + plugin, enable)
}
function switch_enable(item) {
let enable = ''
switch (item) {
case 'mdns':
enable = $('#switchMdns').prop('checked')
break
case 'settings':
enable = $('#switchSettings').prop('checked')
break
case 'monitor':
enable = $('#switchMonitor').prop('checked')
break
case 'PPimages':
enable = $('#switchPPimages').prop('checked')
break
case 'PPUCase':
enable = $('#switchPPUCase').prop('checked')
break
default:
break
}
config.set('switch_' + item, enable)
}
function save() {
config.set('midirelayIP', $('#txtMIDIRelayIP').val())
config.set('midirelayPort', $('#txtMIDIRelayPort').val())
config.set('midirelayMIDIPort', $('#txtMIDIRelayMIDIPort').val())
config.set('vistaIP', $('#txtVistaIP').val())
config.set('vistaPort', $('#txtVistaPort').val())
config.set('vistaMIDIPort', $('#txtVistaMIDIPort').val())
config.set('companionIP', $('#txtCompanionIP').val())
config.set('companionPort', $('#txtCompanionPort').val())
}
function mdnsRescan() {
ipc.send('mdns_rescan')
}
function openAuthor() {
shell.openExternal('http://techministry.blog')
}
</script>
</head>
<body>
<div class="container">
<header>
<h1>PresentationBridge Client</h1>
<h2>Created by <a href="#" onclick="openAuthor();">techministry.blog</a></h2>
<h3 id="divTopLine"></h3>
<div class="vertical-space"></div>
</header>
<section>
<div class="horizontal-line"></div>
<div class="form-row">
<div class="form-group col-md-2">
<b>ProPresenter:</b>
</div>
<div class="form-group col-md-10">
<div id="divProPresenterStatus"></div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<button class="btn btn-primary" id="btnProPresenterConnect" onclick="propresenter_connect();">
Connect ProPresenter
</button>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtProPresenterIP">IP</label>
</div>
<input
type="text"
id="txtProPresenterIP"
class="form-control"
minlength="7"
maxlength="15"
ip-mask
value="127.0.0.1"
placeholder="000.000.000.000"
/>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtProPresenterPort">Stage Port</label>
</div>
<input type="number" id="txtProPresenterPort" class="form-control" />
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-8">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtProPresenterPassword">Stage Display Password</label>
</div>
<input type="password" id="txtProPresenterPassword" class="form-control" />
</div>
</div>
<div class="form-group col-md-4">
<div id="divProPresenterHosts"></div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchPPimages"
onClick="switch_enable('PPimages');"
/>
<label class="custom-control-label" for="switchPPimages"><b>Send Images</b></label>
</div>
</div>
<div class="form-group col-md-3">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchPPUCase"
onClick="switch_enable('PPUCase');"
/>
<label class="custom-control-label" for="switchPPUCase"><b>Upper Case</b></label>
</div>
</div>
</div>
</section>
<section>
<div class="horizontal-line"></div>
<div class="form-row">
<div class="form-group col-md-4">
<b>Presentation Bridge:</b>
</div>
<div class="form-group col-md-8">
<div id="divPresentationBridgeStatus"></div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<button class="btn btn-primary" id="btnPresentationBridgeConnect" onclick="presentationbridge_connect();">
Connect PresentationBridge
</button>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtPresentationBridgeHost">IP</label>
</div>
<input
type="text"
id="txtPresentationBridgeHost"
class="form-control"
minlength="7"
maxlength="15"
ip-mask
value="192.168.1.1"
placeholder="000.000.000.000"
/>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtPresentationBridgePort">Bridge Port</label>
</div>
<input type="number" id="txtPresentationBridgePort" class="form-control" />
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-8">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtPresentationBridgePassword">Bridge Password</label>
</div>
<input type="password" id="txtPresentationBridgePassword" class="form-control" />
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="txtPresentationBridgeID">Bridge ID</label>
</div>
<input type="text" id="txtPresentationBridgeID" class="form-control" />
</div>
</div>
</div>
</section>
<section>
<div class="horizontal-line"></div>
<div class="form-row">
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchMidiRelay"
onClick="plugin_enable('midirelay');"
/>
<label class="custom-control-label" for="switchMidiRelay"><b>midi-relay</b></label>
</div>
</div>
<div class="form-group col-md-8">
<div id="divMidiRelayHosts"></div>
</div>
</div>
<div class="form-row collapse" id="midirelaySettings">
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtMIDIRelayMIDIPort">MIDI Port</label>
</div>
<input type="text" id="txtMIDIRelayMIDIPort" class="form-control" />
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtMIDIRelayIP">IP</label>
</div>
<input
type="text"
id="txtMIDIRelayIP"
class="form-control"
minlength="7"
maxlength="15"
ip-mask
value="127.0.0.1"
placeholder="000.000.000.000"
/>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtMIDIRelayPort">Port</label>
</div>
<input type="number" id="txtMIDIRelayPort" class="form-control" />
</div>
</div>
</div>
</section>
<section>
<div class="horizontal-line"></div>
<div class="form-row">
<div class="form-group col-md-6">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchVista" onClick="plugin_enable('vista');" />
<label class="custom-control-label" for="switchVista"><b>Chroma-Q Vista (uses midi-relay)</b></label>
</div>
</div>
</div>
<div class="form-row collapse" id="vistaSettings">
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtVistaMIDIPort">MIDI Port</label>
</div>
<input type="text" id="txtVistaMIDIPort" class="form-control" />
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtVistaIP">IP</label>
</div>
<input
type="text"
id="txtVistaIP"
class="form-control"
minlength="7"
maxlength="15"
ip-mask
value="127.0.0.1"
placeholder="000.000.000.000"
/>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtVistaPort">Port</label>
</div>
<input type="number" id="txtVistaPort" class="form-control" />
</div>
</div>
</div>
</section>
<section>
<div class="horizontal-line" style="padding-bottom: 4px"></div>
<div class="form-row">
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switchHttp" onClick="plugin_enable('http');" />
<label class="custom-control-label" for="switchHttp"><b>HTTP Requests</b></label>
</div>
</div>
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchCompanion"
onClick="plugin_enable('companion');"
/>
<label class="custom-control-label" for="switchCompanion"><b>Companion Buttons</b></label>
</div>
</div>
</div>
<div class="form-row collapse" id="companionSettings">
<div class="form-group col-md-4"></div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtCompanionIP">IP</label>
</div>
<input
type="text"
id="txtCompanionIP"
class="form-control"
minlength="7"
maxlength="15"
pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$"
/>
</div>
</div>
<div class="form-group col-md-4">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text" for="txtCompanionPort">Port</label>
</div>
<input type="number" id="txtCompanionPort" class="form-control" />
</div>
</div>
</div>
</section>
<section></section>
<section>
<div class="horizontal-line"></div>
<div class="row">
<div class="form-group col-md-1 d-flex align-items-center justify-content-start">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#helpModal">Help</button>
</div>
<div class="form-group col-md-2 d-flex align-items-center justify-content-center">
<div class="text-right">
<button
type="button"
id="btnSave"
class="btn btn-info"
data-toggle="tooltip"
data-placement="top"
title="Re-scan mdns"
onclick="mdnsRescan();"
>
mdns
</button>
</div>
</div>
<div class="form-group col-md-6" style="text-align: center">
<b>Start-up mdns scan and window visibility</b>
<div class="row">
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchMdns"
onClick="switch_enable('mdns');"
/>
<label class="custom-control-label" for="switchMdns"><b>mdns</b></label>
</div>
</div>
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchSettings"
onClick="switch_enable('settings');"
/>
<label class="custom-control-label" for="switchSettings"><b>Settings</b></label>
</div>
</div>
<div class="form-group col-md-4">
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="switchMonitor"
onClick="switch_enable('monitor');"
/>
<label class="custom-control-label" for="switchMonitor"><b>Monitor</b></label>
</div>
</div>
</div>
</div>
<div class="form-group col-md-3 d-flex align-items-center justify-content-end">
<button type="button" class="btn btn-primary" id="btnSave" onclick="save();">Save Settings</button>
</div>
</div>
</section>
<div
class="modal fade"
id="helpModal"
tabindex="-1"
role="dialog"
aria-labelledby="helpModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="helpModalLabel">Help</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="divHelpBody"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<footer></footer>
</div>
</body>
</html>