@@ -156,7 +171,8 @@ const OAuthClientDetailsDialog = ({
setIsRejectConfirmOpen(true);
setRejectionReason("");
setShowRejectionReasonError(false);
- }}>
+ }}
+ >
{t("reject")}
) : null}
@@ -170,7 +186,8 @@ const OAuthClientDetailsDialog = ({
onClick={() => {
if (!clientId) return;
onApprove?.(clientId);
- }}>
+ }}
+ >
{t("approve")}
) : null}
@@ -182,14 +199,20 @@ const OAuthClientDetailsDialog = ({
return (
{closeButton}
-
);
}
- return
{closeButton}
;
+ return (
+
{closeButton}
+ );
})();
return (
@@ -209,26 +232,42 @@ const OAuthClientDetailsDialog = ({
websiteUrl: values.websiteUrl.trim() || "",
logo: values.logo,
});
- })}>
+ })}
+ >
{status ? (
-
+
{t(getStatusBadgeVariant(status).labelKey)}
) : null}
{status === "PENDING" ? (
-
+
) : null}
{status === "APPROVED" ? (
-
+
) : null}
{status === "REJECTED" && client.rejectionReason ? (
-
-
{t("oauth_client_rejection_reason")}: {client.rejectionReason}
+
+
+ {t("oauth_client_rejection_reason")}:
+ {" "}
+ {client.rejectionReason}
) : null}
@@ -237,27 +276,39 @@ const OAuthClientDetailsDialog = ({
+ className="px-2 py-1 w-full font-mono text-sm truncate align-middle rounded-md rounded-r-none bg-subtle text-default"
+ >
{client.clientId}
{
copyToClipboard(client.clientId, {
- onSuccess: () => showToast(t("client_id_copied"), "success"),
+ onSuccess: () =>
+ showToast(t("client_id_copied"), "success"),
onFailure: () => showToast(t("error"), "error"),
});
}}
type="button"
size="sm"
className="rounded-l-none"
- StartIcon="clipboard">
+ StartIcon="clipboard"
+ >
{t("copy")}
+ {client.user?.email ? (
+
+
{t("owner")}
+
+ {client.user.email}
+
+
+ ) : null}
+
setIsDeleteConfirmOpen(true)}>
+ onClick={() => setIsDeleteConfirmOpen(true)}
+ >
{t("delete_oauth_client")}
-
) : null}
-