feat(web): add tooltips to icon-only action buttons

This commit is contained in:
Moritz 2026-06-08 12:35:30 +02:00
parent bec49f0771
commit 035edae522
10 changed files with 144 additions and 44 deletions

View file

@ -143,16 +143,21 @@ defmodule MvWeb.MemberLive.Show.MembershipFeesComponent do
<%!-- Action Buttons (only when user has permission) --%>
<div class="flex gap-2 mb-4">
<.button
<.tooltip
:if={@member.membership_fee_type != nil and @can_create_cycle}
phx-click="regenerate_cycles"
phx-target={@myself}
class={["btn btn-sm btn-outline", if(@regenerating, do: "btn-disabled", else: "")]}
title={gettext("Generate cycles from the last existing cycle to today")}
content={gettext("Generate cycles from the last existing cycle to today")}
position="top"
>
<.icon name="hero-arrow-path" class="size-4" />
{if(@regenerating, do: gettext("Regenerating..."), else: gettext("Regenerate Cycles"))}
</.button>
<.button
phx-click="regenerate_cycles"
phx-target={@myself}
class={["btn btn-sm btn-outline", if(@regenerating, do: "btn-disabled", else: "")]}
aria-label={gettext("Regenerate membership fee cycles")}
>
<.icon name="hero-arrow-path" class="size-4" />
{if(@regenerating, do: gettext("Regenerating..."), else: gettext("Regenerate Cycles"))}
</.button>
</.tooltip>
<.button
:if={Enum.any?(@cycles) and @can_destroy_cycle}
variant="outline"