From c0441957b6d757513dc235c7a2098da51824d065 Mon Sep 17 00:00:00 2001 From: shibao Date: Sat, 18 Mar 2023 01:03:55 -0400 Subject: [PATCH] use .link helpers --- CHANGELOG.md | 1 + .../components/core_components/qr_code.html.heex | 4 ++-- .../live/ammo_type_live/form_component.html.heex | 6 +++--- lib/cannery_web/live/home_live.html.heex | 8 ++++++-- lib/cannery_web/live/invite_live/index.html.heex | 8 ++++---- lib/cannery_web/templates/error/error.html.heex | 7 +++++-- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4c76d17..d0a65574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # v0.8.4 - Improve accessibility - Code quality improvements +- Fix dead link of example bullet abbreviations # v0.8.3 - Improve some styles diff --git a/lib/cannery_web/components/core_components/qr_code.html.heex b/lib/cannery_web/components/core_components/qr_code.html.heex index 36e12922..0b0b6c55 100644 --- a/lib/cannery_web/components/core_components/qr_code.html.heex +++ b/lib/cannery_web/components/core_components/qr_code.html.heex @@ -1,3 +1,3 @@ -<.link href={qr_code_image(@content)} download={@filename <> ".png"}> + ".png"}> {@filename} - + diff --git a/lib/cannery_web/live/ammo_type_live/form_component.html.heex b/lib/cannery_web/live/ammo_type_live/form_component.html.heex index 652532fa..79e580f0 100644 --- a/lib/cannery_web/live/ammo_type_live/form_component.html.heex +++ b/lib/cannery_web/live/ammo_type_live/form_component.html.heex @@ -29,12 +29,12 @@ ) %> <%= error_tag(f, :desc, "col-span-3 text-center") %> - <%= gettext("Example bullet type abbreviations") %> - + <%= label(f, :bullet_type, gettext("Bullet type"), class: "title text-lg text-primary-600") %> <%= text_input(f, :bullet_type, class: "text-center col-span-2 input input-primary", diff --git a/lib/cannery_web/live/home_live.html.heex b/lib/cannery_web/live/home_live.html.heex index 0a0ea1db..ba207df0 100644 --- a/lib/cannery_web/live/home_live.html.heex +++ b/lib/cannery_web/live/home_live.html.heex @@ -66,9 +66,13 @@ <% else %>
- + <.link + :for={%{email: email} <- @admins} + class="hover:underline" + href={"mailto:#{email}"} + > <%= email %> - +
<% end %>

diff --git a/lib/cannery_web/live/invite_live/index.html.heex b/lib/cannery_web/live/invite_live/index.html.heex index 5e8ee381..c58d8147 100644 --- a/lib/cannery_web/live/invite_live/index.html.heex +++ b/lib/cannery_web/live/invite_live/index.html.heex @@ -61,16 +61,16 @@ - <%= if invite.disabled_at, do: gettext("Enable"), else: gettext("Disable") %> - + - is_nil() and not (invite.uses_left |> is_nil())} href="#" class="btn btn-primary" @@ -83,7 +83,7 @@ } > <%= dgettext("actions", "Set Unlimited") %> - + diff --git a/lib/cannery_web/templates/error/error.html.heex b/lib/cannery_web/templates/error/error.html.heex index 99271659..4c606cfa 100644 --- a/lib/cannery_web/templates/error/error.html.heex +++ b/lib/cannery_web/templates/error/error.html.heex @@ -24,9 +24,12 @@
- + <.link + href={Routes.live_path(Endpoint, HomeLive)} + class="link title text-primary-600 text-lg" + > <%= dgettext("errors", "Go back home") %> - +