mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-22 08:01:00 +00:00
show stop button when listening someone else playlist
This commit is contained in:
parent
0e0d349e31
commit
e5c663ab38
1 changed files with 39 additions and 30 deletions
|
@ -48,9 +48,10 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
<div class="mx-auto flex"></div>
|
<div class="mx-auto flex"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= if is_nil(@profile) or @own_profile? do %>
|
||||||
<!-- prev -->
|
<!-- prev -->
|
||||||
<button type="button" class="sm:block xl:block mx-auto scale-75" phx-click={js_prev(@own_profile?)} aria-label="Previous">
|
<button type="button" class="sm:block xl:block mx-auto scale-75" phx-click={js_prev(@own_profile?)} aria-label="Previous">
|
||||||
<svg width="17" height="18" aria-hidden="true">
|
<svg width="17" height="18">
|
||||||
<path d="M0 0h2v18H0V0zM4 9l13-9v18L4 9z" fill="currentColor" />
|
<path d="M0 0h2v18H0V0zM4 9l13-9v18L4 9z" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
@ -59,12 +60,12 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
<!-- play/pause -->
|
<!-- play/pause -->
|
||||||
<button type="button" class="mx-auto scale-75" phx-click={js_play_pause(@own_profile?)} aria-label={if @playing do "Pause" else "Play" end}>
|
<button type="button" class="mx-auto scale-75" phx-click={js_play_pause(@own_profile?)} aria-label={if @playing do "Pause" else "Play" end}>
|
||||||
<%= if @playing do %>
|
<%= if @playing do %>
|
||||||
<svg id="player-pause" width="50" height="50" fill="none" aria-hidden="true">
|
<svg id="player-pause" width="50" height="50" fill="none">
|
||||||
<circle class="text-gray-300 dark:text-gray-500" cx="25" cy="25" r="24" stroke="currentColor" stroke-width="1.5" />
|
<circle class="text-gray-300 dark:text-gray-500" cx="25" cy="25" r="24" stroke="currentColor" stroke-width="1.5" />
|
||||||
<path d="M18 16h4v18h-4V16zM28 16h4v18h-4z" fill="currentColor" />
|
<path d="M18 16h4v18h-4V16zM28 16h4v18h-4z" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
<% else %>
|
<% else %>
|
||||||
<svg id="player-play" width="50" height="50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
<svg id="player-play" width="50" height="50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<circle id="svg_1" stroke-width="0.8" stroke="currentColor" r="11.4" cy="12" cx="12" class="text-gray-300 dark:text-gray-500"/>
|
<circle id="svg_1" stroke-width="0.8" stroke="currentColor" r="11.4" cy="12" cx="12" class="text-gray-300 dark:text-gray-500"/>
|
||||||
<path stroke="null" fill="currentColor" transform="rotate(90 12.8947 12.3097)" id="svg_6" d="m9.40275,15.10014l3.49194,-5.58088l3.49197,5.58088l-6.98391,0z" stroke-width="1.5" fill="none"/>
|
<path stroke="null" fill="currentColor" transform="rotate(90 12.8947 12.3097)" id="svg_6" d="m9.40275,15.10014l3.49194,-5.58088l3.49197,5.58088l-6.98391,0z" stroke-width="1.5" fill="none"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -74,12 +75,20 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
|
|
||||||
<!-- next -->
|
<!-- next -->
|
||||||
<button type="button" class="mx-auto scale-75" phx-click={js_next(@own_profile?)} aria-label="Next">
|
<button type="button" class="mx-auto scale-75" phx-click={js_next(@own_profile?)} aria-label="Next">
|
||||||
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" aria-hidden="true">
|
<svg width="17" height="18" viewBox="0 0 17 18" fill="none">
|
||||||
<path d="M17 0H15V18H17V0Z" fill="currentColor" />
|
<path d="M17 0H15V18H17V0Z" fill="currentColor" />
|
||||||
<path d="M13 9L0 0V18L13 9Z" fill="currentColor" />
|
<path d="M13 9L0 0V18L13 9Z" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<!-- next -->
|
<!-- next -->
|
||||||
|
<% else %>
|
||||||
|
<button type="button" class="mx-auto scale-75"></button>
|
||||||
|
<!-- stop button -->
|
||||||
|
<button type="button" class="mx-auto scale-75" phx-click={JS.push("switch_profile", value: %{user_id: nil}, target: "#player", loading: "#player")}>
|
||||||
|
<.icon name={:stop} class="h-12 w-12"/>
|
||||||
|
</button>
|
||||||
|
<!-- stop button -->
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.modal
|
<.modal
|
||||||
|
|
Loading…
Reference in a new issue