@@ -235,7 +235,7 @@ impl Component for AttendantsComponent {
235
235
) ;
236
236
237
237
html ! {
238
- <div id="main-container" >
238
+ <div id="main-container" class= "meeting-page" >
239
239
<div id="grid-container" style={ if self . peer_list_open { "width: 80%;" } else { "width: 100%;" } } >
240
240
{ self . error. as_ref( ) . map( |error| html! { <p>{ error } </p> } ) }
241
241
{ rows }
@@ -244,26 +244,127 @@ impl Component for AttendantsComponent {
244
244
html! {
245
245
<nav class="host" >
246
246
<div class="controls" >
247
- <button
248
- class="bg-yew-blue p-2 rounded-md text-white"
249
- onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleScreenShare ) } >
250
- { if self . share_screen { "Stop Screen Share" } else { "Share Screen" } }
251
- </button>
252
- <button
253
- class="bg-yew-blue p-2 rounded-md text-white"
254
- onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleVideoOnOff ) } >
255
- { if !self . video_enabled { "Start Video" } else { "Stop Video" } }
256
- </button>
257
- <button
258
- class="bg-yew-blue p-2 rounded-md text-white"
259
- onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleMicMute ) } >
260
- { if !self . mic_enabled { "Unmute" } else { "Mute" } }
261
- </button>
262
- <button
263
- class="bg-yew-blue p-2 rounded-md text-white"
264
- onclick={ toggle_peer_list. clone( ) } >
265
- { if !self . peer_list_open { "Open Peers" } else { "Close Peers" } }
266
- </button>
247
+ <nav class="video-controls-container" >
248
+ <button
249
+ class={ classes!( "video-control-button" , self . mic_enabled. then_some( "active" ) ) }
250
+ onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleMicMute ) } >
251
+ {
252
+ if self . mic_enabled {
253
+ html! {
254
+ <>
255
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
256
+ <path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z" ></path>
257
+ <path d="M19 10v2a7 7 0 0 1-14 0v-2" ></path>
258
+ <line x1="12" y1="19" x2="12" y2="22" ></line>
259
+ </svg>
260
+ <span class="tooltip" >{ "Mute" } </span>
261
+ </>
262
+ }
263
+ } else {
264
+ html! {
265
+ <>
266
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
267
+ <line x1="1" y1="1" x2="23" y2="23" ></line>
268
+ <path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V5a3 3 0 0 0-5.94-.6" ></path>
269
+ <path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23" ></path>
270
+ <line x1="12" y1="19" x2="12" y2="22" ></line>
271
+ </svg>
272
+ <span class="tooltip" >{ "Unmute" } </span>
273
+ </>
274
+ }
275
+ }
276
+ }
277
+ </button>
278
+ <button
279
+ class={ classes!( "video-control-button" , self . video_enabled. then_some( "active" ) ) }
280
+ onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleVideoOnOff ) } >
281
+ {
282
+ if self . video_enabled {
283
+ html! {
284
+ <>
285
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
286
+ <polygon points="23 7 16 12 23 17 23 7" ></polygon>
287
+ <rect x="1" y="5" width="15" height="14" rx="2" ry="2" ></rect>
288
+ </svg>
289
+ <span class="tooltip" >{ "Stop Video" } </span>
290
+ </>
291
+ }
292
+ } else {
293
+ html! {
294
+ <>
295
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
296
+ <path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10" ></path>
297
+ <line x1="1" y1="1" x2="23" y2="23" ></line>
298
+ </svg>
299
+ <span class="tooltip" >{ "Start Video" } </span>
300
+ </>
301
+ }
302
+ }
303
+ }
304
+ </button>
305
+ <button
306
+ class={ classes!( "video-control-button" , self . share_screen. then_some( "active" ) ) }
307
+ onclick={ ctx. link( ) . callback( |_| MeetingAction :: ToggleScreenShare ) } >
308
+ {
309
+ if self . share_screen {
310
+ html! {
311
+ <>
312
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
313
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2" ></rect>
314
+ <line x1="8" y1="21" x2="16" y2="21" ></line>
315
+ <line x1="12" y1="17" x2="12" y2="21" ></line>
316
+ </svg>
317
+ <span class="tooltip" >{ "Stop Screen Share" } </span>
318
+ </>
319
+ }
320
+ } else {
321
+ html! {
322
+ <>
323
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
324
+ <path d="M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3" ></path>
325
+ <polyline points="8 21 12 17 16 21" ></polyline>
326
+ <polyline points="16 7 20 7 20 3" ></polyline>
327
+ <line x1="10" y1="14" x2="21" y2="3" ></line>
328
+ </svg>
329
+ <span class="tooltip" >{ "Share Screen" } </span>
330
+ </>
331
+ }
332
+ }
333
+ }
334
+ </button>
335
+ <button
336
+ class={ classes!( "video-control-button" , self . peer_list_open. then_some( "active" ) ) }
337
+ onclick={ toggle_peer_list. clone( ) } >
338
+ {
339
+ if self . peer_list_open {
340
+ html! {
341
+ <>
342
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
343
+ <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" ></path>
344
+ <circle cx="9" cy="7" r="4" ></circle>
345
+ <path d="M23 21v-2a4 4 0 0 0-3-3.87" ></path>
346
+ <path d="M16 3.13a4 4 0 0 1 0 7.75" ></path>
347
+ <line x1="1" y1="1" x2="23" y2="23" ></line>
348
+ </svg>
349
+ <span class="tooltip" >{ "Close Peers" } </span>
350
+ </>
351
+ }
352
+ } else {
353
+ html! {
354
+ <>
355
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" >
356
+ <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" ></path>
357
+ <circle cx="9" cy="7" r="4" ></circle>
358
+ <path d="M23 21v-2a4 4 0 0 0-3-3.87" ></path>
359
+ <path d="M16 3.13a4 4 0 0 1 0 7.75" ></path>
360
+ </svg>
361
+ <span class="tooltip" >{ "Open Peers" } </span>
362
+ </>
363
+ }
364
+ }
365
+ }
366
+ </button>
367
+ </nav>
267
368
</div>
268
369
{
269
370
if media_access_granted {
0 commit comments