From 928fab3878969cd0aad013ddefddd02a850d75ef Mon Sep 17 00:00:00 2001 From: Brian Manifold Date: Tue, 8 Oct 2024 07:40:40 -0700 Subject: [PATCH] fix(portal): Fix minor UI issues on API Clients show page (#6955) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated revoke button colors and icons. - Updated the 'Created By' to use a helper function to get an email address rather than using the provider_identifier which may be a random string depending on the type of provider the identity was created under. - Added a link to the actor that created the API token ### Screenshot of updated view Screenshot 2024-10-07 at 1 11 43 PM Closes #6269 --- .../web/lib/web/live/settings/api_clients/show.ex | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/elixir/apps/web/lib/web/live/settings/api_clients/show.ex b/elixir/apps/web/lib/web/live/settings/api_clients/show.ex index c981c6c51..8d16945cf 100644 --- a/elixir/apps/web/lib/web/live/settings/api_clients/show.ex +++ b/elixir/apps/web/lib/web/live/settings/api_clients/show.ex @@ -134,8 +134,8 @@ defmodule Web.Settings.ApiClients.Show do <:action :if={Actors.actor_active?(@actor)}> <.button_with_confirmation id="revoke_all_tokens" - style="warning" - icon="hero-lock-open" + style="danger" + icon="hero-trash" on_confirm="revoke_all_tokens" > <:dialog_title>Revoke all API Client Tokens @@ -169,7 +169,12 @@ defmodule Web.Settings.ApiClients.Show do <%= Cldr.DateTime.Formatter.date(token.expires_at, 1, "en", Web.CLDR, []) %> <:col :let={token} label="created by"> - <%= token.created_by_identity.provider_identifier %> + <.link + class={[link_style()]} + navigate={~p"/#{@account}/actors/#{token.created_by_actor_id}"} + > + <%= get_identity_email(token.created_by_identity) %> + <:col :let={token} label="last used"> <.relative_datetime datetime={token.last_seen_at} /> @@ -180,7 +185,7 @@ defmodule Web.Settings.ApiClients.Show do <:action :let={token}> <.button_with_confirmation id={"revoke_token_#{token.id}"} - style="warning" + style="danger" icon="hero-trash-solid" on_confirm="revoke_token" on_confirm_id={token.id}