Skip to content

Commit 385c906

Browse files
authored
Merge pull request #12 from elixir-webrtc/suggestions-v2
Suggestions v2
2 parents 0db2d9a + 5c1785d commit 385c906

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

lib/live_ex_webrtc/core_components.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ defmodule LiveExWebRTC.CoreComponents do
8080
class="-m-3 flex-none p-3 opacity-20 hover:opacity-40"
8181
aria-label="close"
8282
>
83-
<.icon name="hero-x-mark-solid" class="h-5 w-5" />
83+
<.icon name="hero-x-mark-solid" class="h-5 w-5 dark:text-indigo-400" />
8484
</button>
8585
</div>
8686
<div id={"#{@id}-content"}>

lib/live_ex_webrtc/publisher.ex

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,13 @@ defmodule LiveExWebRTC.Publisher do
274274
@impl true
275275
def render(assigns) do
276276
~H"""
277-
<div id={@publisher.id} phx-hook="Publisher" class="h-full w-full flex flex-col justify-end gap-4">
277+
<div
278+
id={@publisher.id}
279+
phx-hook="Publisher"
280+
class="h-full w-full flex flex-col justify-end gap-4 dark:bg-stone-900"
281+
>
278282
<div class="flex gap-4">
279-
<div class="flex-1 flex flex-col gap-2">
283+
<div class="flex-[3_1_0%] flex flex-col gap-2">
280284
<div class="w-full h-full">
281285
<video
282286
id="lex-preview-player"
@@ -287,18 +291,18 @@ defmodule LiveExWebRTC.Publisher do
287291
>
288292
</video>
289293
</div>
290-
<div class="flex flex-col items-stretch gap-4">
294+
<div class={"flex flex-col items-stretch gap-4 #{if @publisher.streaming?, do: "text-gray-400", else: "text-indigo-400"}"}>
291295
<div
292296
id="lex-audio-devices-wrapper"
293297
class="flex gap-2 items-center relative"
294298
phx-update="ignore"
295299
>
296300
<label for="lex-audio-devices" class="absolute left-3 top-[5px] pointer-events-none">
297-
<.icon name="hero-microphone" class="w-4 h-4 dark:text-indigo-400" />
301+
<span class="hero-microphone w-4 h-4" />
298302
</label>
299303
<select
300304
id="lex-audio-devices"
301-
class="pl-9 w-full rounded-lg text-sm border-indigo-200 disabled:text-gray-400 disabled:border-gray-400 focus:border-indigo-900 focus:outline-none focus:ring-0 dark:bg-transparent dark:text-indigo-400 dark:border-indigo-400"
305+
class="pl-9 w-full rounded-lg text-sm border-indigo-200 text-indigo-800 disabled:text-gray-400 disabled:border-gray-400 focus:border-indigo-200 focus:outline-none focus:ring-0 dark:bg-transparent dark:text-indigo-400 dark:border-indigo-400"
302306
>
303307
</select>
304308
</div>
@@ -308,19 +312,19 @@ defmodule LiveExWebRTC.Publisher do
308312
phx-update="ignore"
309313
>
310314
<label for="lex-video-devices" class="absolute left-3 top-[5px] pointer-events-none">
311-
<.icon name="hero-video-camera" class="w-4 h-4 dark:text-indigo-400" />
315+
<.icon name="hero-video-camera" class="w-4 h-4" />
312316
</label>
313317
<select
314318
id="lex-video-devices"
315-
class="pl-9 w-full rounded-lg text-sm border-indigo-200 disabled:text-gray-400 disabled:border-gray-400 focus:border-indigo-900 focus:outline-none focus:ring-0 dark:bg-transparent dark:text-indigo-400 dark:border-indigo-400"
319+
class="pl-9 w-full rounded-lg text-sm border-indigo-200 text-indigo-800 disabled:text-gray-400 disabled:border-gray-400 focus:border-indigo-200 focus:outline-none focus:ring-0 dark:bg-transparent dark:text-indigo-400 dark:border-indigo-400"
316320
>
317321
</select>
318322
</div>
319323
</div>
320324
</div>
321325
<div
322326
class={
323-
"flex-1 rounded-lg border border-indigo-200 dark:border-zinc-800 #{if @publisher.streaming?, do: "dark:text-neutral-200", else: "dark:text-neutral-600"}"
327+
"flex-[2_1_0%] rounded-lg border border-indigo-200 dark:border-zinc-800 #{if @publisher.streaming?, do: "text-black dark:text-neutral-200", else: "text-neutral-400 dark:text-neutral-600"}"
324328
}
325329
id="lex-stats"
326330
>
@@ -394,7 +398,7 @@ defmodule LiveExWebRTC.Publisher do
394398
<div class="w-11 h-6 bg-gray-300 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500 rounded-full peer peer-checked:after:translate-x-5 peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-500 peer-disabled:opacity-50">
395399
</div>
396400
</label>
397-
<label for="lex-record-stream" class="text-xs text-nowrap dark:text-indigo-400">
401+
<label for="lex-record-stream" class="text-xs text-nowrap dark:text-neutral-200">
398402
Record stream
399403
</label>
400404
</form>

0 commit comments

Comments
 (0)