fix: re-add secret key space support

This commit is contained in:
Daniel Hougaard
2025-09-23 04:08:23 +04:00
parent 294f33bc1e
commit 2fac3c19b1
4 changed files with 17 additions and 11 deletions
@@ -222,9 +222,11 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
<div>
Secret key contains whitespaces.
<br />
<br /> If this is the desired format, you need to encode it with{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">%20</code> when making API
requests.
<br /> If this is the desired format, you need to provide it as{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
{secretKey.trim().replaceAll(" ", "%20")}
</code>{" "}
when making API requests.
</div>
) : undefined
}
@@ -183,9 +183,11 @@ export const CreateSecretForm = ({
<div>
Secret key contains whitespaces.
<br />
<br /> If this is the desired format, you need to encode it with{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">%20</code> when making API
requests.
<br /> If this is the desired format, you need to provide it as{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
{secretKey.trim().replaceAll(" ", "%20")}
</code>{" "}
when making API requests.
</div>
) : undefined
}
@@ -488,13 +488,15 @@ export const SecretItem = memo(
isError={Boolean(error)}
onKeyUp={() => trigger("key")}
warningMessage={
field.value.includes(" ") ? (
field.value?.includes(" ") ? (
<div>
Secret key contains whitespaces.
<br />
<br /> If this is the desired format, you need to encode it with{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">%20</code> when
making API requests.
<br /> If this is the desired format, you need to provide it as{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
{field.value.trim().replaceAll(" ", "%20")}
</code>{" "}
when making API requests.
</div>
) : undefined
}