privateuserh commited on
Commit
0a0f63c
·
verified ·
1 Parent(s): 4d91caa

Add 1 files

Browse files
Files changed (1) hide show
  1. index.html +237 -90
index.html CHANGED
@@ -45,19 +45,53 @@
45
  height: 0;
46
  opacity: 0;
47
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  </style>
49
  </head>
50
  <body class="min-h-screen">
51
  <!-- Floating Action Buttons -->
52
  <div class="fixed bottom-6 right-6 space-y-3 z-50">
53
- <button id="services-btn" class="w-14 h-14 bg-blue-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-700 transition">
54
- <i class="fas fa-concierge-bell text-xl"></i>
55
- </button>
56
- <button id="defi-btn" class="w-14 h-14 bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-green-700 transition">
57
- <i class="fas fa-coins text-xl"></i>
58
- </button>
59
- <button id="contact-btn" class="w-14 h-14 bg-purple-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-purple-700 transition">
60
- <i class="fas fa-envelope text-xl"></i>
 
 
 
 
 
 
 
 
61
  </button>
62
  </div>
63
 
@@ -87,7 +121,7 @@
87
  <!-- Floating Panels -->
88
  <div id="services-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
89
  <div class="flex justify-between items-center mb-6">
90
- <h2 class="text-2xl font-bold">Community Services</h2>
91
  <button id="close-services" class="text-gray-500 hover:text-gray-700">
92
  <i class="fas fa-times text-xl"></i>
93
  </button>
@@ -95,67 +129,78 @@
95
 
96
  <div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4">
97
  <div class="bg-gray-50 p-4 rounded-lg">
98
- <div class="flex items-center">
99
- <div class="bg-blue-100 p-3 rounded-full mr-4">
100
- <i class="fas fa-home text-blue-600"></i>
 
 
101
  </div>
102
- <div class="flex-grow">
103
- <h3 class="font-semibold">Floating Home Services</h3>
104
- <p class="text-gray-600 text-sm">Minor repairs and maintenance</p>
105
  </div>
106
- <div class="text-blue-600 font-bold">10 AQUAPOD/bell</div>
107
- </div>
108
- </div>
109
-
110
- <div class="bg-gray-50 p-4 rounded-lg">
111
- <div class="flex items-center">
112
- <div class="bg-blue-100 p-3 rounded-full mr-4">
113
- <i class="fas fa-ship text-blue-600"></i>
114
  </div>
115
- <div class="flex-grow">
116
- <h3 class="font-semibold">Marine Services</h3>
117
- <p class="text-gray-600 text-sm">Vessel cleaning and maintenance</p>
118
  </div>
119
- <div class="text-blue-600 font-bold">2 bells</div>
120
- </div>
121
- </div>
122
-
123
- <div class="bg-gray-50 p-4 rounded-lg">
124
- <div class="flex items-center">
125
- <div class="bg-blue-100 p-3 rounded-full mr-4">
126
- <i class="fas fa-chalkboard-teacher text-blue-600"></i>
127
  </div>
128
- <div class="flex-grow">
129
- <h3 class="font-semibold">DIY Workshops</h3>
130
- <p class="text-gray-600 text-sm">Learn pod maintenance skills</p>
131
  </div>
132
- <div class="text-blue-600 font-bold">2 bells/person</div>
133
- </div>
134
- </div>
135
-
136
- <div class="bg-gray-50 p-4 rounded-lg">
137
- <div class="flex items-center">
138
- <div class="bg-blue-100 p-3 rounded-full mr-4">
139
- <i class="fas fa-tshirt text-blue-600"></i>
140
  </div>
141
- <div class="flex-grow">
142
- <h3 class="font-semibold">Local Crafts</h3>
143
- <p class="text-gray-600 text-sm">Handcrafted community items</p>
144
  </div>
145
- <div class="text-blue-600 font-bold">Varies</div>
146
  </div>
147
  </div>
148
 
149
- <div class="bg-gray-50 p-4 rounded-lg">
150
- <div class="flex items-center">
151
- <div class="bg-blue-100 p-3 rounded-full mr-4">
152
- <i class="fas fa-utensils text-blue-600"></i>
 
 
153
  </div>
154
- <div class="flex-grow">
155
- <h3 class="font-semibold">Community Meal Kits</h3>
156
- <p class="text-gray-600 text-sm">Weekly fresh ingredient delivery</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  </div>
158
- <div class="text-blue-600 font-bold">Subscription</div>
159
  </div>
160
  </div>
161
  </div>
@@ -163,7 +208,7 @@
163
 
164
  <div id="defi-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
165
  <div class="flex justify-between items-center mb-6">
166
- <h2 class="text-2xl font-bold">DeFi Exchange</h2>
167
  <button id="close-defi" class="text-gray-500 hover:text-gray-700">
168
  <i class="fas fa-times text-xl"></i>
169
  </button>
@@ -214,6 +259,14 @@
214
  <span class="text-gray-600">1 AQUAPOD =</span>
215
  <span class="font-medium">0.00015 BCH</span>
216
  </div>
 
 
 
 
 
 
 
 
217
  </div>
218
  </div>
219
 
@@ -224,40 +277,59 @@
224
  </div>
225
  </div>
226
 
227
- <div id="contact-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
228
  <div class="flex justify-between items-center mb-6">
229
- <h2 class="text-2xl font-bold">Contact Aquapod</h2>
230
- <button id="close-contact" class="text-gray-500 hover:text-gray-700">
231
  <i class="fas fa-times text-xl"></i>
232
  </button>
233
  </div>
234
 
235
  <div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4">
236
- <form>
237
- <div class="mb-4">
238
- <label class="block text-gray-700 mb-2">Name</label>
239
- <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500">
240
- </div>
241
 
242
- <div class="mb-4">
243
- <label class="block text-gray-700 mb-2">Email</label>
244
- <input type="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500">
245
  </div>
246
 
247
- <div class="mb-4">
248
- <label class="block text-gray-700 mb-2">Message</label>
249
- <textarea rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500"></textarea>
250
  </div>
251
 
252
- <button type="submit" class="w-full bg-purple-600 text-white py-3 rounded-lg font-semibold hover:bg-purple-700 transition">
253
- Send Message
254
  </button>
255
- </form>
 
 
 
 
 
 
 
 
256
 
257
- <div class="pt-4 mt-4 border-t border-gray-200">
258
- <h3 class="font-semibold mb-2">Community Support</h3>
259
- <p class="text-gray-600 text-sm">Email: support@aquapod.com</p>
260
- <p class="text-gray-600 text-sm">Phone: +1 (555) 123-4567</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  </div>
262
  </div>
263
  </div>
@@ -326,6 +398,7 @@
326
 
327
  // Update UI
328
  document.getElementById('bell-count').textContent = currentBell.bells;
 
329
  document.getElementById('bell-time').textContent = formatTime(currentBell.time);
330
  document.getElementById('bell-duration').textContent = `${currentBell.bells} Bell${currentBell.bells > 1 ? 's' : ''} (${currentBell.duration})`;
331
 
@@ -365,31 +438,31 @@
365
  // Floating panel controls
366
  const servicesBtn = document.getElementById('services-btn');
367
  const defiBtn = document.getElementById('defi-btn');
368
- const contactBtn = document.getElementById('contact-btn');
369
 
370
  const servicesPanel = document.getElementById('services-panel');
371
  const defiPanel = document.getElementById('defi-panel');
372
- const contactPanel = document.getElementById('contact-panel');
373
 
374
  const closeServices = document.getElementById('close-services');
375
  const closeDefi = document.getElementById('close-defi');
376
- const closeContact = document.getElementById('close-contact');
377
 
378
  // Toggle panels
379
  servicesBtn.addEventListener('click', () => {
380
  servicesPanel.classList.remove('closed');
381
  defiPanel.classList.add('closed');
382
- contactPanel.classList.add('closed');
383
  });
384
 
385
  defiBtn.addEventListener('click', () => {
386
  defiPanel.classList.remove('closed');
387
  servicesPanel.classList.add('closed');
388
- contactPanel.classList.add('closed');
389
  });
390
 
391
- contactBtn.addEventListener('click', () => {
392
- contactPanel.classList.remove('closed');
393
  servicesPanel.classList.add('closed');
394
  defiPanel.classList.add('closed');
395
  });
@@ -403,8 +476,8 @@
403
  defiPanel.classList.add('closed');
404
  });
405
 
406
- closeContact.addEventListener('click', () => {
407
- contactPanel.classList.add('closed');
408
  });
409
 
410
  // Close panels when clicking outside
@@ -417,8 +490,82 @@
417
  defiPanel.classList.add('closed');
418
  }
419
 
420
- if (!contactPanel.contains(e.target) && e.target !== contactBtn) {
421
- contactPanel.classList.add('closed');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  }
423
  });
424
  </script>
 
45
  height: 0;
46
  opacity: 0;
47
  }
48
+
49
+ .bell-badge {
50
+ position: absolute;
51
+ top: -5px;
52
+ right: -5px;
53
+ background-color: #ef4444;
54
+ color: white;
55
+ border-radius: 50%;
56
+ width: 24px;
57
+ height: 24px;
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ font-size: 12px;
62
+ font-weight: bold;
63
+ }
64
+
65
+ .recording {
66
+ animation: pulse 1.5s infinite;
67
+ }
68
+
69
+ @keyframes pulse {
70
+ 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
71
+ 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
72
+ 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
73
+ }
74
  </style>
75
  </head>
76
  <body class="min-h-screen">
77
  <!-- Floating Action Buttons -->
78
  <div class="fixed bottom-6 right-6 space-y-3 z-50">
79
+ <div class="relative">
80
+ <button id="services-btn" class="w-14 h-14 bg-blue-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-700 transition">
81
+ <i class="fas fa-bell text-xl"></i>
82
+ </button>
83
+ <div id="bell-badge" class="bell-badge">1</div>
84
+ </div>
85
+
86
+ <div class="relative">
87
+ <button id="defi-btn" class="w-14 h-14 bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-green-700 transition">
88
+ <i class="fas fa-coins text-xl"></i>
89
+ </button>
90
+ <div class="bell-badge" style="background-color: #f59e0b;">1:4</div>
91
+ </div>
92
+
93
+ <button id="broadcast-btn" class="w-14 h-14 bg-purple-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-purple-700 transition">
94
+ <i class="fas fa-microphone text-xl"></i>
95
  </button>
96
  </div>
97
 
 
121
  <!-- Floating Panels -->
122
  <div id="services-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
123
  <div class="flex justify-between items-center mb-6">
124
+ <h2 class="text-2xl font-bold">Bell Schedule</h2>
125
  <button id="close-services" class="text-gray-500 hover:text-gray-700">
126
  <i class="fas fa-times text-xl"></i>
127
  </button>
 
129
 
130
  <div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4">
131
  <div class="bg-gray-50 p-4 rounded-lg">
132
+ <h3 class="font-semibold mb-3 text-center">Current Bell Periods</h3>
133
+ <div class="grid grid-cols-2 gap-3">
134
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
135
+ <div class="text-blue-800 font-bold">1 Bell</div>
136
+ <div class="text-sm text-blue-600">1:30 Hours</div>
137
  </div>
138
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
139
+ <div class="text-blue-800 font-bold">2 Bells</div>
140
+ <div class="text-sm text-blue-600">2:00 Hours</div>
141
  </div>
142
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
143
+ <div class="text-blue-800 font-bold">3 Bells</div>
144
+ <div class="text-sm text-blue-600">2:30 Hours</div>
 
 
 
 
 
145
  </div>
146
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
147
+ <div class="text-blue-800 font-bold">4 Bells</div>
148
+ <div class="text-sm text-blue-600">3:00 Hours</div>
149
  </div>
150
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
151
+ <div class="text-blue-800 font-bold">5 Bells</div>
152
+ <div class="text-sm text-blue-600">3:30 Hours</div>
 
 
 
 
 
153
  </div>
154
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
155
+ <div class="text-blue-800 font-bold">6 Bells</div>
156
+ <div class="text-sm text-blue-600">4:00 Hours</div>
157
  </div>
158
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
159
+ <div class="text-blue-800 font-bold">7 Bells</div>
160
+ <div class="text-sm text-blue-600">4:30 Hours</div>
 
 
 
 
 
161
  </div>
162
+ <div class="bg-blue-100 p-3 rounded-lg text-center">
163
+ <div class="text-blue-800 font-bold">8 Bells</div>
164
+ <div class="text-sm text-blue-600">5:00 Hours</div>
165
  </div>
 
166
  </div>
167
  </div>
168
 
169
+ <div class="bg-white border border-gray-200 rounded-lg p-4">
170
+ <h3 class="font-semibold mb-2">Current Bell Costs</h3>
171
+ <div class="space-y-2">
172
+ <div class="flex justify-between">
173
+ <span class="text-gray-600">1 Bell:</span>
174
+ <span class="font-medium">10 AQUAPOD</span>
175
  </div>
176
+ <div class="flex justify-between">
177
+ <span class="text-gray-600">2 Bells:</span>
178
+ <span class="font-medium">15 AQUAPOD</span>
179
+ </div>
180
+ <div class="flex justify-between">
181
+ <span class="text-gray-600">3 Bells:</span>
182
+ <span class="font-medium">20 AQUAPOD</span>
183
+ </div>
184
+ <div class="flex justify-between">
185
+ <span class="text-gray-600">4 Bells:</span>
186
+ <span class="font-medium">25 AQUAPOD</span>
187
+ </div>
188
+ <div class="flex justify-between">
189
+ <span class="text-gray-600">5 Bells:</span>
190
+ <span class="font-medium">30 AQUAPOD</span>
191
+ </div>
192
+ <div class="flex justify-between">
193
+ <span class="text-gray-600">6 Bells:</span>
194
+ <span class="font-medium">35 AQUAPOD</span>
195
+ </div>
196
+ <div class="flex justify-between">
197
+ <span class="text-gray-600">7 Bells:</span>
198
+ <span class="font-medium">40 AQUAPOD</span>
199
+ </div>
200
+ <div class="flex justify-between">
201
+ <span class="text-gray-600">8 Bells:</span>
202
+ <span class="font-medium">45 AQUAPOD</span>
203
  </div>
 
204
  </div>
205
  </div>
206
  </div>
 
208
 
209
  <div id="defi-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
210
  <div class="flex justify-between items-center mb-6">
211
+ <h2 class="text-2xl font-bold">DeFi Exchange Rates</h2>
212
  <button id="close-defi" class="text-gray-500 hover:text-gray-700">
213
  <i class="fas fa-times text-xl"></i>
214
  </button>
 
259
  <span class="text-gray-600">1 AQUAPOD =</span>
260
  <span class="font-medium">0.00015 BCH</span>
261
  </div>
262
+ <div class="flex justify-between">
263
+ <span class="text-gray-600">1 XLM =</span>
264
+ <span class="font-medium">4 AQUAPOD</span>
265
+ </div>
266
+ <div class="flex justify-between">
267
+ <span class="text-gray-600">1 BCH =</span>
268
+ <span class="font-medium">6666.67 AQUAPOD</span>
269
+ </div>
270
  </div>
271
  </div>
272
 
 
277
  </div>
278
  </div>
279
 
280
+ <div id="broadcast-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;">
281
  <div class="flex justify-between items-center mb-6">
282
+ <h2 class="text-2xl font-bold">Community Broadcast</h2>
283
+ <button id="close-broadcast" class="text-gray-500 hover:text-gray-700">
284
  <i class="fas fa-times text-xl"></i>
285
  </button>
286
  </div>
287
 
288
  <div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4">
289
+ <div class="bg-gray-50 p-4 rounded-lg text-center">
290
+ <p class="text-gray-600 mb-4">Record a message that will be transmitted to the community support line:</p>
291
+ <p class="font-semibold text-blue-600 mb-2"><i class="fas fa-phone-alt mr-2"></i>+1 (555) 123-4567</p>
 
 
292
 
293
+ <div id="recording-status" class="hidden bg-red-100 text-red-800 p-2 rounded-lg mb-4">
294
+ <i class="fas fa-circle mr-2"></i> Recording in progress...
 
295
  </div>
296
 
297
+ <div id="transcription-result" class="hidden bg-blue-50 p-4 rounded-lg mb-4 text-left">
298
+ <h4 class="font-semibold mb-2">Your message:</h4>
299
+ <p id="transcription-text" class="text-gray-700"></p>
300
  </div>
301
 
302
+ <button id="record-btn" class="w-20 h-20 bg-red-500 text-white rounded-full flex items-center justify-center shadow-lg mx-auto mb-4 hover:bg-red-600 transition">
303
+ <i class="fas fa-microphone text-2xl"></i>
304
  </button>
305
+
306
+ <p class="text-sm text-gray-500">Press and hold to record your message</p>
307
+
308
+ <div class="mt-6">
309
+ <button id="send-btn" class="w-full bg-purple-600 text-white py-3 rounded-lg font-semibold hover:bg-purple-700 transition disabled:opacity-50" disabled>
310
+ Send Broadcast Message
311
+ </button>
312
+ </div>
313
+ </div>
314
 
315
+ <div class="bg-white border border-gray-200 rounded-lg p-4">
316
+ <h3 class="font-semibold mb-2">Recent Broadcasts</h3>
317
+ <div class="space-y-3">
318
+ <div class="border-b border-gray-100 pb-3">
319
+ <div class="flex justify-between text-sm text-gray-500 mb-1">
320
+ <span>Yesterday, 3:42 PM</span>
321
+ <span>Sent to +1 (555) 123-4567</span>
322
+ </div>
323
+ <p class="text-gray-700">"Need assistance with water filtration system on pod #42"</p>
324
+ </div>
325
+ <div class="border-b border-gray-100 pb-3">
326
+ <div class="flex justify-between text-sm text-gray-500 mb-1">
327
+ <span>Today, 10:15 AM</span>
328
+ <span>Sent to +1 (555) 123-4567</span>
329
+ </div>
330
+ <p class="text-gray-700">"Reporting a leak in the communal area near docking station 3"</p>
331
+ </div>
332
+ </div>
333
  </div>
334
  </div>
335
  </div>
 
398
 
399
  // Update UI
400
  document.getElementById('bell-count').textContent = currentBell.bells;
401
+ document.getElementById('bell-badge').textContent = currentBell.bells;
402
  document.getElementById('bell-time').textContent = formatTime(currentBell.time);
403
  document.getElementById('bell-duration').textContent = `${currentBell.bells} Bell${currentBell.bells > 1 ? 's' : ''} (${currentBell.duration})`;
404
 
 
438
  // Floating panel controls
439
  const servicesBtn = document.getElementById('services-btn');
440
  const defiBtn = document.getElementById('defi-btn');
441
+ const broadcastBtn = document.getElementById('broadcast-btn');
442
 
443
  const servicesPanel = document.getElementById('services-panel');
444
  const defiPanel = document.getElementById('defi-panel');
445
+ const broadcastPanel = document.getElementById('broadcast-panel');
446
 
447
  const closeServices = document.getElementById('close-services');
448
  const closeDefi = document.getElementById('close-defi');
449
+ const closeBroadcast = document.getElementById('close-broadcast');
450
 
451
  // Toggle panels
452
  servicesBtn.addEventListener('click', () => {
453
  servicesPanel.classList.remove('closed');
454
  defiPanel.classList.add('closed');
455
+ broadcastPanel.classList.add('closed');
456
  });
457
 
458
  defiBtn.addEventListener('click', () => {
459
  defiPanel.classList.remove('closed');
460
  servicesPanel.classList.add('closed');
461
+ broadcastPanel.classList.add('closed');
462
  });
463
 
464
+ broadcastBtn.addEventListener('click', () => {
465
+ broadcastPanel.classList.remove('closed');
466
  servicesPanel.classList.add('closed');
467
  defiPanel.classList.add('closed');
468
  });
 
476
  defiPanel.classList.add('closed');
477
  });
478
 
479
+ closeBroadcast.addEventListener('click', () => {
480
+ broadcastPanel.classList.add('closed');
481
  });
482
 
483
  // Close panels when clicking outside
 
490
  defiPanel.classList.add('closed');
491
  }
492
 
493
+ if (!broadcastPanel.contains(e.target) && e.target !== broadcastBtn) {
494
+ broadcastPanel.classList.add('closed');
495
+ }
496
+ });
497
+
498
+ // Broadcast recording functionality
499
+ const recordBtn = document.getElementById('record-btn');
500
+ const recordingStatus = document.getElementById('recording-status');
501
+ const transcriptionResult = document.getElementById('transcription-result');
502
+ const transcriptionText = document.getElementById('transcription-text');
503
+ const sendBtn = document.getElementById('send-btn');
504
+
505
+ let isRecording = false;
506
+ let recordingTimeout;
507
+ let recordedMessage = "";
508
+
509
+ recordBtn.addEventListener('mousedown', startRecording);
510
+ recordBtn.addEventListener('touchstart', startRecording);
511
+
512
+ recordBtn.addEventListener('mouseup', stopRecording);
513
+ recordBtn.addEventListener('touchend', stopRecording);
514
+ recordBtn.addEventListener('mouseleave', stopRecording);
515
+
516
+ function startRecording(e) {
517
+ e.preventDefault();
518
+ if (!isRecording) {
519
+ isRecording = true;
520
+ recordBtn.classList.add('recording');
521
+ recordingStatus.classList.remove('hidden');
522
+ transcriptionResult.classList.add('hidden');
523
+ sendBtn.disabled = true;
524
+
525
+ // Simulate recording for 3 seconds
526
+ recordingTimeout = setTimeout(() => {
527
+ stopRecording(e);
528
+
529
+ // Simulate transcription result
530
+ recordedMessage = "This is a simulated transcription of your recorded message about the Aquapod community.";
531
+ transcriptionText.textContent = recordedMessage;
532
+ transcriptionResult.classList.remove('hidden');
533
+ sendBtn.disabled = false;
534
+ }, 3000);
535
+ }
536
+ }
537
+
538
+ function stopRecording(e) {
539
+ e.preventDefault();
540
+ if (isRecording) {
541
+ isRecording = false;
542
+ clearTimeout(recordingTimeout);
543
+ recordBtn.classList.remove('recording');
544
+ recordingStatus.classList.add('hidden');
545
+ }
546
+ }
547
+
548
+ sendBtn.addEventListener('click', () => {
549
+ if (recordedMessage) {
550
+ alert(`Message sent to community support: "${recordedMessage}"`);
551
+ sendBtn.disabled = true;
552
+
553
+ // Add to recent broadcasts
554
+ const now = new Date();
555
+ const timeString = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
556
+
557
+ const recentBroadcasts = document.querySelector('#broadcast-panel .bg-white.border');
558
+ const newBroadcast = document.createElement('div');
559
+ newBroadcast.className = 'border-b border-gray-100 pb-3';
560
+ newBroadcast.innerHTML = `
561
+ <div class="flex justify-between text-sm text-gray-500 mb-1">
562
+ <span>Just now</span>
563
+ <span>Sent to +1 (555) 123-4567</span>
564
+ </div>
565
+ <p class="text-gray-700">"${recordedMessage}"</p>
566
+ `;
567
+
568
+ recentBroadcasts.insertBefore(newBroadcast, recentBroadcasts.firstChild);
569
  }
570
  });
571
  </script>