-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
326 lines (285 loc) · 13.4 KB
/
index.html
File metadata and controls
326 lines (285 loc) · 13.4 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link href="style.css" rel="stylesheet" />
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Rubik:wght@300&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Sigmar+One&display=swap"
rel="stylesheet"
/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Inter:ital,opsz,wght@0,14..32,700;1,14..32,700&display=swap" rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&family=Sigmar+One&display=swap"
rel="stylesheet"
/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,700;1,14..32,700&display=swap" rel="stylesheet">
<script
src="https://cdn.plot.ly/plotly-2.30.1.min.js"
charset="utf-8"
></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/addons/p5.sound.min.js"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.45/Tone.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
</head>
<body>
<header>
<title id="title">Ear2Earth</title>
<h2>ear2earth</h2>
<nav id="nav">
<ul>
<li><button id="startTourLink" class="nav-link-btn" type="button">Quick Tour</button></li>
<li><a href="user-guide.html">User Guide</a></li>
<li><a href="contributor-guide.html">Contributors</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
</header>
<main>
<!-- ========================================
TOP MENU - Main Control Toolbar
Contains all primary controls for data retrieval, playback, and workspace management
========================================= -->
<div class="topmenu">
<section class="toolbar toolbar-main" aria-label="Main Controls">
<div class="toolbar-wrapper">
<div class="row">
<!-- ========== DATA SOURCE SECTION ========== -->
<!-- Preset Selection Button -->
<!-- Opens modal to select predefined data configurations -->
<div class="group">
<button id="openPresetModal" class="primary-btn">
<i data-lucide="folder-search"></i>
Select a Preset
</button>
</div>
<!-- Data Retrieval Options -->
<!-- Radio buttons to choose between last N packets or date range -->
<div class="group" id="dataOptions">
<!-- Option 1: Get last X packets -->
<label for="lastXPackets">
<input type="radio" id="lastXPackets" name="packetOption" value="lastXPackets" checked />
<i data-lucide="package"></i>
Last Packets
</label>
<!-- Option 2: Get packets within date range -->
<label for="timeRange" id="dateRangeLabel">
<input type="radio" id="timeRange" name="packetOption" value="timeRange" />
<i data-lucide="calendar"></i>
<span id="dateRangeText">Date Range</span>
</label>
</div>
<!-- Packet Configuration Inputs -->
<!-- Stacked inputs for number of packets and prescaler -->
<div class="packet-inputs-group">
<!-- Number of packets to retrieve -->
<div class="group" id="numpacketsInput">
<label for="numpackets"># of packets:</label>
<input type="text" id="numpackets" name="numpackets" value="16" />
</div>
<!-- Prescaler: use every Nth packet -->
<div class="group" id="skipPackets">
<span class="muted">Use of every: </span>
<input type="text" id="prescaler" name="prescaler" value="1"/>
</div>
</div>
<!-- Hidden date/time inputs for date range mode -->
<!-- These are populated when user selects "Date Range" option -->
<input type="datetime-local" id="startTime" style="display: none;" />
<input type="datetime-local" id="endTime" style="display: none;" />
<!-- Data Retrieval Button -->
<!-- Triggers data fetch based on selected options -->
<button id="retrieve" class="primary-btn">Retrieve Data</button>
<!-- ========== METADATA SECTION ========== -->
<!-- Metadata View Button -->
<!-- Opens modal to display packet metadata information -->
<div class="group">
<button id="metadataButton" class="pill-btn icon-btn">
<span data-lucide="codeXml" id="metadataIcon"></span>
<span id="metadataTxt">View Metadata</span>
</button>
<!-- Help/Info button for metadata -->
<button id="metadataHelp" class="icon-btn" title="Help">
<i data-lucide="info"></i>
</button>
</div>
<!-- ========== PLAYBACK CONTROLS SECTION ========== -->
<!-- Master Volume Control -->
<!-- Global volume slider for all audio output -->
<div class="control-group">
<label id="masVolLabel" for="masterVolume">Master Volume</label>
<input type="range" id="masterVolume" name="masterVolume" min="-40" max="40" value="0" step="1" />
</div>
<!-- Transport Controls (Play/Stop) -->
<!-- Basic playback controls for audio -->
<div class="transport-group">
<!-- Play button - starts audio playback -->
<button id="play" class="square-btn" title="Play">
<i data-lucide="play"></i>
</button>
<!-- Stop button - stops audio playback -->
<button id="stop" class="square-btn" title="Stop">
<i data-lucide="square"></i>
</button>
</div>
<!-- BPM (Beats Per Minute) Control -->
<!-- Adjusts tempo of audio playback -->
<div id="bpmContainer" class="transport-group">
<label id="bpmLabel" for="bpm">BPM</label>
<input type="range" id="bpm" name="bpm" min="50" max="200" />
<!-- Display current BPM value -->
<div id="bpmText">125</div>
</div>
<!-- Playback Speed Options -->
<!-- Radio buttons for 1x, 2x, 4x, 8x playback speed -->
<div id="speedOptions" class="multi-function-grid">
<input type="radio" id="speed1x" name="speed" value="1" checked />
<label for="speed1x">1x</label>
<input type="radio" id="speed2x" name="speed" value="2" />
<label for="speed2x">2x</label>
<input type="radio" id="speed4x" name="speed" value="4" />
<label for="speed4x">4x</label>
<input type="radio" id="speed8x" name="speed" value="8" />
<label for="speed8x">8x</label>
</div>
<!-- ========== WORKSPACE TOOLS SECTION ========== -->
<!-- Multi-Function Tool Grid -->
<!-- 2x2 grid for share, download, undo, redo actions -->
<div class="multi-function-grid">
<!-- Share workspace -->
<button id="share" class="icon-btn-small" title="Share">
<i data-lucide="share-2"></i>
</button>
<!-- Download workspace data -->
<button id="download" class="icon-btn-small" title="Download">
<i data-lucide="file-down"></i>
</button>
<!-- Undo last action -->
<button id="undo" class="icon-btn-small" title="Undo">
<i data-lucide="undo-2"></i>
</button>
<!-- Redo last undone action -->
<button id="redo" class="icon-btn-small" title="Redo">
<i data-lucide="redo-2"></i>
</button>
</div>
<!-- Packet Refresh Button -->
<!-- Refreshes/reloads packet data -->
<div class="group">
<button id="refresh" class="action-btn" title="Packet Refresh">
<i data-lucide="refresh-cw"></i>
<span class="action-label">Packet Refresh</span>
</button>
<!-- Help/Info button for refresh -->
<button id="refreshHelp" class="icon-btn" title="Help">
<i data-lucide="info"></i>
</button>
</div>
<!-- Clear Workspace Button -->
<!-- Clears all data and resets workspace -->
<div class="group">
<button id="clearWorkspace" class="clear-btn" title="Clear Workspace">
<i data-lucide="Paintbrush"></i>
Clear Space
</button>
</div>
</div> <!-- End .row -->
</div> <!-- End .toolbar-wrapper -->
</section> <!-- End .toolbar -->
</div> <!-- End .topmenu -->
<!-- MODALS - OUTSIDE THE TOOLBAR -->
<!-- Modal for Database & Device Selection -->
<div id="dataSourceModal" class="modal" style="display: none;">
<div class="modal-content">
<span class="close-modal">×</span>
<h3>Configure Data Source</h3>
<!-- Preset selection in modal -->
<div id="presetElements">
<label for="modalPreset">Preset:</label>
<select id="modalPreset">
<option value="default">Select a Preset</option>
</select>
</div>
<div id="databaseElements">
<label for="databases">Database:</label>
<select id="databases">
<option value="default">Select a database</option>
</select>
</div>
<div id="deviceElements">
<label for="devices">Device:</label>
<select id="devices">
<option value="default">Select a device</option>
</select>
</div>
<button id="confirmDataSource" class="primary-btn">Confirm</button>
</div>
</div>
<!-- Modal for Date/Time Range Selection -->
<div id="dateTimeModal" class="modal" style="display: none;">
<div class="modal-content">
<span class="close-modal" id="closeDateModal">×</span>
<h3>Select Date & Time Range</h3>
<div class="modal-form">
<div class="form-group">
<label for="modalStartTime">Start Date & Time:</label>
<input type="datetime-local" id="modalStartTime" />
</div>
<div class="form-group">
<label for="modalEndTime">End Date & Time:</label>
<input type="datetime-local" id="modalEndTime" />
</div>
<div class="form-group">
<label for="modalPrescaler">Use of every:</label>
<input type="number" id="modalPrescaler" value="1" min="1" />
</div>
</div>
<button id="confirmDateTime" class="primary-btn">Apply</button>
</div>
</div>
<!-- Modal for tooltips (info) -->
<div id="popover" class="popover" style="display: none;">
<button class="popover-close">×</button>
<div class="popover-body"></div>
</div>
<div id="popover1" class= "popover1" style="display:none;">
<button class="popover-close">×</button>
<div class="popover-body"></div>
</div>
<div id="popover2" class= "popover2" style="display:none;">
<button class="popover-close">×</button>
<div class="popover-body"></div>
</div>
<!-- Status message notification -->
<div id="status-message" class="status-message"></div>
<!-- ============================================ -->
<div id="metadataContainer">
</div>
<!-- ========== Universal X-Axis =========== -->
<div class="timeline-row">
<div class="timeline-spacer"></div>
<div id="globalTimeline"></div>
</div>
<!-- =============================================== -->
<div id="modulesContainer"></div>
<button id="addModule">
<span>Add Track</span>
<i data-lucide="circle-plus" class="add-icon" ></i>
</button>
</main>
<script type="module" src="index.js"></script>
</body>
</html>