diff --git a/CHANGELOG.md b/CHANGELOG.md index bdcb0ab..14d9e02 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 ac7c140..d3d9b2a 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 a1203d2..2a97676 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 e4ecef9..ca3ea16 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 4eca3f8..d77a8f5 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 6cd3e18..98eca4d 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 a71af16..5630e08 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 6c67f54..70ef8b3 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 e55a218..d892bd7 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 866e8b1..e4a8c1f 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 78b0cd0..84de890 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 b227248..db27104 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 9a0199b..1f9cfd9 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 5697cf7..bf86161 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 a0d9048..bf28151 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 ""