chore: autoformat in action

This commit is contained in:
Joao P Dubas 2024-06-20 16:59:40 +00:00
parent beb91aabe0
commit ffe444d912
No known key found for this signature in database
2 changed files with 20 additions and 4 deletions

View file

@ -391,10 +391,12 @@ defmodule LiveBeatsWeb.CoreComponents do
attr :rest, :global attr :rest, :global
slot :title slot :title
slot :confirm do slot :confirm do
attr :type, :string attr :type, :string
attr :form, :string attr :form, :string
end end
slot :cancel slot :cancel
def modal(assigns) do def modal(assigns) do
@ -532,11 +534,19 @@ defmodule LiveBeatsWeb.CoreComponents do
def button(%{patch: _} = assigns) do def button(%{patch: _} = assigns) do
~H""" ~H"""
<%= if @primary do %> <%= if @primary do %>
<.link patch={@patch} class="order-0 inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:order-1 sm:ml-3" {@rest}> <.link
patch={@patch}
class="order-0 inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:order-1 sm:ml-3"
{@rest}
>
<%= render_slot(@inner_block) %> <%= render_slot(@inner_block) %>
</.link> </.link>
<% else %> <% else %>
<.link patch={@patch} class="order-1 inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:order-0 sm:ml-0 lg:ml-3" {assigns_to_attributes(assigns, [:primary, :patch])}> <.link
patch={@patch}
class="order-1 inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:order-0 sm:ml-0 lg:ml-3"
{assigns_to_attributes(assigns, [:primary, :patch])}
>
<%= render_slot(@inner_block) %> <%= render_slot(@inner_block) %>
</.link> </.link>
<% end %> <% end %>

View file

@ -37,7 +37,8 @@ defmodule LiveBeatsWeb.ProfileLive do
</span> </span>
</div> </div>
<.link href={@profile.external_homepage_url} target="_blank" class="text-sm text-gray-600"> <.link href={@profile.external_homepage_url} target="_blank" class="text-sm text-gray-600">
<.icon name={:code_bracket} /> <span class=""><%= url_text(@profile.external_homepage_url) %></span> <.icon name={:code_bracket} />
<span class=""><%= url_text(@profile.external_homepage_url) %></span>
</.link> </.link>
</div> </div>
<:actions> <:actions>
@ -150,7 +151,12 @@ defmodule LiveBeatsWeb.ProfileLive do
> >
<span :if={song.status == :playing} class="flex pt-1 relative mr-2 w-4"> <span :if={song.status == :playing} class="flex pt-1 relative mr-2 w-4">
<span class="w-3 h-3 animate-ping bg-purple-400 rounded-full absolute"></span> <span class="w-3 h-3 animate-ping bg-purple-400 rounded-full absolute"></span>
<.icon name={:speaker_wave} class="h-5 w-5 -mt-1 -ml-1" aria-label="Playing" role="button" /> <.icon
name={:speaker_wave}
class="h-5 w-5 -mt-1 -ml-1"
aria-label="Playing"
role="button"
/>
</span> </span>
<span :if={song.status == :paused} class="flex pt-1 relative mr-2 w-4"> <span :if={song.status == :paused} class="flex pt-1 relative mr-2 w-4">
<.icon <.icon