upgrade to phoenix 1.7

This commit is contained in:
2023-04-14 23:34:11 -04:00
parent 1796fb822f
commit 1037f37be2
138 changed files with 2304 additions and 2252 deletions

View File

@ -48,15 +48,12 @@
<div class="flex flex-col justify-center items-center">
<div class="flex flex-wrap justify-center items-center text-primary-600">
<.link
navigate={Routes.type_show_path(Endpoint, :show, @pack.type)}
class="mx-4 my-2 btn btn-primary"
>
<.link navigate={~p"/type/#{@pack.type}"} class="mx-4 my-2 btn btn-primary">
<%= dgettext("actions", "View in Catalog") %>
</.link>
<.link
patch={Routes.pack_show_path(Endpoint, :edit, @pack)}
patch={~p"/ammo/show/edit/#{@pack}"}
class="mx-4 my-2 text-primary-600 link"
aria-label={
dgettext("actions", "Edit pack of %{pack_count} bullets", pack_count: @pack.count)
@ -85,14 +82,11 @@
else: dgettext("actions", "Stage for range") %>
</button>
<.link patch={Routes.pack_show_path(Endpoint, :move, @pack)} class="btn btn-primary">
<.link patch={~p"/ammo/show/move/#{@pack}"} class="btn btn-primary">
<%= dgettext("actions", "Move ammo") %>
</.link>
<.link
patch={Routes.pack_show_path(Endpoint, :add_shot_record, @pack)}
class="mx-4 my-2 btn btn-primary"
>
<.link patch={~p"/ammo/show/add_shot_record/#{@pack}"} class="mx-4 my-2 btn btn-primary">
<%= dgettext("actions", "Record shots") %>
</.link>
</div>
@ -130,50 +124,50 @@
<%= case @live_action do %>
<% :edit -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.modal return_to={~p"/ammo/show/#{@pack}"}>
<.live_component
module={CanneryWeb.PackLive.FormComponent}
id={@pack.id}
title={@page_title}
action={@live_action}
pack={@pack}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
return_to={~p"/ammo/show/#{@pack}"}
current_user={@current_user}
/>
</.modal>
<% :edit_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.modal return_to={~p"/ammo/show/#{@pack}"}>
<.live_component
module={CanneryWeb.RangeLive.FormComponent}
id={@shot_record.id}
title={@page_title}
action={@live_action}
shot_record={@shot_record}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
return_to={~p"/ammo/show/#{@pack}"}
current_user={@current_user}
/>
</.modal>
<% :add_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.modal return_to={~p"/ammo/show/#{@pack}"}>
<.live_component
module={CanneryWeb.Components.AddShotRecordComponent}
id={:new}
title={@page_title}
action={@live_action}
pack={@pack}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
return_to={~p"/ammo/show/#{@pack}"}
current_user={@current_user}
/>
</.modal>
<% :move -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.modal return_to={~p"/ammo/show/#{@pack}"}>
<.live_component
module={CanneryWeb.Components.MovePackComponent}
id={@pack.id}
title={@page_title}
action={@live_action}
pack={@pack}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
return_to={~p"/ammo/show/#{@pack}"}
current_user={@current_user}
/>
</.modal>