From 44fbd69e0f5cb1941428fef028fe3dd5a53be96f Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 6 Nov 2022 20:29:12 -0500 Subject: [PATCH] make ammo group index more compact --- CHANGELOG.md | 1 + assets/css/components.scss | 4 ++-- lib/cannery_web/live/ammo_group_live/index.ex | 19 +++++++++++++------ priv/gettext/de/LC_MESSAGES/default.po | 1 + priv/gettext/default.pot | 1 + priv/gettext/en/LC_MESSAGES/default.po | 1 + priv/gettext/es/LC_MESSAGES/default.po | 1 + priv/gettext/fr/LC_MESSAGES/default.po | 1 + 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f976eea..970615b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # v0.5.5 - Update translations +- Make ammo index page a bit more compact - Forgot to add the logo as the favicon whoops # v0.5.4 diff --git a/assets/css/components.scss b/assets/css/components.scss index 0c0e76b..a8a18ad 100644 --- a/assets/css/components.scss +++ b/assets/css/components.scss @@ -25,7 +25,7 @@ } .btn { - @apply inline-block break-words min-w-4; + @apply inline-block break-words; @apply focus:outline-none px-4 py-2 rounded-lg; @apply shadow-sm focus:shadow-lg; @apply transition-all duration-300 ease-in-out; @@ -52,7 +52,7 @@ } .link { - @apply inline-block break-all min-w-4; + @apply inline-block break-words; @apply hover:underline; @apply transition-colors duration-500 ease-in-out; } diff --git a/lib/cannery_web/live/ammo_group_live/index.ex b/lib/cannery_web/live/ammo_group_live/index.ex index 6bcb1fd..2f2a635 100644 --- a/lib/cannery_web/live/ammo_group_live/index.ex +++ b/lib/cannery_web/live/ammo_group_live/index.ex @@ -138,10 +138,10 @@ defmodule CanneryWeb.AmmoGroupLive.Index do {staged, ~H""" -
+
"""} @@ -197,10 +197,17 @@ defmodule CanneryWeb.AmmoGroupLive.Index do {container_name, ~H""" -
- <%= live_patch(@ammo_group.container.name, +
+ <%= live_patch( + @ammo_group.container.name, + to: Routes.container_show_path(Endpoint, :show, @ammo_group.container), + class: "mx-2 my-1 link" + ) %> + + <%= live_patch( + gettext("Move ammo"), to: Routes.ammo_group_index_path(Endpoint, :move, @ammo_group), - class: "btn btn-primary" + class: "mx-2 my-1 text-sm btn btn-primary" ) %>
"""} diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 71b9738..3f697a2 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -601,6 +601,7 @@ msgstr "Munitionsgruppe verschieben" #, elixir-autogen, elixir-format #: lib/cannery_web/components/move_ammo_group_component.ex:80 +#: lib/cannery_web/live/ammo_group_live/index.ex:208 msgid "Move ammo" msgstr "Munition verschieben" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index aaa8cf4..6824239 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -584,6 +584,7 @@ msgstr "" #, elixir-autogen, elixir-format #: lib/cannery_web/components/move_ammo_group_component.ex:80 +#: lib/cannery_web/live/ammo_group_live/index.ex:208 msgid "Move ammo" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 8edd0d6..a5d8f7d 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -585,6 +585,7 @@ msgstr "" #, elixir-autogen, elixir-format #: lib/cannery_web/components/move_ammo_group_component.ex:80 +#: lib/cannery_web/live/ammo_group_live/index.ex:208 msgid "Move ammo" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index 73bbbfa..a65f61b 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -599,6 +599,7 @@ msgstr "" #, elixir-autogen, elixir-format #: lib/cannery_web/components/move_ammo_group_component.ex:80 +#: lib/cannery_web/live/ammo_group_live/index.ex:208 msgid "Move ammo" msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 60a8441..14c86c0 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -603,6 +603,7 @@ msgstr "Déplacer le groupe de munition" #, elixir-autogen, elixir-format #: lib/cannery_web/components/move_ammo_group_component.ex:80 +#: lib/cannery_web/live/ammo_group_live/index.ex:208 msgid "Move ammo" msgstr "Déplacer munition"