diff --git a/resources/ts/Components/ActivationRequest.tsx b/resources/ts/Components/ActivationRequest.tsx
index 2bfa64aec..9b5e60e70 100644
--- a/resources/ts/Components/ActivationRequest.tsx
+++ b/resources/ts/Components/ActivationRequest.tsx
@@ -19,7 +19,7 @@ export const ActivationRequest = ({ id, type }: Props) => {
);
return (
-
+
{type === IntegrationType.EntryApi && (
{
+export const CopyText = ({ text, isSecret }: Props) => {
const { t } = useTranslation();
const codeFieldRef = useRef(null);
const [isVisible, setIsVisible] = useState(false);
+ const [isSecretVisible, setIsSecretVisible] = useState(false);
- const handleCopyToClipboard = () => {
- navigator.clipboard.writeText(codeFieldRef.current?.innerText ?? "");
+ const handleCopyToClipboard = (text: string) => {
+ navigator.clipboard.writeText(text ?? "");
setIsVisible(true);
const timeoutId = setTimeout(() => {
setIsVisible(false);
@@ -25,20 +27,25 @@ export const CopyText = ({ children }: Props) => {
return (
- {children}
+ {!isSecret || isSecretVisible ? text : "*".repeat(text?.length ?? 36)}
-
+
handleCopyToClipboard(text)}
+ className="text-publiq-orange"
/>
+ {isSecret && (
+ {
+ setIsSecretVisible((prev) => !prev);
+ }}
+ />
+ )}
);
diff --git a/resources/ts/Components/IntegrationCard.tsx b/resources/ts/Components/IntegrationCard.tsx
index 64b1328e7..38205cf80 100644
--- a/resources/ts/Components/IntegrationCard.tsx
+++ b/resources/ts/Components/IntegrationCard.tsx
@@ -96,6 +96,8 @@ export const IntegrationCard = ({
},
];
+ const clientSecretLabel = t("details.credentials.client_secret");
+
const hasAnyCredentials = Boolean(
legacyTestConsumer || legacyProdConsumer || testClient || prodClient
);
@@ -126,7 +128,12 @@ export const IntegrationCard = ({
{t(client.label)}
- {client.value}
+ {client.value && (
+
+ )}
))}
@@ -150,7 +157,7 @@ export const IntegrationCard = ({
{t("details.credentials.api_key")}
-
{legacyTestConsumer.apiKey}
+
)}
{type === IntegrationType.Widgets &&
@@ -190,7 +197,12 @@ export const IntegrationCard = ({
{t(client.label)}
-
{client.value}
+ {client.value && (
+
+ )}
))}
@@ -245,7 +257,7 @@ export const IntegrationCard = ({
{t("details.credentials.api_key")}
- {legacyProdConsumer.apiKey}
+
)}
diff --git a/resources/ts/Components/Integrations/Detail/CredentialsAuthClients.tsx b/resources/ts/Components/Integrations/Detail/CredentialsAuthClients.tsx
index d6d078ca8..1fd4323d1 100644
--- a/resources/ts/Components/Integrations/Detail/CredentialsAuthClients.tsx
+++ b/resources/ts/Components/Integrations/Detail/CredentialsAuthClients.tsx
@@ -60,6 +60,8 @@ export const CredentialsAuthClients = ({
},
];
+ const clientSecretLabel = t("details.credentials.client_secret");
+
const handleKeyVisibilityUpgrade = () =>
router.post(`/integrations/${id}/upgrade`, {
keyVisibility: KeyVisibility.v2,
@@ -110,7 +112,12 @@ export const CredentialsAuthClients = ({
{t(client.label)}
- {client.value}
+ {client.value && (
+
+ )}
))}
@@ -129,7 +136,12 @@ export const CredentialsAuthClients = ({
{t(client.label)}
- {client.value}
+ {client.value && (
+
+ )}
))}
diff --git a/resources/ts/Components/Integrations/Detail/CredentialsLegacyAuthConsumers.tsx b/resources/ts/Components/Integrations/Detail/CredentialsLegacyAuthConsumers.tsx
index 7b53a1bb8..cc460152d 100644
--- a/resources/ts/Components/Integrations/Detail/CredentialsLegacyAuthConsumers.tsx
+++ b/resources/ts/Components/Integrations/Detail/CredentialsLegacyAuthConsumers.tsx
@@ -56,7 +56,7 @@ export const CredentialsLegacyAuthConsumers = ({
{t("details.credentials.api_key")}
{legacyTestConsumer && (
- {legacyTestConsumer.apiKey}
+
)}
{keyVisibility !== KeyVisibility.v2 && (
@@ -72,7 +72,7 @@ export const CredentialsLegacyAuthConsumers = ({
{t("details.credentials.api_key")}
- {legacyProdConsumer.apiKey}
+
)}
{keyVisibility === KeyVisibility.all &&
diff --git a/resources/ts/Components/Tooltip.tsx b/resources/ts/Components/Tooltip.tsx
index 2fb328c8e..561f442e1 100644
--- a/resources/ts/Components/Tooltip.tsx
+++ b/resources/ts/Components/Tooltip.tsx
@@ -12,7 +12,7 @@ export const Tooltip = ({ visible, text, children, className }: Props) => {
return (