Skip to content

Commit

Permalink
phoenix_live_view を 0.20.17 にアップデート
Browse files Browse the repository at this point in the history
  • Loading branch information
nasshu2916 committed Jul 10, 2024
1 parent ef2c3fc commit 11bd2ec
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions lib/live_babiniku_web/components/layouts/live.html.heex
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<main class="bg-base-100 drawer drawer-mobile">
<div class="toast toast-top toast-center">
<%= if live_flash(@flash, :info) do %>
<%= if Phoenix.Flash.get(@flash, :info) do %>
<div class="alert alert-info shadow-lg" phx-click="lv:clear-flash" phx-value-key="info">
<span class="whitespace-pre-wrap"><.icon icon="info" /><%= live_flash(@flash, :info) %></span>
<span class="whitespace-pre-wrap"><.icon icon="info" /><%= Phoenix.Flash.get(@flash, :info) %></span>
</div>
<% end %>
<%= if live_flash(@flash, :success) do %>
<%= if Phoenix.Flash.get(@flash, :success) do %>
<div class="alert alert-success shadow-lg" phx-click="lv:clear-flash" phx-value-key="success">
<span class="whitespace-pre-wrap"><.icon icon="check_circle" /><%= live_flash(@flash, :success) %></span>
<span class="whitespace-pre-wrap"><.icon icon="check_circle" /><%= Phoenix.Flash.get(@flash, :success) %></span>
</div>
<% end %>
<%= if live_flash(@flash, :warning) do %>
<%= if Phoenix.Flash.get(@flash, :warning) do %>
<div class="alert alert-warning shadow-lg" phx-click="lv:clear-flash" phx-value-key="warning">
<span class="whitespace-pre-wrap"><.icon icon="warning" /><%= live_flash(@flash, :warning) %></span>
<span class="whitespace-pre-wrap"><.icon icon="warning" /><%= Phoenix.Flash.get(@flash, :warning) %></span>
</div>
<% end %>
<%= if live_flash(@flash, :error) do %>
<%= if Phoenix.Flash.get(@flash, :error) do %>
<div class="alert alert-error shadow-lg" phx-click="lv:clear-flash" phx-value-key="error">
<span class="whitespace-pre-wrap"><.icon icon="error" /><%= live_flash(@flash, :error) %></span>
<span class="whitespace-pre-wrap"><.icon icon="error" /><%= Phoenix.Flash.get(@flash, :error) %></span>
</div>
<% end %>
</div>
Expand Down
6 changes: 3 additions & 3 deletions lib/live_babiniku_web/live/home_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule LiveBabinikuWeb.HomeLive do

case Rooms.create(name, owner_user_id: user.id, private?: private == "true") do
{:ok, room} ->
{:noreply, push_redirect(socket, to: Routes.room_path(socket, :page, room.id))}
{:noreply, push_navigate(socket, to: Routes.room_path(socket, :page, room.id))}

{:error, _} ->
{:noreply, socket}
Expand Down Expand Up @@ -66,9 +66,9 @@ defmodule LiveBabinikuWeb.HomeLive do
</div>
</div>
<div class="col-end-auto flex justify-end">
<%= live_redirect to: Routes.room_path(@socket, :page, @room.id), class: "btn btn-sm" do %>
<.link href={Routes.room_path(@socket, :page, @room.id)} class="btn btn-sm">
<.icon icon="login" />
<% end %>
</.link>
</div>
</div>
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/live_babiniku_web/live/live_helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ defmodule LiveBabinikuWeb.LiveHelpers do
phx-key="escape"
>
<%= if @patch do %>
<%= live_patch("", to: @patch, class: "hidden", id: "#{@id}-return") %>
<.link patch={@patch} class="hidden" id={"#{@id}-return"}></.link>
<% end %>
<%= if @navigate do %>
<%= live_redirect("", to: @navigate, class: "hidden", id: "#{@id}-return") %>
<.link href={@navigate} class="hidden" id={"#{@id}-return"}></.link>
<% end %>
<button
type="button"
Expand Down
2 changes: 1 addition & 1 deletion lib/live_babiniku_web/live/room_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule LiveBabinikuWeb.RoomLive do

:error ->
{:ok,
push_redirect(
push_navigate(
socket,
to: Routes.home_path(socket, :page)
)}
Expand Down
4 changes: 2 additions & 2 deletions lib/live_babiniku_web/live/room_live.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
<%= if @live_action != :event and @own_room? do %>
<div class="p-3 fixed bottom-0 w-full h-1/4 transition-opacity opacity-0 hover:opacity-100">
<div class="absolute p-3 right-0 bottom-0">
<%= live_patch to: "#{@room_url}/event", replace: false do %>
<.link patch={"#{@room_url}/event"} replace={false}>
<button class="btn btn-success btn-sm ">オーナーページへ</button>
<% end %>
</.link>
</div>
</div>
<% end %>
8 changes: 4 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ defmodule LiveBabiniku.MixProject do
defp deps do
[
{:phoenix, "~> 1.7.14"},
{:phoenix_html, "~> 3.0"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.19.5"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.5", only: :dev},
{:phoenix_live_view, "~> 0.20.17"},
{:phoenix_ecto, "~> 4.4.0"},
{:floki, ">= 0.30.0", only: :test},
{:phoenix_live_dashboard, "~> 0.8.4"},
{:floki, ">= 0.30.0", only: :test},
{:ecto, "~> 3.11.0"},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:swoosh, "~> 1.3"},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phoenix_html": {:hex, :phoenix_html, "3.3.4", "42a09fc443bbc1da37e372a5c8e6755d046f22b9b11343bf885067357da21cb3", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0249d3abec3714aff3415e7ee3d9786cb325be3151e6c4b3021502c585bf53fb"},
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.4", "4508e481f791ce62ec6a096e13b061387158cbeefacca68c6c1928e1305e23ed", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "2984aae96994fbc5c61795a73b8fb58153b41ff934019cfb522343d2d3817d59"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.5.3", "f2161c207fda0e4fb55165f650f7f8db23f02b29e3bff00ff7ef161d6ac1f09d", [:mix], [{:file_system, "~> 0.3 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "b4ec9cd73cb01ff1bd1cac92e045d13e7030330b74164297d1aee3907b54803c"},
"phoenix_live_view": {:hex, :phoenix_live_view, "0.19.5", "6e730595e8e9b8c5da230a814e557768828fd8dfeeb90377d2d8dbb52d4ec00a", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b2eaa0dd3cfb9bd7fb949b88217df9f25aed915e986a28ad5c8a0d054e7ca9d3"},
"phoenix_live_view": {:hex, :phoenix_live_view, "0.20.17", "f396bbdaf4ba227b82251eb75ac0afa6b3da5e509bc0d030206374237dfc9450", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a61d741ffb78c85fdbca0de084da6a48f8ceb5261a79165b5a0b59e5f65ce98b"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
"phoenix_view": {:hex, :phoenix_view, "2.0.4", "b45c9d9cf15b3a1af5fb555c674b525391b6a1fe975f040fb4d913397b31abf4", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "4e992022ce14f31fe57335db27a28154afcc94e9983266835bb3040243eb620b"},
Expand Down

0 comments on commit 11bd2ec

Please sign in to comment.