mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 05:28:23 +00:00
fix: ui bug
This commit is contained in:
+45
-43
@@ -276,54 +276,56 @@ export const SecretDetailSidebar = ({
|
|||||||
key="secret-value"
|
key="secret-value"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormControl
|
<div className="flex items-center gap-2">
|
||||||
helperText={
|
<FormControl
|
||||||
cannotReadSecretValue ? (
|
helperText={
|
||||||
<div className="flex space-x-2">
|
cannotReadSecretValue ? (
|
||||||
<FontAwesomeIcon
|
<div className="flex space-x-2">
|
||||||
icon={faTriangleExclamation}
|
<FontAwesomeIcon
|
||||||
className="mt-0.5 text-yellow-400"
|
icon={faTriangleExclamation}
|
||||||
/>
|
className="mt-0.5 text-yellow-400"
|
||||||
<span>
|
/>
|
||||||
The value of this secret is hidden because you do not have the
|
<span>
|
||||||
read secret value permission.
|
The value of this secret is hidden because you do not have the
|
||||||
</span>
|
read secret value permission.
|
||||||
</div>
|
</span>
|
||||||
) : undefined
|
</div>
|
||||||
}
|
) : undefined
|
||||||
label="Value"
|
}
|
||||||
>
|
label="Value"
|
||||||
<InfisicalSecretInput
|
>
|
||||||
isReadOnly={isReadOnly}
|
<div className="flex items-center gap-2">
|
||||||
environment={environment}
|
<InfisicalSecretInput
|
||||||
secretPath={secretPath}
|
isReadOnly={isReadOnly}
|
||||||
key="secret-value"
|
environment={environment}
|
||||||
isDisabled={isOverridden || !isAllowed}
|
secretPath={secretPath}
|
||||||
containerClassName="text-bunker-300 hover:border-primary-400/50 border border-mineshaft-600 bg-bunker-800 px-2 py-1.5"
|
key="secret-value"
|
||||||
{...field}
|
isDisabled={isOverridden || !isAllowed}
|
||||||
autoFocus={false}
|
containerClassName="text-bunker-300 w-full hover:border-primary-400/50 border border-mineshaft-600 bg-bunker-800 px-2 py-1.5"
|
||||||
/>
|
{...field}
|
||||||
</FormControl>
|
autoFocus={false}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
className="px-2 py-[0.43rem] font-normal"
|
||||||
|
variant="outline_bg"
|
||||||
|
leftIcon={<FontAwesomeIcon icon={faShare} />}
|
||||||
|
onClick={() => {
|
||||||
|
const value = secret?.valueOverride ?? secret?.value;
|
||||||
|
if (value) {
|
||||||
|
handleSecretShare(value);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Share
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</FormControl>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</ProjectPermissionCan>
|
</ProjectPermissionCan>
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-1 mt-1.5 flex items-center">
|
|
||||||
<Button
|
|
||||||
className="w-full px-2 py-[0.43rem] font-normal"
|
|
||||||
variant="outline_bg"
|
|
||||||
leftIcon={<FontAwesomeIcon icon={faShare} />}
|
|
||||||
onClick={() => {
|
|
||||||
const value = secret?.valueOverride ?? secret?.value;
|
|
||||||
if (value) {
|
|
||||||
handleSecretShare(value);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Share
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="mb-2 rounded border border-mineshaft-600 bg-mineshaft-900 p-4 px-0 pb-0">
|
<div className="mb-2 rounded border border-mineshaft-600 bg-mineshaft-900 p-4 px-0 pb-0">
|
||||||
<div className="mb-4 px-4">
|
<div className="mb-4 px-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user