diff --git a/.credo.exs b/.credo.exs
index 5f5071f4..c8b32b83 100644
--- a/.credo.exs
+++ b/.credo.exs
@@ -16,7 +16,10 @@
parse_timeout: 5000,
color: true,
checks: %{
- disabled: []
+ disabled: [],
+ enabled: [
+ {Credo.Check.Consistency.UnusedVariableNames, []}
+ ]
}
}
]
diff --git a/demo/lib/demo/short_link.ex b/demo/lib/demo/short_link.ex
index c5fa9918..d204363a 100644
--- a/demo/lib/demo/short_link.ex
+++ b/demo/lib/demo/short_link.ex
@@ -38,7 +38,7 @@ defmodule Demo.ShortLink do
defp add_short_key(changeset) do
case get_field(changeset, :short_key) do
nil -> put_change(changeset, :short_key, generate_short_key())
- _ -> changeset
+ _field -> changeset
end
end
diff --git a/lib/backpex/fields/has_many.ex b/lib/backpex/fields/has_many.ex
index d7d6bda2..66cdd05e 100644
--- a/lib/backpex/fields/has_many.ex
+++ b/lib/backpex/fields/has_many.ex
@@ -306,7 +306,7 @@ defmodule Backpex.Fields.HasMany do
"" ->
[]
- _ ->
+ _other ->
nil
end
end
diff --git a/lib/backpex/html/layout.ex b/lib/backpex/html/layout.ex
index ce93ef0e..2b8680a4 100644
--- a/lib/backpex/html/layout.ex
+++ b/lib/backpex/html/layout.ex
@@ -130,6 +130,12 @@ defmodule Backpex.HTML.Layout do
:if={Phoenix.Flash.get(@flash, :info) && Phoenix.Flash.get(@flash, :info) != ""}
class="alert bg-info text-info-content my-4 text-sm"
phx-value-key="info"
+ x-data="{ isVisible: false }"
+ x-init="() => { isVisible = true; setTimeout(() => isVisible = false, 5000) }"
+ x-show="isVisible"
+ x-transition:leave="transition ease-in duration-2000"
+ x-transition:leave-start="opacity-100 transform scale-100"
+ x-transition:leave-end="opacity-0 transform scale-90"
>
diff --git a/lib/backpex/html/resource/form_component.html.heex b/lib/backpex/html/resource/form_component.html.heex
index 94449962..a4f0386e 100644
--- a/lib/backpex/html/resource/form_component.html.heex
+++ b/lib/backpex/html/resource/form_component.html.heex
@@ -48,12 +48,24 @@
<% else %>
<.link navigate={@live_resource.return_to(@socket, assigns, @live_action, @item)}>
-