@@ -230,27 +230,43 @@ defmodule LiveExWebRTC.Player do
230
230
>
231
231
</ video >
232
232
233
- < div class = { "z-40 absolute top-0 left-0 #{ @ display_settings } w-full h-full opacity-75 bg-black" } >
234
- < div class = "p-4 flex flex-row " >
235
- < div class = "flex flex-col h-full gap-4 border-r-4 py-4 px-4 pr-8 font-bold text-white " >
236
- < span class = "cursor-pointer " > Video Quality </ span >
237
- < span class = "cursor-pointer " phx-click = "toggle-settings " > Exit</ span >
238
- </ div >
239
- < div class = "py-4 px-8 pr-4 " >
240
- < select id = "lexp-video-quality " class = "z-40 " >
233
+ < div class = { [
234
+ "w-full h-full absolute top-0 left-0 z-40 flex items-center justify-center bg-black/30" ,
235
+ @ display_settings
236
+ ] } >
237
+ < div
238
+ class = "p-8 pr-12 bg-stone-900/90 h-fit rounded-lg relative "
239
+ phx-click-away = "toggle-settings "
240
+ >
241
+ < div class = "flex gap-4 items-center " >
242
+ < label class = "cursor-pointer text-white text-nowrap text-sm " for = "lexp-video-quality " >
243
+ Video Quality
244
+ </ label >
245
+ < select
246
+ id = "lexp-video-quality "
247
+ class = "rounded-lg text-sm disabled:text-gray-400 disabled:border-gray-400 focus:outline-none focus:ring-0 bg-transparent text-indigo-400 border-indigo-400 focus:border-indigo-400 min-w-[128px] "
248
+ >
241
249
<%= for { id , layer } <- @ player . video_layers do %>
242
250
< option :if = { id == @ player . layer } value = { id } selected > { layer } </ option >
243
251
< option :if = { id != @ player . layer } value = { id } > { layer } </ option >
244
252
<% end %>
245
253
</ select >
246
254
</ div >
255
+ < button
256
+ class = "top-2 right-2 absolute p-2 hover:bg-stone-800 rounded-lg "
257
+ phx-click = "toggle-settings "
258
+ >
259
+ < span class = "hero-x-mark block w-4 h-4 text-white " />
260
+ </ button >
247
261
</ div >
248
262
</ div >
249
263
250
- < span
264
+ < button
251
265
phx-click = "toggle-settings "
252
- class = "hero-cog-8-tooth text-white w-16 h-16 absolute top-[50%] left-[50%] translate-y-[-75%] translate-x-[-50%] transform duration-300 ease-in-out group-hover:visible invisible transition-opacity opacity-0 group-hover:opacity-100 "
253
- />
266
+ class = "absolute top-6 left-6 duration-300 ease-in-out group-hover:visible invisible transition-opacity opacity-0 group-hover:opacity-100 rounded-lg hover:bg-stone-800 p-2 "
267
+ >
268
+ < span class = "hero-cog-8-tooth text-white w-6 h-6 block " />
269
+ </ button >
254
270
</ div >
255
271
</ div >
256
272
"""
0 commit comments