-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
722 lines (691 loc) · 45.4 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
<!DOCTYPE html>
<html HTML>
<!--
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Authors: Mani Kumar
Fred Decker
Matt
Peter Akers
This file is part of the DCC-EX Project for model railroading and more.
For more information, visit use at dcc-ex.com
-->
<head>
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="manifest" href="manifest.json">
<script>
var version = "1.3.37";
</script>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="images/favicon.ico" rel="icon" type="image/x-icon">
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css">
<link href="css/layout.css" rel="stylesheet" type="text/css">
<link href="css/roundslider.min.css" rel="stylesheet" type="text/css"/>
<link href="css/throttle.css" rel="stylesheet" type="text/css">
<link href="css/jquery.rotaryswitch.css" rel="stylesheet" type="text/css">
<link href="css/icons.css" rel="stylesheet" type="text/css">
<link href="css/settings.css" rel="stylesheet" type="text/css">
<link href="css/toastmaker.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/roundslider.min.js"></script>
<script type="text/javascript" src="js/jquery.rotaryswitch.js"></script>
<script type="text/javascript" src="js/toastmaker.js"></script>
<script type="text/javascript" src="js/fnMaster.js"></script>
<script type="text/javascript" src="js/commandController.js"></script>
<script type="text/javascript" src="js/storageController.js"></script>
<script type="text/javascript" src="js/addloco.js"></script>
<script type="text/javascript" src="js/emulator.js"></script>
<script type="text/javascript" src="js/exwebthrottle.js"></script>
<script type="text/javascript" src="js/pwa.js"></script>
<!--
NOTE: You can replace the above links with these if you like if you will always run when
connected to the internet. Using the links above, they must be installed on your machine.
This program will search for them online and import them if you use this method instead.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/roundslider.min.css" rel="stylesheet" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/roundslider.min.js"></script>
<script type="text/javascript" src="js/exwebthrottle.js"></script>
-->
<title>DCC-EX Web Throttle</title>
<meta name="description" content="Chromium browser based web throttle for a DCC-EX EX-CommandStation (EX-CS) to control model trains">
<html lang="en">
</head>
<body>
<nav class="menu" id="side-menu" tabindex="0">
<header class="avatar">
<button class="nav-btn in" id="nav-close">×</button>
<img src="images/cover.png" />
</header>
<ul>
<li tabindex="0" class="throttle" id="throttle-nav"><span>Throttle</span></li>
<li tabindex="0" class="cv-programmer" id="cv-programmer-nav"><span>CV Programmer</span></li>
<li tabindex="0" class="routes" id="routes-nav"><span>Routes/Automation</span></li>
<li tabindex="0" class="turnouts" id="turnouts-nav"><span>Turnouts/Points</span></li>
<li tabindex="0" class="locomotives" id="loco-nav"><span>Locomotives</span></li>
<li tabindex="0" class="function-maps" id="fn-map-nav"><span>Function Maps</span></li>
<li tabindex="0" class="settings" id="settings-nav"><span>Settings</span></li>
</ul>
</nav>
<div class="topnav">
<div class="row">
<div class="column-4 align-left">
<button class="nav-btn" id="nav-open">☰</button>
<button class="btn-nav" id="throttle-screen-button" state="ws" title="Throttle Screen" hidden="true"><span class="toolbar-button-throttle"></span></button>
<button class="btn-nav" id="cv-programmer-screen-button" state="ws" title="CV Programmer Screen"><span class="toolbar-button-cv-programmer"></span></button>
<button class="btn-nav" id="routes-screen-button" state="ws" title="Routes/Automation Screen"><span class="toolbar-button-routes"></span></button>
<button class="btn-nav" id="turnouts-screen-button" state="ws" title="Turnouts/Points Screen"><span class="toolbar-button-turnouts"></span></button>
<button class="btn-nav" id="locos-screen-button" state="ws" title="Edit Locos Screen"><span class="toolbar-button-locos"></span></button>
<button class="btn-nav" id="function-maps-screen-button" state="ws" title="Edit Function Maps Screen"><span class="toolbar-button-functions"></span></button>
</div>
<div class="column-2 align-center">
<div class="throttle-heading">
<a href="http://www.dcc-ex.com" target="_blank" rel="noopener noreferrer"><div class="wt-logo"></div></a>
</div>
</div>
<div class="column-4">
<button class="btn-expand" id="fs-toggle" state="ws" title="Fullscreen">⤢</button>
<button class="btn-info" id="info-tooltip" state="ws" title="Information"><span class="icon-info"></span></button>
<button class="btn-info" id="help-button" state="ws" title="Help" onclick=" window.open('https://dcc-ex.com/ex-webthrottle/', '_blank')"><span class="icon-question"></span></button>
<button class="btn-info" id="settings-button" state="ws" title="Settings"><span class="icon-cog"></span></button>
</div>
</div>
</div>
<div id="rendered-form">
<div class="rendered-form">
<section id="throttle-window" class="section">
<div Class="details-panel" id="details-panel">
<div class="row">
<div class="column-6">
<div class="loco-list-container row">
<div class="column-4 loco-list-ctrl">
<label for="ex-locoid" class="formbuilder-text-label">
<!-- <span class="toolbar-button-throttle" style="display:inline-block;"></span> -->
Loco ID<span class="formbuilder-required">*</span>
</label>
<input id="ex-locoid" type="text" loco-cv="0" name="Locomotives" placeholder="Loco ID / DCC Address" title="To Acquire a loco: Type an Address and press [Enter] or Select from the Locos/Roster list. To release: Press [Enter] or click [X]"/>
</div>
<div class="column-2 formbuilder-button acquire-wrap">
<button id="button-getloco" class="acq-loco-btn btn" data-acquired="false">
<span class="icon-circle-right"></span>
</button>
</div>
<div class="column-2 formbuilder-button acquire-wrap">
</div>
</div>
</div>
<div class="server-button column-4">
<select id="select-method" class="select-control select-xl" name="selectMethod" title="Change the connection method">
<option value="serial">Serial (USB)</option>
<option value="emulator">Emulator</option>
</select>
<button type="button" class="btn-default btn" title="Connect to the Command Station" aria-state="connected" name="button-connect" access="false" id="button-connect">
<span class="con-ind"></span>Connect EX-CS
</button>
<!-- <button class="btn-grey" id="fs-toggle" state="ws" title="Fullscreen">⤢</button> -->
</div>
</div>
<hr>
</div>
<div class="row pos-rel">
<button type="button" class="btn-default btn btn-hide" title="Hide the top bar" name="button-hide" access="false" id="button-hide">
<span class="icon-circle-up"></span>
</button>
</div>
<div class="row flex-center">
<div class="column-5 mobile-100 throttle-container">
<div class="row mobile-100 width100 flexx">
<div class="column-7 flexx">
<div class="flexx btns">
<button type="button" title="Decrease speed" class="btn-default btn btn btn-speed btn-left" name="button-left" access="false" id="button-left">
<span class="left" style="line-height: 12px;"> - </span>
</button>
</div>
<div class="Throttlewrap">
<div id="vertical-throttle" class="vertical-throttle speedController">
<div id="v-throttle">
</div>
<div id="speed-indicator" class="progress-numb">
0
</div>
</div>
<div id="knobthrottle" class="speedController">
<input type="text" class="rotarySwitch" value="0">
<div id="knob-value" class="knob-value">0</div>
</div>
<div id="circular-throttle" class="circular-throttle speedController">
</div>
</div>
<div class="flexx btns">
<button type="button" title="Increase speed" class="btn-default btn btn-speed btn-right" name="button-right" access="false" id="button-right">
<span class="right"> + </span>
</button>
</div>
</div>
<div class=" column-2">
<div class="em-btn">
<button class="em-stop" id="emergency-stop" title="Emergency Stop">
<span class="icon-stop2"></span>
</button>
</div>
<div class="dir-toggle">
<button class="dir-btn forward selected" id="dir-f" aria-label="forward" ><span class="arrow-up icon-up"></span></button>
<!-- <button class="dir-btn stop" id="dir-S" aria-label="stop"> <span class="stop"></span></button> -->
<button class="dir-btn backward" id="dir-b" aria-label="backward"> <span class="arrow-down icon-down"></button>
</div>
<div class="em-btn">
<button class="normal-stop" id="normal-stop" title="Stop">
<span class="icon-stop2"></span>
</button>
</div>
</div>
</div>
</div>
<div class="functionKeys column-5 mobile-100">
<div class="row mobile-100">
<div class="power-slider column-4 formbuilder-button " id="power-switch-div" title="Enable track power">
<label class="switch">
<input type="checkbox" id="power-switch">
<span class="slider round"></span>
</label>
<span class="pow-status">
Track Power <span id="power-status">is Off</span>
</span>
</div>
<div class="note-msg column-6">
<select id="select-map" class="btn select-map select-control" name="selectMap" title="Load a Saved Map">
</select>
</div>
</div>
<div class="row" id="fn-wrapper">
</div>
</div>
</div>
<div class="row">
<div class="column-8">
<hr>
</div> <div class="console-slider column-2" title="Enable the debug console">
<label class="debug switch">
<input type="checkbox" id="console-toggle">
<span class="slider round debug-slider"></span>
</label>
<span class="debug-status">
Debug Console
</span>
</div>
</div>
<div id="debug-console" hidden="true">
<div class="column-3 mobile-100">
<div class="row mobile-margin-top20">
<div class="formbuilder-text column-10">
<input placeholder="Direct Command (without < >)" class="form-control" name="cmd-direct" access="false" id="cmd-direct">
</div>
</div>
<div class="row mobile-margin-top20">
<div class="formbuilder-button column-4">
<button type="button" class="btn-default btn" name="sendCmd" access="false" data-acquired="false" id="button-sendCmd" title=""Sent to the Command Station>
Send
</button>
</div>
<div class="formbuilder-button dcmd-clear column-3">
<button type="button" class="btn-default btn" name="clearLog" access="false" data-acquired="false" id="button-clearLog" title="Clear log">
Clear
</button>
</div>
<div class="formbuilder-button dcmd-clear column-3">
<button type="button" class="btn-default btn" name="copyLog" access="false" data-acquired="false" id="button-copyLog" title="Copy log to clipboard">
Copy
</button>
</div>
</div>
</div>
<div class="column-7 mobile-100">
<div class="log-msg" id="log-box">
</div>
</div>
</div>
</section>
<section id="cv-programmer-window" class="section" hidden="true">
<div class="row settings-heading">
<div class="column-7 pl0 hdng">
<span class="toolbar-button-cv-programmer" style="display:inline-block;"></span>
CV Programmer <small><small>(PROG track only)</small></small>
</div>
</div>
<div Class="details-panel" id="cv-details-panel">
<div class="row">
<div class="column-10">
<div class="cv-loco-id-container row">
<div class="column-4 cv-addr-ctrl">
<label for="cv-locoid" class="formbuilder-text-label">
Address
</label>
<input id="cv-locoid" type="text" loco-cv="0" name="cv-loco-id" placeholder="DCC Address"/>
</div>
<div class="column-6">
<div class="formbuilder-button column-5">
<button type="button" class="btn-default btn" title="Read Address on PROG track" name="button-cv-read-loco-id" access="false" id="button-cv-read-loco-id">
Read Address
</button>
</div>
<div class="formbuilder-button column-5">
<button type="button" class="btn-default btn" title="Write Address on PROG track" name="button-cv-write-loco-id" access="false" id="button-cv-write-loco-id">
Write Address
</button>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="column-10">
<div class="cv-cv-container row">
<div class="column-3 cv-cv-ctrl">
<label for="cv-cvid" class="formbuilder-text-label">
CV
</label>
<input id="cv-cvid" type="text" loco-cv="0" name="cv-cv-id" placeholder="CV Number"/>
</div>
<div class="column-3 cv-cv-ctrl">
<label for="cv-cvid" class="formbuilder-text-label">
Value
</label>
<input id="cv-cvvalue" type="text" loco-cv="0" name="cv-cv-value" placeholder="CV Value"/>
</div>
<div class="column-4">
<div class="formbuilder-button column-5">
<button type="button" class="btn-default btn" title="Read CV on PROG track" name="button-cv-read-cv" access="false" id="button-cv-read-cv">
Read CV
</button>
</div>
<div class="formbuilder-button column-5">
<button type="button" class="btn-default btn" title="Write CV on PROG track" name="button-cv-write-cv" access="false" id="button-cv-write-cv">
Write CV
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="column-10">
<div class="cv-common-cvs-container row">
<div class="column-6 cv-cv-ctrl">
<label for="cv-cvid" class="formbuilder-text-label">
Common CVs
</label>
<select id="common-cvs" class="select-control select-xl" name="common-cvs" title="Common CVs. On selection, the CV number will be loaded into the field above">
<option value="0"><select></option>
<option value="2">Vstart</option>
<option value="3">Acceleration Rate</option>
<option value="4">Deceleration Rate </option>
<option value="5">Vhigh</option>
<option value="6">Vmid</option>
<option value="7">Manufacturer Version No.</option>
<option value="8">Manufactured ID</option>
<option value="9">Total PWM Period</option>
<option value="10">EMF Feedback Cutout</option>
<option value="11">Packet Time-Out Value</option>
<option value="12">Power Source Conversion</option>
<option value="13">Alt. Mode Funct. Status F1-F8</option>
<option value="14">Alt. Mode Funct. Status FL,F9-F12</option>
<option value="15">Decoder Lock CV15</option>
<option value="16">Decoder Lock CV16</option>
<option value="19">Consist Address</option>
<option value="21">Consist Addr Active for F1-F8</option>
<option value="22">Consist Addr Active for FL-F9-F12</option>
<option value="23">Acceleration Adjustment</option>
<option value="24">Deceleration Adjustment</option>
<option value="29">Mode Control (dir, addr size, etc.)</option>
<option value="65">Kick Start</option>
<option value="66">Forward Trim</option>
<option value="95">Reverse Trim</option>
</select>
</div>
</div>
</div>
</div>
<hr>
</div>
<div id="debug-cmds2">
<div class="column-100 mobile-100">
<div class="column-3 mobile-100">
<div class="row mobile-margin-top20">
<div class="formbuilder-text column-10">
<input placeholder="Direct Command (without < >)" class="form-control" name="cmd-direct" access="false" id="cmd-direct2">
</div>
</div>
<div class="row mobile-margin-top20">
<div class="formbuilder-button column-4">
<button type="button" class="btn-default btn" name="sendCmd" access="false" data-acquired="false" id="button-sendCmd2" title=""Sent to the Command Station>
Send
</button>
</div>
<div class="formbuilder-button dcmd-clear column-3">
<button type="button" class="btn-default btn" name="clearLog" access="false" data-acquired="false" id="button-clearLog2" title="Clear log">
Clear
</button>
</div>
<div class="formbuilder-button dcmd-clear column-3">
<button type="button" class="btn-default btn" name="copyLog" access="false" data-acquired="false" id="button-copyLog2" title="Copy log to clipboard">
Copy
</button>
</div>
</div>
</div>
</div>
</div>
<div id="debug-console2">
<div class="column-100 mobile-100">
<div class="log-msg log-msg2" id="log-box2">
</div>
</div>
</div>
</section>
<section id="routes-window" class="section" hidden="true">
<div class="row settings-heading">
<div class="column-10 pl0 hdng">
<span class="toolbar-button-routes" style="display:inline-block;"></span>
Routes / Automation <small><small>(On the EX-CommandStation)</small></small>
</div>
</div>
<div class="row settings-content">
<div class="settings-panel" id="routes-panel">
<div class="settings-group">
Select a Route/Automation
</div>
</div>
</div>
</section>
<section id="turnouts-window" class="section" hidden="true">
<div class="row settings-heading">
<div class="column-10 pl0 hdng">
<span class="toolbar-button-turnouts" style="display:inline-block;"></span>
Turnouts / Points <small><small>(On the EX-CommandStation)</small></small>
</div>
</div>
<div class="row settings-content">
<div class="settings-panel" id="turnouts-panel">
<div class="settings-group">
Select a Turnout/Point
</div>
</div>
</div>
</section>
<section id="loco-window" class="section" hidden="true">
<div class="row settings-heading">
<div class="column-6 pl0 hdng">
<span class="toolbar-button-locos" style="display:inline-block;"></span>
Locomotives <small><small><small><i>(Stored on this computer only)</i></small></small></small>
</div>
<div class="column-4 pr0">
<div class="option-btns formbuilder-button row">
<div class="column-2"> </div>
<div class="column-4">
<button id="add-loco" class="add-loco-btn btn">
<span class="icon-plus"></span> Add New
</button>
<div id="loco-form-content" class="add-loco-form">
<form id="loco-form" class="form-inline">
<div class="fn-modal-header row">
<h4 class="fn-heading add-loco-head">Add Locomotive</h4>
<span class="close" id="close-addloco-model">×</span>
</div>
<!-- <div class="add-loco-head">s
Add Locomotive
<>
<hr>
</div> -->
<div class="row">
<label class="column-4"for="name">Name:*</label>
<input class="column-6" type="text" id="name" placeholder="Enter name" name="name" required>
</div>
<div class="row">
<label class="column-4"for="cv">DCC Address:*</label>
<input class="column-6" type="number" id="cv" placeholder="Enter DCC Address" name="cv" required>
</div>
<div class="row">
<label class="column-4"for="type">Engine Type:</label>
<select class="column-6 add-select" id="type" placeholder="Select Type" name="type">
<option value="Diesel"> Diesel </option>
<option value="Steam"> Steam </option>
<option value="Electric"> Electric </option>
<option value="Other"> Other </option>
</select>
</div>
<div class="row">
<label class="column-4"for="brand">Brand:</label>
<input class="column-6" type="text" id="brand" placeholder="Brand Name" name="brand">
</div>
<div class="row">
<label class="column-4"for="decoder">Decoder:</label>
<input class="column-6" type="text" id="decoder" placeholder="Decoder Name" name="decoder">
</div>
<div class="row">
<label class="column-4"for="map">Function map:*</label>
<input id="function-maps" class="column-6" type="text" id="map" placeholder="Select Map" name="map" required>
</div>
<div class="spacer">
</div>
<div class="row">
<div class="column-2"></div>
<button id="loco-submit" loco-mode="add" class="column-6" type="submit">Submit</button>
<div class="column-2"></div>
</div>
</form>
</div>
</div>
<div class="column-2">
<button class="add-loco-btn btn" id="export-locolist" title="Export Locomotives"><span class="icon-upload3"></span></button>
</div>
<div class="column-2">
<button class="add-loco-btn btn" id="import-locolist" title="Import Locomotives"><span class="icon-download3"></span></button>
</div>
</div>
</div>
</div>
<div class="row settings-content">
<div class="settings-panel" id="locomotives-panel">
<div class="settings-group">
Select a Locomotive
</div>
</div>
</div>
</section>
<section id="fn-map-window" class="section" hidden="true">
<div class="row settings-heading">
<div class="column-6 pl0 hdng">
<span class="toolbar-button-functions" style="display:inline-block;"></span>
Function Mappings <small><small><small><i>(Stored on this computer only)</i></small></small></small>
</div>
<div class="column-4 pr0">
<div class="option-btns formbuilder-button row">
<div class="column-2"> </div>
<div class="column-4">
<button id="add-map" class="add-loco-btn btn">
<span class="icon-plus"></span> New Map
</button>
</div>
<div class="column-2">
<button class="add-loco-btn btn" id="export-all-maps" title="Export Map" ><span class="icon-upload3"></span></button>
</div>
<div class="column-2">
<button class="add-loco-btn btn" id="import-all-maps" title="Import Map"><span class="icon-download3"></span></button>
</div>
</div>
</div>
</div>
<div class="row settings-content">
<div class="side-panel">
<ul id="function-mappings">
</ul>
</div>
<div class="settings-panel" id="mapping-panel">
<div class="settings-group placeholder">
<p>Select a Map</p>
</div>
</div>
</div>
</section>
<section id="settings-window" class="section" hidden="true">
<div class="row">
<div class="settings-heading hdng">
Settings
</div>
</div>
<div class="row settings-content">
<div class="side-panel">
<ul>
<li id="settings-general">General</li>
<li id="settings-storage">Storage</li>
<li id="settings-app">App</li>
</ul>
</div>
<div class="settings-panel scrollbar" id="settings-panel">
<div class="settings-section" id="general-section">
<div class="settings-subheading">
General
</div>
<div class="settings-group">
<div class="row setting-entry">
<label class="setting-label">
Theme
</label>
<div class="setting-content">
<select id="theme-selector" class="btn theme-selector select-control" name="themeselector" title="Change Theme">
<option value="simple"> Simple </option>
<option value="metallic"> Metallic </option>
<option value="dark"> Dark </option>
</select>
</div>
</div>
<div class="row setting-entry">
<label class="setting-label">
Speed Controller
</label>
<div class="setting-content">
<select id="throttle-selector" class="btn throttle-selector select-control" name="throttleselector" title="Change Throttle Controller">
<option value="vertical"> Vertical </option>
<option value="knob"> Knob </option>
<option value="circular"> Circular </option>
</select>
</div>
</div>
<div class="row setting-entry">
<label class="setting-label">
Timestamp on log
</label>
<div class="setting-content">
<select id="timestamp-selector" class="btn throttle-selector select-control" name="throttleselector" title="Change Throttle Controller">
<option value="on"> On </option>
<option value="off"> Off </option>
</select>
</div>
</div>
</div>
</div>
<div class="settings-section" id="storage-section">
<div class="settings-subheading">
Storage
</div>
<div class="settings-group">
<!--<div class="row setting-entry">
<label class="setting-label">
Some placeholder
</label>
<div class="setting-content">
<input />
</div>
</div>
<div class="row setting-entry">
<label class="setting-label">
Some placeholder
</label>
<div class="setting-content">
<input />
</div>
</div>-->
<!--<div class="hr"></div>-->
<div class="row setting-entry">
<label class="setting-label">
<button id="backup-app-settings">⤒ Export App data</button>
</label>
</div>
<div class="row setting-entry">
<label class="setting-label">
<button id="restore-app-settings">⤓ Import App data</button>
</label>
</div>
<div class="row setting-entry">
<label class="setting-label">
<button id="wipe-app-settings">⤫ Wipe App data</button>
</label>
</div>
</div>
<div class="settings-section" id="app-section">
<div class="settings-subheading">
App
</div>
<div class="settings-group">
<div class="row setting-entry">
<label class="setting-label">
Install as an app
</label>
<label class="setting-label">
<button class="add-button">Install</button>
<label class="installed-label">App Installed</label>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<div id="fnModal" class="fn-modal">
<!-- Modal content -->
<div class="fn-modal-header row">
<h4 class="fn-heading" > New Map </h4>
<span class="close" id="close-model">×</span>
</div>
<div class="fn-modal-content">
Content
</div>
<div class="fn-modal-footer row">
<button type="button" mode="new" class="btn-default btn save-fn" name="save-fn" id="save-fn-map">
Save Map
</button>
</div>
</div>
<input id="map-upload" type="file" hidden/>
<input id="maps-upload" type="file" hidden/>
<input id="cabs-upload" type="file" hidden/>
<input id="app-upload" type="file" hidden/>
</body>
</html>
<script>
if('serviceWorker' in navigator) {
try {
navigator.serviceWorker.register('sw.js')
.then(function() {
console.log('Service Worker Registered');
});
} catch (err) {
console.log("Service Worker Registration failed")
}
}
</script>