From eac07a4c394e60bdcd2a9fd5842798712aed4f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 13 Feb 2024 17:21:59 +0700 Subject: [PATCH] Simplify clipboard copy transitions --- lib/livebook_web/components/app_components.ex | 2 +- lib/livebook_web/live/hub/edit/team_component.ex | 2 +- lib/livebook_web/live/hub/teams/agent_key_list_component.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/livebook_web/components/app_components.ex b/lib/livebook_web/components/app_components.ex index 8d146be8f..ab7315c35 100644 --- a/lib/livebook_web/components/app_components.ex +++ b/lib/livebook_web/components/app_components.ex @@ -213,7 +213,7 @@ defmodule LivebookWeb.AppComponents do aria-label="copy to clipboard" phx-click={ JS.dispatch("lb:clipcopy", to: "#dockerfile-source") - |> JS.add_class("", transition: {"tooltip top", "", ""}, time: 2000) + |> JS.transition("tooltip top", time: 2000) } > <.remix_icon icon="clipboard-line" /> diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index a8d76824c..94b8d84dd 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -303,7 +303,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do aria-label="copy to clipboard" phx-click={ JS.dispatch("lb:clipcopy", to: "#teams-key") - |> JS.add_class("", transition: {"tooltip left", "", ""}, time: 2000) + |> JS.transition("tooltip top", time: 2000) } > <.button color="gray" small type="button"> diff --git a/lib/livebook_web/live/hub/teams/agent_key_list_component.ex b/lib/livebook_web/live/hub/teams/agent_key_list_component.ex index 6f57d7233..d15032191 100644 --- a/lib/livebook_web/live/hub/teams/agent_key_list_component.ex +++ b/lib/livebook_web/live/hub/teams/agent_key_list_component.ex @@ -30,7 +30,7 @@ defmodule LivebookWeb.Hub.Teams.AgentKeyListComponent do aria-label="copy to clipboard" phx-click={ JS.dispatch("lb:clipcopy", to: "#agent-key-#{agent_key.id}") - |> JS.add_class("", transition: {"tooltip left", "", ""}, time: 2000) + |> JS.transition("tooltip top", time: 2000) } > <.button color="gray" small type="button">