mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-25 09:20:59 +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,38 +48,47 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
<div class="mx-auto flex"></div>
|
<div class="mx-auto flex"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- prev -->
|
<%= if is_nil(@profile) or @own_profile? do %>
|
||||||
<button type="button" class="sm:block xl:block mx-auto scale-75" phx-click={js_prev(@own_profile?)} aria-label="Previous">
|
<!-- prev -->
|
||||||
<svg width="17" height="18" aria-hidden="true">
|
<button type="button" class="sm:block xl:block mx-auto scale-75" phx-click={js_prev(@own_profile?)} aria-label="Previous">
|
||||||
<path d="M0 0h2v18H0V0zM4 9l13-9v18L4 9z" fill="currentColor" />
|
<svg width="17" height="18">
|
||||||
</svg>
|
<path d="M0 0h2v18H0V0zM4 9l13-9v18L4 9z" fill="currentColor" />
|
||||||
</button>
|
|
||||||
<!-- /prev -->
|
|
||||||
|
|
||||||
<!-- 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}>
|
|
||||||
<%= if @playing do %>
|
|
||||||
<svg id="player-pause" width="50" height="50" fill="none" aria-hidden="true">
|
|
||||||
<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" />
|
|
||||||
</svg>
|
</svg>
|
||||||
<% else %>
|
</button>
|
||||||
<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">
|
<!-- /prev -->
|
||||||
<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"/>
|
|
||||||
</svg>
|
|
||||||
<% end %>
|
|
||||||
</button>
|
|
||||||
<!-- /play/pause -->
|
|
||||||
|
|
||||||
<!-- next -->
|
<!-- play/pause -->
|
||||||
<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_play_pause(@own_profile?)} aria-label={if @playing do "Pause" else "Play" end}>
|
||||||
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" aria-hidden="true">
|
<%= if @playing do %>
|
||||||
<path d="M17 0H15V18H17V0Z" fill="currentColor" />
|
<svg id="player-pause" width="50" height="50" fill="none">
|
||||||
<path d="M13 9L0 0V18L13 9Z" fill="currentColor" />
|
<circle class="text-gray-300 dark:text-gray-500" cx="25" cy="25" r="24" stroke="currentColor" stroke-width="1.5" />
|
||||||
</svg>
|
<path d="M18 16h4v18h-4V16zM28 16h4v18h-4z" fill="currentColor" />
|
||||||
</button>
|
</svg>
|
||||||
<!-- next -->
|
<% 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">
|
||||||
|
<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"/>
|
||||||
|
</svg>
|
||||||
|
<% end %>
|
||||||
|
</button>
|
||||||
|
<!-- /play/pause -->
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
<path d="M17 0H15V18H17V0Z" fill="currentColor" />
|
||||||
|
<path d="M13 9L0 0V18L13 9Z" fill="currentColor" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<!-- 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