diff --git a/CHANGELOG.md b/CHANGELOG.md index bdcb0abc..14d9e023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Add search to catalog, ammo, container, tag and range index pages - Tweak urls for catalog, ammo, containers, tags and shot records - Fix bug with shot group chart not drawing lines between days correctly +- Improve cards across app (make them line up with each other) # v0.7.2 - Code improvements diff --git a/lib/cannery_web/components/tag_card.ex b/lib/cannery_web/components/tag_card.ex index ac7c1403..d3d9b2a2 100644 --- a/lib/cannery_web/components/tag_card.ex +++ b/lib/cannery_web/components/tag_card.ex @@ -13,7 +13,7 @@ defmodule CanneryWeb.Components.TagCard do ~H"""
diff --git a/lib/cannery_web/live/tag_live/index.html.heex b/lib/cannery_web/live/tag_live/index.html.heex index a1203d23..2a976765 100644 --- a/lib/cannery_web/live/tag_live/index.html.heex +++ b/lib/cannery_web/live/tag_live/index.html.heex @@ -38,39 +38,39 @@
-
- <%= if @tags |> Enum.empty?() do %> -

- <%= gettext("No tags") %> - <%= display_emoji("😔") %> -

- <% end %> + <%= if @tags |> Enum.empty?() do %> +

+ <%= gettext("No tags") %> + <%= display_emoji("😔") %> +

+ <% else %> +
+ <%= for tag <- @tags do %> + <.tag_card tag={tag}> + <.link + patch={Routes.tag_index_path(Endpoint, :edit, tag)} + class="text-primary-600 link" + data-qa={"edit-#{tag.id}"} + > + + - <%= for tag <- @tags do %> - <.tag_card tag={tag}> - <.link - patch={Routes.tag_index_path(Endpoint, :edit, tag)} - class="text-primary-600 link" - data-qa={"edit-#{tag.id}"} - > - - - - <.link - href="#" - class="text-primary-600 link" - phx-click="delete" - phx-value-id={tag.id} - data-confirm={ - dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name) - } - data-qa={"delete-#{tag.id}"} - > - - - - <% end %> -
+ <.link + href="#" + class="text-primary-600 link" + phx-click="delete" + phx-value-id={tag.id} + data-confirm={ + dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name) + } + data-qa={"delete-#{tag.id}"} + > + + + + <% end %> +
+ <% end %> <%= if @live_action in [:new, :edit] do %> diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index e4ecef94..ca3ea160 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -306,7 +306,7 @@ msgstr "Keine Einladung" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "Keine Tags" diff --git a/priv/gettext/de/LC_MESSAGES/prompts.po b/priv/gettext/de/LC_MESSAGES/prompts.po index 4eca3f86..d77a8f56 100644 --- a/priv/gettext/de/LC_MESSAGES/prompts.po +++ b/priv/gettext/de/LC_MESSAGES/prompts.po @@ -85,7 +85,7 @@ msgstr "" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 6cd3e18e..98eca4d5 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -291,7 +291,7 @@ msgstr "" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index a71af166..5630e08f 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -292,7 +292,7 @@ msgstr "" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/prompts.po b/priv/gettext/en/LC_MESSAGES/prompts.po index 6c67f546..70ef8b31 100644 --- a/priv/gettext/en/LC_MESSAGES/prompts.po +++ b/priv/gettext/en/LC_MESSAGES/prompts.po @@ -71,7 +71,7 @@ msgstr "" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index e55a218f..d892bd74 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -306,7 +306,7 @@ msgstr "" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/prompts.po b/priv/gettext/es/LC_MESSAGES/prompts.po index 866e8b1f..e4a8c1ff 100644 --- a/priv/gettext/es/LC_MESSAGES/prompts.po +++ b/priv/gettext/es/LC_MESSAGES/prompts.po @@ -85,7 +85,7 @@ msgstr "Está seguro que desea eliminar %{email}? Esta acción es permanente!" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr "Está seguro que desea eliminar %{name}?" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 78b0cd05..84de8908 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -306,7 +306,7 @@ msgstr "Aucune invitation" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "Aucun tag" diff --git a/priv/gettext/fr/LC_MESSAGES/prompts.po b/priv/gettext/fr/LC_MESSAGES/prompts.po index b2272480..db271048 100644 --- a/priv/gettext/fr/LC_MESSAGES/prompts.po +++ b/priv/gettext/fr/LC_MESSAGES/prompts.po @@ -86,7 +86,7 @@ msgstr "" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr "Êtes-vous certain·e de supprimer %{name} ?" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index 9a0199bb..1f9cfd9d 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -302,7 +302,7 @@ msgstr "" #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31 #: lib/cannery_web/live/tag_live/index.html.heex:10 -#: lib/cannery_web/live/tag_live/index.html.heex:44 +#: lib/cannery_web/live/tag_live/index.html.heex:43 #, elixir-autogen, elixir-format msgid "No tags" msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/prompts.po b/priv/gettext/ga/LC_MESSAGES/prompts.po index 5697cf70..bf861615 100644 --- a/priv/gettext/ga/LC_MESSAGES/prompts.po +++ b/priv/gettext/ga/LC_MESSAGES/prompts.po @@ -81,7 +81,7 @@ msgstr "" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr "" diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index a0d90485..bf281510 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -70,7 +70,7 @@ msgstr "" #: lib/cannery_web/live/container_live/index.html.heex:93 #: lib/cannery_web/live/container_live/index.html.heex:138 #: lib/cannery_web/live/container_live/show.html.heex:59 -#: lib/cannery_web/live/tag_live/index.html.heex:65 +#: lib/cannery_web/live/tag_live/index.html.heex:64 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete %{name}?" msgstr ""