mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
misc: improved unchanged placeholder
This commit is contained in:
+6
-1
@@ -110,8 +110,13 @@ export const SshAccountFields = ({ isUpdate }: { isUpdate: boolean }) => {
|
|||||||
>
|
>
|
||||||
<TextArea
|
<TextArea
|
||||||
{...field}
|
{...field}
|
||||||
|
value={field.value === UNCHANGED_PASSWORD_SENTINEL ? "" : field.value}
|
||||||
className="min-h-32 resize-y font-mono text-xs"
|
className="min-h-32 resize-y font-mono text-xs"
|
||||||
placeholder="-----BEGIN OPENSSH PRIVATE KEY----- ... -----END OPENSSH PRIVATE KEY-----"
|
placeholder={
|
||||||
|
isUpdate && field.value === UNCHANGED_PASSWORD_SENTINEL
|
||||||
|
? "Private key unchanged - click to update"
|
||||||
|
: "-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----"
|
||||||
|
}
|
||||||
onFocus={() => {
|
onFocus={() => {
|
||||||
if (isUpdate && field.value === UNCHANGED_PASSWORD_SENTINEL) {
|
if (isUpdate && field.value === UNCHANGED_PASSWORD_SENTINEL) {
|
||||||
field.onChange("");
|
field.onChange("");
|
||||||
|
|||||||
Reference in New Issue
Block a user