diff --git a/README.md b/README.md index c5a0d3abc..062d259c5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

- Slack | + Slack | Infisical Cloud | Self-Hosting | Docs | @@ -36,7 +36,7 @@ Cloudsmith downloads - + Slack community channel @@ -135,12 +135,12 @@ Whether it's big or small, we love contributions. Check out our guide to see how Not sure where to get started? You can: - [Book a free, non-pressure pairing session / code walkthrough with one of our teammates](https://cal.com/tony-infisical/30-min-meeting-contributing)! -- Join our Slack, and ask us any questions there. +- Join our Slack, and ask us any questions there. ## Resources - [Docs](https://infisical.com/docs/documentation/getting-started/introduction) for comprehensive documentation and guides -- [Slack](https://join.slack.com/t/infisical-users/shared_invite/zt-1wehzfnzn-1aMo5JcGENJiNAC2SD8Jlg) for discussion with the community and Infisical team. +- [Slack](https://infisical.com/slack) for discussion with the community and Infisical team. - [GitHub](https://github.com/Infisical/infisical) for code, issues, and pull requests - [Twitter](https://twitter.com/infisical) for fast news - [YouTube](https://www.youtube.com/@infisical_od) for videos on secret management diff --git a/docs/mint.json b/docs/mint.json index e496d7638..7935f34b9 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -73,7 +73,7 @@ { "name": "Slack", "icon": "slack", - "url": "https://join.slack.com/t/infisical-users/shared_invite/zt-1wehzfnzn-1aMo5JcGENJiNAC2SD8Jlg" + "url": "https://infisical.com/slack" }, { "name": "GitHub", diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx index 1e0c7f224..6a8bd0b9f 100644 --- a/frontend/src/layouts/AppLayout/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout/AppLayout.tsx @@ -301,7 +301,7 @@ export const AppLayout = ({ children }: LayoutProps) => { Documentation {orgWorkspaces.length !== 0 &&
diff --git a/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx b/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx index fdb413226..fd79785d3 100644 --- a/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx +++ b/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx @@ -1,9 +1,11 @@ /* eslint-disable react/jsx-no-useless-fragment */ -import { memo, useRef } from "react"; +import { memo, useEffect, useRef } from "react"; import { Controller, useFieldArray, useFormContext, useWatch } from "react-hook-form"; import { + faCheck, faCodeBranch, faComment, + faCopy, faEllipsis, faInfoCircle, faPlus, @@ -30,6 +32,7 @@ import { TextArea, Tooltip } from "@app/components/v2"; +import { useToggle } from "@app/hooks"; import { WsTag } from "@app/hooks/api/types"; import { FormData, SecretActionType } from "../../DashboardPage.utils"; @@ -95,6 +98,16 @@ export const SecretInputRow = memo( name: `secrets.${index}.key`, disabled: isKeySubDisabled.current }); + const secValue = useWatch({ + control, + name: `secrets.${index}.value`, + disabled: isKeySubDisabled.current + }); + const secValueOverride = useWatch({ + control, + name: `secrets.${index}.valueOverride`, + disabled: isKeySubDisabled.current + }) const secId = useWatch({ control, name: `secrets.${index}._id` }); const tags = useWatch({ control, name: `secrets.${index}.tags`, defaultValue: [] }) || []; @@ -103,6 +116,21 @@ export const SecretInputRow = memo( {} ); + const [isInviteLinkCopied, setInviteLinkCopied] = useToggle(false); + + useEffect(() => { + let timer: NodeJS.Timeout; + if (isInviteLinkCopied) { + timer = setTimeout(() => setInviteLinkCopied.off(), 2000); + } + return () => clearTimeout(timer); + }, [isInviteLinkCopied]); + + const copyTokenToClipboard = () => { + navigator.clipboard.writeText((secValueOverride || secValue) as string); + setInviteLinkCopied.on(); + }; + // when secret is override by personal values const isOverridden = overrideAction === SecretActionType.Created || overrideAction === SecretActionType.Modified; @@ -223,6 +251,19 @@ export const SecretInputRow = memo( {slug} ))} +
+ + + + + +
{!(isReadOnly || isAddOnly || isRollbackMode) && (