mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-22 16:10:59 +00:00
Resolve conflicts
This commit is contained in:
commit
198846433b
2 changed files with 10 additions and 6 deletions
|
@ -120,6 +120,7 @@ defmodule LiveBeatsWeb.LiveHelpers do
|
||||||
assigns
|
assigns
|
||||||
|> assign_new(:outlined, fn -> false end)
|
|> assign_new(:outlined, fn -> false end)
|
||||||
|> assign_new(:class, fn -> "w-4 h-4 inline-block" end)
|
|> assign_new(:class, fn -> "w-4 h-4 inline-block" end)
|
||||||
|
|> assign_new(:alt, fn -> "" end)
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<%= if @outlined do %>
|
<%= if @outlined do %>
|
||||||
|
|
|
@ -49,15 +49,15 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- prev -->
|
<!-- prev -->
|
||||||
<button type="button" class="sm:block xl:block mx-auto scale-75" phx-click={js_prev(@own_profile?)}>
|
<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">
|
<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>
|
||||||
<!-- /prev -->
|
<!-- /prev -->
|
||||||
|
|
||||||
<!-- pause -->
|
<!-- play/pause -->
|
||||||
<button type="button" class="mx-auto scale-75" phx-click={js_play_pause(@own_profile?)}>
|
<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">
|
<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" />
|
||||||
|
@ -70,10 +70,10 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
</svg>
|
</svg>
|
||||||
<% end %>
|
<% end %>
|
||||||
</button>
|
</button>
|
||||||
<!-- /pause -->
|
<!-- /play/pause -->
|
||||||
|
|
||||||
<!-- next -->
|
<!-- next -->
|
||||||
<button type="button" class="mx-auto scale-75" phx-click={js_next(@own_profile?)}>
|
<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">
|
<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" />
|
||||||
|
@ -221,7 +221,10 @@ defmodule LiveBeatsWeb.PlayerLive do
|
||||||
{:noreply, play_current_song(socket)}
|
{:noreply, play_current_song(socket)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_info({Accounts, %Accounts.Events.ActiveProfileChanged{new_profile_user_id: user_id}}, socket) do
|
def handle_info(
|
||||||
|
{Accounts, %Accounts.Events.ActiveProfileChanged{new_profile_user_id: user_id}},
|
||||||
|
socket
|
||||||
|
) do
|
||||||
if user_id do
|
if user_id do
|
||||||
{:noreply, assign(socket, profile: get_profile(user_id))}
|
{:noreply, assign(socket, profile: get_profile(user_id))}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue