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 f976eea4..970615b6 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 0c0e76bb..a8a18ad7 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 6bcb1fdc..2f2a6354 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 71b9738c..3f697a2d 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 aaa8cf4e..68242398 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 8edd0d60..a5d8f7d7 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 73bbbfa9..a65f61b2 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 60a84417..14c86c05 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"