Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Merge remote-tracking branch 'upstream/main' into feat/39

이강준242f7b80e769
diff --cc frontend/components/basic/dialog/AddServiceTokenDialog.js
index 33b07125df,7ff1789b82..59eecc29a6
--- a/frontend/components/basic/dialog/AddServiceTokenDialog.js
+++ b/frontend/components/basic/dialog/AddServiceTokenDialog.js
@@@ -42,10 -35,9 +36,10 @@@ const AddServiceTokenDialog = (
const [serviceTokenEnv, setServiceTokenEnv] = useState("Development");
const [serviceTokenExpiresIn, setServiceTokenExpiresIn] = useState("1 day");
const [serviceTokenCopied, setServiceTokenCopied] = useState(false);
+ const { t } = useTranslate();
const generateServiceToken = async () => {
- const latestFileKey = await getLatestFileKey(workspaceId);
+ const latestFileKey = await getLatestFileKey({ workspaceId });
const key = decryptAssymmetric({
ciphertext: latestFileKey.latestKey.encryptedKey,
diff --cc frontend/components/basic/layout.js
index aee5d5a99b,effe389427..c348888003
--- a/frontend/components/basic/layout.js
+++ b/frontend/components/basic/layout.js
@@@ -2,12 -2,12 +2,13 @@@
import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
+import useTranslation from "next-translate/useTranslation";
import {
+ faBookOpen,
faGear,
- faHouse,
- faLink,
+ faKey,
faMobile,
+ faPlug,
faUser,
} from "@fortawesome/free-solid-svg-icons";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
@@@ -57,10 -56,10 +59,10 @@@ export default function Layout({ childr
const workspaces = await getWorkspaces();
const currentWorkspaces = workspaces.map((workspace) => workspace.name);
if (!currentWorkspaces.includes(workspaceName)) {
- const newWorkspace = await createWorkspace(
+ const newWorkspace = await createWorkspace({
workspaceName,
- localStorage.getItem("orgData.id")
- );
- organizationId: localStorage.getItem("orgData.id")
- });
++ organizationId: localStorage.getItem("orgData.id"),
++ });
let newWorkspaceId;
try {
newWorkspaceId = newWorkspace._id;
@@@ -116,8 -115,8 +118,8 @@@
{
href:
"/dashboard/" + workspaceMapping[workspaceSelected] + "?Development",
- title: "Secrets",
+ title: t("nav:menu.secrets"),
- emoji: <FontAwesomeIcon icon={faHouse} />,
+ emoji: <FontAwesomeIcon icon={faKey} />,
},
{
href: "/users/" + workspaceMapping[workspaceSelected],
@@@ -126,8 -125,8 +128,8 @@@
},
{
href: "/integrations/" + workspaceMapping[workspaceSelected],
- title: "Integrations",
+ title: t("nav:menu.integrations"),
- emoji: <FontAwesomeIcon icon={faLink} />,
+ emoji: <FontAwesomeIcon icon={faPlug} />,
},
{
href: "/settings/project/" + workspaceMapping[workspaceSelected],
@@@ -158,9 -157,7 +160,8 @@@
router.push("/noprojects");
} else if (router.asPath != "/noprojects") {
const intendedWorkspaceId = router.asPath
- .split("/")[router.asPath.split("/").length - 1].split("?")[0];
+ .split("/")
+ [router.asPath.split("/").length - 1].split("?")[0];
-
// If a user is not a member of a workspace they are trying to access, just push them to one of theirs
if (
intendedWorkspaceId != "heroku" &&
@@@ -217,66 -209,88 +218,100 @@@
<NavBarDashboard />
<div className="flex flex-col md:flex-row flex-1">
<aside className="bg-bunker-600 border-r border-mineshaft-500 w-full md:w-60 h-screen">
- <nav>
- <div className="py-6"></div>
- <div className="flex justify-center w-full mt-7 mb-8 bg-bunker-600 w-full h-full flex flex-col items-center px-4">
- <div className="text-gray-400 self-start ml-1 mb-1 text-xs font-semibold tracking-wide">
- {t("nav:menu.project")}
+ <nav className="flex flex-col justify-between items-between h-full">
+ {/* <div className="py-6"></div> */}
+ <div>
+ <div className="flex justify-center w-full mt-[4.5rem] mb-6 bg-bunker-600 w-full h-20 flex flex-col items-center px-4">
+ <div className="text-gray-400 self-start ml-1 mb-1 text-xs font-semibold tracking-wide">
- PROJECT
++ {t("nav:menu.project")}
+ </div>
+ {workspaceList.length > 0 ? (
+ <Listbox
+ selected={workspaceSelected}
+ onChange={setWorkspaceSelected}
+ data={workspaceList}
+ buttonAction={openModal}
+ text=""
+ workspaceMapping={workspaceMapping}
+ />
+ ) : (
+ <Button
+ text="Add Project"
+ onButtonPressed={openModal}
+ color="mineshaft"
+ size="md"
+ icon={faPlus}
+ />
+ )}
</div>
- {workspaceList.length > 0 ? (
- <Listbox
- selected={workspaceSelected}
- onChange={setWorkspaceSelected}
- data={workspaceList}
- buttonAction={openModal}
- text=""
- workspaceMapping={workspaceMapping}
- />
- ) : (
- <Button
- text="Add Project"
- onButtonPressed={openModal}
- color="mineshaft"
- size="md"
- icon={faPlus}
- />
- )}
- </div>
- <ul>
- {workspaceList.length > 0 &&
- menuItems.map(({ href, title, emoji }) => (
- <li className="mt-1.5 mx-2" key={title}>
- {router.asPath.split("/")[1] === href.split("/")[1] &&
- (["project", "billing", "org", "personal"].includes(
- router.asPath.split("/")[2]
- )
- ? router.asPath.split("/")[2] === href.split("/")[2]
- : true) ? (
- <div
- className={`flex p-2 text-white text-sm rounded cursor-pointer bg-mineshaft-50/10`}
- >
- <div className="bg-primary w-1 rounded-xl mr-1"></div>
- <p className="ml-2 mr-4">{emoji}</p>
- {title}
- </div>
- ) : router.asPath == "/noprojects" ? (
- <div className={`flex p-2 text-white text-sm rounded`}>
- <p className="ml-2 mr-4">{emoji}</p>
- {title}
- </div>
- ) : (
- <Link href={href}>
+ <ul>
+ {workspaceList.length > 0 &&
+ menuItems.map(({ href, title, emoji }) => (
+ <li className="mt-0.5 mx-2" key={title}>
+ {router.asPath.split("/")[1] === href.split("/")[1] &&
+ (["project", "billing", "org", "personal"].includes(
+ router.asPath.split("/")[2]
+ )
+ ? router.asPath.split("/")[2] === href.split("/")[2]
+ : true) ? (
+ <div
+ className={`flex relative px-0.5 py-2.5 text-white text-sm rounded cursor-pointer bg-primary-50/10`}
+ >
+ <div className="absolute top-0 my-1 ml-1 inset-0 bg-primary w-1 rounded-xl mr-1"></div>
- <p className="w-6 ml-4 mr-2 flex items-center justify-center text-lg">{emoji}</p>
++ <p className="w-6 ml-4 mr-2 flex items-center justify-center text-lg">
++ {emoji}
++ </p>
+ {title}
+ </div>
+ ) : router.asPath == "/noprojects" ? (
- <div className={`flex p-2.5 text-white text-sm rounded`}>
- <p className="w-10 flex items-center justify-center text-lg">{emoji}</p>
+ <div
- className={`flex p-2 text-white text-sm rounded cursor-pointer hover:bg-mineshaft-50/5`}
++ className={`flex p-2.5 text-white text-sm rounded`}
+ >
- <p className="ml-2 mr-4">{emoji}</p>
++ <p className="w-10 flex items-center justify-center text-lg">
++ {emoji}
++ </p>
{title}
</div>
- </Link>
- )}
- </li>
- ))}
- </ul>
+ ) : (
+ <Link href={href}>
+ <div
+ className={`flex p-2.5 text-white text-sm rounded cursor-pointer hover:bg-primary-50/5`}
+ >
- <p className="w-10 flex items-center justify-center text-lg">{emoji}</p>
++ <p className="w-10 flex items-center justify-center text-lg">
++ {emoji}
++ </p>
+ {title}
+ </div>
+ </Link>
+ )}
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="w-full mt-40 mb-4 px-2">
+ {router.asPath.split("/")[1] === "home" ? (
+ <div
+ className={`flex relative px-0.5 py-2.5 text-white text-sm rounded cursor-pointer bg-primary-50/10`}
+ >
+ <div className="absolute top-0 my-1 ml-1 inset-0 bg-primary w-1 rounded-xl mr-1"></div>
- <p className="w-6 ml-4 mr-2 flex items-center justify-center text-lg"><FontAwesomeIcon icon={faBookOpen}/></p>
++ <p className="w-6 ml-4 mr-2 flex items-center justify-center text-lg">
++ <FontAwesomeIcon icon={faBookOpen} />
++ </p>
+ Infisical Guide
+ </div>
+ ) : (
+ <Link href={`/home/` + workspaceMapping[workspaceSelected]}>
+ <div
+ className={`flex p-2.5 text-white text-sm rounded cursor-pointer hover:bg-primary-50/5 mt-max border border-dashed border-bunker-400`}
+ >
- <p className="w-10 flex items-center justify-center text-lg"><FontAwesomeIcon icon={faBookOpen}/></p>
++ <p className="w-10 flex items-center justify-center text-lg">
++ <FontAwesomeIcon icon={faBookOpen} />
++ </p>
+ Infisical Guide
+ </div>
+ </Link>
+ )}
+ </div>
</nav>
</aside>
<AddWorkspaceDialog
diff --cc frontend/components/dashboard/DropZone.tsx
index e3af663b1a,7519bca10b..4bc684cea6
--- a/frontend/components/dashboard/DropZone.tsx
+++ b/frontend/components/dashboard/DropZone.tsx
@@@ -1,6 -1,5 +1,6 @@@
- import { useState } from "react";
+ import { type ChangeEvent, type DragEvent, useState } from "react";
import Image from "next/image";
+import useTranslation from "next-translate/useTranslation";
import { faUpload } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@@ -17,11 -27,8 +28,10 @@@ const DropZone = (
setButtonReady,
keysExist,
numCurrentRows,
- }) => {
+ }: DropZoneProps) => {
+ const { t } = useTranslation();
+
- const handleDragEnter = (e) => {
+ const handleDragEnter = (e: DragEvent) => {
e.preventDefault();
e.stopPropagation();
};
@@@ -143,13 -160,13 +161,13 @@@
) : (
<div
className="opacity-80 hover:opacity-100 duration-200 relative bg-bunker outline max-w-2xl w-full outline-dashed outline-gray-700 rounded-md outline-2 flex flex-col items-center justify-center pt-16 mb-16 px-4"
- onDragEnter={(e) => handleDragEnter(e)}
- onDragOver={(e) => handleDragOver(e)}
- onDragLeave={(e) => handleDragLeave(e)}
- onDrop={(e) => handleDrop(e)}
+ onDragEnter={handleDragEnter}
+ onDragOver={handleDragOver}
+ onDragLeave={handleDragLeave}
+ onDrop={handleDrop}
>
<FontAwesomeIcon icon={faUpload} className="text-7xl mb-8" />
- <p className="">Drag and drop your .env file here.</p>
+ <p className="">{t("common:drop-zone")}</p>
<input
id="fileSelect"
type="file"
diff --cc frontend/components/navigation/NavBarDashboard.tsx
index 9644c861ec,5a6d63b8e0..159a69daa4
--- a/frontend/components/navigation/NavBarDashboard.tsx
+++ b/frontend/components/navigation/NavBarDashboard.tsx
@@@ -17,18 -17,18 +17,19 @@@ import
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Menu, Transition } from "@headlessui/react";
-import logout from "~/pages/api/auth/Logout";
-import getOrganization from "~/pages/api/organization/GetOrg";
-import getOrganizations from "~/pages/api/organization/getOrgs";
-import getUser from "~/pages/api/user/getUser";
-
+import getOrganization from "../../pages/api/organization/GetOrg";
+import getOrganizations from "../../pages/api/organization/getOrgs";
+import getUser from "../../pages/api/user/getUser";
import guidGenerator from "../utilities/randomId";
-
-const supportOptions = [
++import logout from "~/pages/api/auth/Logout";
+/**
+ * @param {(key: string) => string} t
+ */
+const supportOptions = (t) => [
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faSlack} />,
- "Join Slack Forum",
- "https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g",
+ t("nav:support.slack"),
+ "https://join.slack.com/t/infisical/shared_invite/zt-1dgg63ln8-G7PCNJdCymAT9YF3j1ewVA",
],
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faBook} />,
@@@ -47,25 -47,38 +48,42 @@@
],
];
- export default function Navbar({ onButtonPressed }) {
+ export interface ICurrentOrg {
+ name: string;
+ }
+
+ export interface IUser {
+ firstName: string;
+ lastName: string;
+ email: string;
+ }
+
+ /**
- * This is the navigation bar in the main app.
++ * This is the navigation bar in the main app.
+ * It has two main components: support options and user menu (inlcudes billing, logout, org/user settings)
+ * @returns NavBar
+ */
+ export default function Navbar() {
const router = useRouter();
- const [user, setUser] = useState({});
+ const [user, setUser] = useState<IUser | undefined>();
const [orgs, setOrgs] = useState([]);
- const [currentOrg, setCurrentOrg] = useState([]);
+ const [currentOrg, setCurrentOrg] = useState<ICurrentOrg | undefined>();
+ const { t } = useTranslation("");
+
+ const supportOptionsList = useMemo(() => supportOptions(t), [t]);
+
- useEffect(async () => {
- const userData = await getUser();
- setUser(userData);
- const orgsData = await getOrganizations();
- setOrgs(orgsData);
- const currentOrg = await getOrganization({
- orgId: localStorage.getItem("orgData.id"),
- });
- setCurrentOrg(currentOrg);
+ useEffect(() => {
+ (async () => {
+ const userData = await getUser();
+ setUser(userData);
+ const orgsData = await getOrganizations();
+ setOrgs(orgsData);
+ const currentOrg = await getOrganization({
+ orgId: String(localStorage.getItem("orgData.id")),
+ });
+ setCurrentOrg(currentOrg);
+ })();
}, []);
const closeApp = async () => {
@@@ -110,8 -124,8 +128,8 @@@
<a
key={guidGenerator()}
target="_blank"
- rel="noopener noreferrer"
- href={url}
+ rel="noopener"
- href={String(option[2])}
++ href={String(url)}
className="font-normal text-gray-300 duration-200 rounded-md w-full flex items-center py-0.5"
>
<div className="relative flex justify-start items-center cursor-pointer select-none py-2 px-2 rounded-md text-gray-400 hover:bg-white/10 duration-200 hover:text-gray-200 w-full">
@@@ -241,9 -255,9 +259,10 @@@
<div className="flex flex-col items-start px-1 mt-3 mb-2">
{orgs
.filter(
- (org) => org._id != localStorage.getItem("orgData.id")
- (org : { _id: string }) => org._id != localStorage.getItem("orgData.id")
++ (org: { _id: string }) =>
++ org._id != localStorage.getItem("orgData.id")
)
- .map((org) => (
- .map((org : { _id: string; name: string; }) => (
++ .map((org: { _id: string; name: string }) => (
<div
key={guidGenerator()}
onClick={() => {
diff --cc frontend/locales/en-US.json
index 4dc57a519f,0000000000..defb49856b
mode 100644,000000..100644
--- a/frontend/locales/en-US.json
+++ b/frontend/locales/en-US.json
@@@ -1,216 -1,0 +1,216 @@@
+{
+ "common": {
+ "head-title": "{{title}} | Infiscal",
+ "error_project-already-exists": "A project with this name already exists.",
+ "no-mobile": " To use Infisical, please log in through a device with larger dimensions. ",
+ "email": "Email",
+ "password": "Password",
+ "first-name": "First Name",
+ "last-name": "Last Name",
+ "logout": "Log Out",
+ "validate-required": "Please input your {{name}}",
+
+ "maintenance-alert": "We are experiencing minor technical difficulties. We are working on solving it right now. Please come back in a few minutes.",
+ "click-to-copy": "Click to copy",
+ "project-id": "Project ID",
+ "save-changes": "Save Changes",
+ "saved": "Saved",
+ "drop-zone": "Drag and drop your .env file here.",
+ "drop-zone-keys": "Drag and drop your .env file here to add more keys.",
+ "role": "Role",
+ "role_admin": "admin",
+ "display-name": "Display Name",
+ "environment": "Environment",
+ "expired-in": "Expires in",
+ "language": "Language",
+ "search": "Search..."
+ },
+ "form-password": {
+ "password": "Password",
+ "change": "Change password",
+ "current": "Current password",
+ "current-wrong": "The current password may be wrong",
+ "new": "New password",
+ "validate-base": "Password should contain at least:",
+ "validate-length": "14 characters",
+ "validate-case": "1 lowercase character",
+ "validate-number": "1 number"
+ },
+ "nav": {
+ "support": {
+ "slack": "[NEW] Join Slack Forum",
+ "docs": "Read Docs",
+ "issue": "Open a Github Issue",
+ "email": "Send us an Email"
+ },
+ "user": {
+ "signed-in-as": "SIGNED IN AS",
+ "current-organization": "CURRENT ORGANIZATION",
+ "usage-billing": "Usage & Billing",
+ "invite": "Invite Members",
+ "other-organizations": "OTHER ORGANIZATION"
+ },
+ "menu": {
+ "project": "PROJECT",
+ "secrets": "Secrets",
+ "members": "Members",
+ "integrations": "Integrations",
+ "project-settings": "Project Settings"
+ }
+ },
+ "login": {
+ "title": "Login",
+ "og-title": "Log In to Infisical",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
+ "login": "Log In",
+ "need-account": "Need an Infisical account?",
+ "create-account": "Create an account"
+ },
+ "signup": {
+ "title": "Sign Up",
+ "og-title": "Replace .env files with 1 line of code. Sign Up for Infisical in 3 minutes.",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage API-keys and environemntal variables. Works with Node.js, Next.js, Gatsby, Nest.js...",
+ "signup": "Sign Up",
+ "already-have-account": "Have an account? Log in",
+ "forgot-password": "Forgot your password?",
+ "verify": "Verify",
+ "step1-start": "Let's get started",
+ "step1-privacy": "By creating an account, you agree to our Terms and have read and acknowledged the Privacy Policy.",
+ "step1-submit": "Get Started",
+ "step2-message": "<wrapper>We've sent a verification email to</wrapper><email>{{email}}</email>",
+ "step2-code-error": "Oops. Your code is wrong. Please try again.",
+ "step2-spam-alert": "Make sure to check your spam inbox.",
+ "step3-message": "Almost there!",
+ "step4-message": "Save your Emergency Kit",
+ "step4-description1": "If you get locked out of your account, your Emergency Kit is the only way to sign in.",
+ "step4-description2": "We recommend you download it and keep it somewhere safe.",
+ "step4-description3": "It contains your Secret Key which we cannot access or recover for you if you lose it.",
+ "step4-download": "Download PDF"
+ },
+ "dashboard": {
+ "title": "Secrets",
+ "og-title": "Manage your .env files in seconds",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
+ "search-keys": "Search keys...",
+ "add-key": "Add Key",
+ "personal": "Personal",
+ "personal-description": "Personal keys are only visible to you",
+ "shared": "Shared",
+ "shared-description": "Shared keys are visible to your whole team",
+ "make-shared": "Make Shared",
+ "make-personal": "Make Personal",
+ "check-docs": {
+ "button": "Check Docs",
+ "title": "Good job!",
+ "line1": "Congrats on adding more secrets.",
+ "line2": "Here is how to connect them to your codebase."
+ }
+ },
+ "settings-members": {
+ "title": "Project Members",
+ "description": "This pages shows the members of the selected project."
+ },
+ "settings-org": {
+ "title": "Organization Settings",
+ "description": "Manage members of your organization. These users could afterwards be formed into projects."
+ },
+ "settings-personal": {
+ "title": "Personal Settings",
+ "description": "View and manage your personal information here.",
+ "emergency": {
+ "name": "Emergency Kit",
+ "text1": "Your Emergency Kit contains the information you’ll need to sign in to your Infisical account.",
+ "text2": "Only the latest issued Emergency Kit remains valid. To get a new Emergency Kit, verify your password.",
+ "download": "Download Emergency Kit"
+ },
+ "change-language": "Change Language"
+ },
+ "settings-project": {
+ "title": "Project Settings",
+ "description": "These settings only apply to the currently selected Project.",
+ "danger-zone": "Danger Zone",
+ "delete-project": "Delete Project",
+ "project-to-delete": "Project to be Deleted",
+ "danger-zone-note": "As soon as you delete this project, you will not be able to undo it. This will immediately remove all the keys. If you still want to do that, please enter the name of the project below.",
+ "delete-project-note": "Note: You can only delete a project in case you have more than one",
+ "project-id-description": "To integrate Infisical into your code base and get automatic injection of environmental variables, you should use the following Project ID.",
+ "project-id-description2": "For more guidance, including code snipets for various languages and frameworks, see ",
+ "auto-generated": "This is your project's auto-generated unique identifier. It can't be changed.",
+ "docs": "Infisical Docs"
+ },
+ "section-token": {
+ "service-tokens": "Service Tokens",
+ "service-tokens-description": "Every service token is specific to you, a certain project and a certain environment within this project.",
+ "add-new": "Add New Token",
+ "add-dialog": {
+ "title": "Add a service token for {{target}}",
+ "description": "Specify the name, environment, and expiry period. When a token is generated, you will only be able to see it once before it disappears. Make sure to save it somewhere.",
+ "name": "Service Token Name",
+ "add": "Add Service Token",
+ "copy-service-token": "Copy your service token",
+ "copy-service-token-description": "Once you close this popup, you will never see your service token again"
+ }
+ },
+ "billing": {
+ "title": "Usage & Billing",
+ "description": "View and manage your organization's subscription here",
+ "subscription": "Subscription",
+ "starter": {
+ "name": "Starter",
+ "price-explanation": "up to 5 team members",
+ "text": "Manage any project with 5 members for free!",
+ "subtext": "$5 per member/month afterwards."
+ },
+ "professional": {
+ "name": "Professional",
+ "price-explanation": "/member/month",
+ "subtext": "Includes unlimited projects & members.",
+ "text": "Keep up with key management as you grow."
+ },
+ "enterprise": {
+ "name": "Enterprise",
+ "text": "Keep up with key management as you grow."
+ },
+ "current-usage": "Current Usage",
+ "free": "Free",
+ "downgrade": "Downgrade",
+ "upgrade": "Upgrade",
+ "learn-more": "Learn More",
+ "custom-pricing": "Custom Pricing",
+ "schedule-demo": "Schedule a Demo"
+ },
+ "section-members": {
+ "add-member": "Add Member",
+ "org-members": "Organization Members",
+ "org-members-description": "Manage members of your organization. These users could afterwards be formed into projects.",
+ "search-members": "Search members...",
+ "add-dialog": {
+ "add-member-to-project": "Add a member to your project",
+ "already-all-invited": "All the users in your organization are already invited.",
+ "add-user-org-first": "Add more users to the organization first.",
+ "user-will-email": "The user will receive an email with the instructions.",
+ "looking-add": "<0>If you are looking to add users to your org,</0><1>click here</1>",
+ "add-user-to-org": "Add Users to Organization"
+ }
+ },
+ "section-incident": {
+ "incident-contacts": "Incident Contacts",
+ "incident-contacts-description": "These contacts will be notified in the unlikely event of a severe incident.",
+ "no-incident-contacts": "No incident contacts found.",
+ "add-contact": "Add Contact",
+ "add-dialog": {
+ "title": "Add an Incident Contact",
+ "description": "This contact will be notified in the unlikely event of a severe incident.",
+ "add-incident": "Add Incident Contact"
+ }
+ },
+ "integrations": {
+ "title": "Project Integrations",
+ "description": "Manage your integrations of Infisical with third-party services.",
+ "no-integrations1": "You don't have any integrations set up yet. When you do, they will appear here.",
+ "no-integrations2": "To start, click on any of the options below. It takes 5 clicks to set up.",
- "available": "Available Integrations",
++ "available": "Platform & Cloud Integrations",
+ "available-text1": "Click on the itegration you want to connect. This will let your environment variables flow automatically into selected third-party services.",
+ "available-text2": " Note: during an integration with Heroku, for security reasons, it is impossible to maintain end-to-end encryption. In theory, this lets Infisical decrypt yor environment variables. In practice, we can assure you that this will never be done, and it allows us to protect your secrets from bad actors online. The core Infisical service will always stay end-to-end encrypted. With any questions, reach out [email protected]."
+ }
+}
diff --cc frontend/next.config.js
index 429c91c49f,2ae4b76413..905aa8c8a3
--- a/frontend/next.config.js
+++ b/frontend/next.config.js
@@@ -1,17 -1,12 +1,13 @@@
// next.config.js
+const nextTranslate = require("next-translate");
const ContentSecurityPolicy = `
- default-src ${process.env.NEXT_PUBLIC_WEBSITE_URL};
- script-src ${
- process.env.NEXT_PUBLIC_WEBSITE_URL
- } https://app.posthog.com https://infisical.com https://assets.calendly.com/ https://js.stripe.com https://api.stripe.com 'unsafe-inline' 'unsafe-eval';
+ default-src 'self';
+ script-src 'self' https://app.posthog.com https://js.stripe.com https://api.stripe.com 'unsafe-inline' 'unsafe-eval';
style-src 'self' https://rsms.me 'unsafe-inline';
- child-src https://infisical.com https://api.stripe.com;
+ child-src https://api.stripe.com;
frame-src https://js.stripe.com/ https://api.stripe.com;
- connect-src ws://${process.env.NEXT_PUBLIC_WEBSITE_URL?.split("//")[1]} ${
- process.env.NEXT_PUBLIC_WEBSITE_URL
- } https://api.github.com/repos/Infisical/infisical-cli https://api.heroku.com/ https://id.heroku.com/oauth/authorize https://id.heroku.com/oauth/token https://checkout.stripe.com https://app.posthog.com https://infisical.com https://api.stripe.com https://vitals.vercel-insights.com/v1/vitals;
+ connect-src 'self' https://api.heroku.com/ https://id.heroku.com/oauth/authorize https://id.heroku.com/oauth/token https://checkout.stripe.com https://app.posthog.com https://api.stripe.com;
img-src 'self' https://*.stripe.com https://i.ytimg.com/ data:;
media-src;
font-src 'self' https://maxcdn.bootstrapcdn.com https://rsms.me https://fonts.gstatic.com;
diff --cc frontend/package-lock.json
index ad2ecb75e4,7a560ad3fa..38dd5afd02
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@@ -28,6 -28,6 +28,7 @@@
"jsrp": "^0.2.4",
"markdown-it": "^13.0.1",
"next": "^12.2.5",
++ "next-translate": "^1.6.0",
"posthog-js": "^1.34.0",
"query-string": "^7.1.1",
"react": "^17.0.2",
@@@ -50,9 -50,13 +51,12 @@@
"devDependencies": {
"@tailwindcss/typography": "^0.5.4",
"@types/node": "18.11.9",
+ "@typescript-eslint/eslint-plugin": "^5.45.0",
+ "@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.7",
- "eslint": "^8.28.0",
+ "eslint": "^8.29.0",
"eslint-config-next": "^13.0.5",
+ "eslint-import-resolver-typescript": "^3.5.2",
- "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"postcss": "^8.4.14",
"prettier": "2.7.1",
@@@ -5143,6 -5150,6 +5123,15 @@@
}
}
},
++ "node_modules/next-translate": {
++ "version": "1.6.0",
++ "resolved": "https://registry.npmjs.org/next-translate/-/next-translate-1.6.0.tgz",
++ "integrity": "sha512-rmRBYOwPHvokN+5uH3O/SZqfRUVORLkgt/097mSaq3+CWcEtXEjkVrfBZpYwZ8W3og4QVd+uphYX//qegnIbRg==",
++ "peerDependencies": {
++ "next": ">= 10.0.0",
++ "react": ">= 16.8.0"
++ }
++ },
"node_modules/node-releases": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
@@@ -10850,6 -10851,6 +10811,12 @@@
"use-sync-external-store": "1.2.0"
}
},
++ "next-translate": {
++ "version": "1.6.0",
++ "resolved": "https://registry.npmjs.org/next-translate/-/next-translate-1.6.0.tgz",
++ "integrity": "sha512-rmRBYOwPHvokN+5uH3O/SZqfRUVORLkgt/097mSaq3+CWcEtXEjkVrfBZpYwZ8W3og4QVd+uphYX//qegnIbRg==",
++ "requires": {}
++ },
"node-releases": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
diff --cc frontend/pages/dashboard/[id].js
index b4cc2f728a,b2dfd70f4b..a4dc9c7820
--- a/frontend/pages/dashboard/[id].js
+++ b/frontend/pages/dashboard/[id].js
@@@ -66,9 -60,9 +61,10 @@@ const KeyPair = (
modifyValue,
modifyVisibility,
isBlurred,
+ duplicates
}) => {
const [randomStringLength, setRandomStringLength] = useState(32);
+ const { t } = useTranslation();
return (
<div className="px-1 flex flex-col items-center ml-1">
diff --cc frontend/pages/integrations/[id].js
index aa9dd84127,898882e311..264475ec21
--- a/frontend/pages/integrations/[id].js
+++ b/frontend/pages/integrations/[id].js
@@@ -18,6 -17,11 +18,11 @@@ import getSecretsForProject from "~/com
import pushKeysIntegration from "~/components/utilities/secrets/pushKeysIntegration";
import guidGenerator from "~/utilities/randomId";
-import {
- envMapping,
- frameworks,
- reverseEnvMapping
++import {
++ envMapping,
++ frameworks,
++ reverseEnvMapping,
+ } from "../../public/data/frequentConstants";
import deleteIntegration from "../api/integrations/DeleteIntegration";
import deleteIntegrationAuth from "../api/integrations/DeleteIntegrationAuth";
import getIntegrationApps from "../api/integrations/GetIntegrationApps";
@@@ -251,18 -239,24 +242,18 @@@ export default function Integrations()
)}
<div className="flex flex-col justify-between items-start mx-4 mt-12 mb-4 text-xl max-w-5xl px-2">
<div className="flex flex-row justify-start items-center text-3xl">
- <p className="font-semibold mr-4">Platform & Cloud Integrations</p>
+ <p className="font-semibold mr-4">
+ {t("integrations:available")}
+ </p>
</div>
<p className="mr-4 text-base text-gray-400">
- Click on the itegration you want to connect. This will let your
- environment variables flow automatically into selected third-party
- services.
+ {t("integrations:available-text1")}
</p>
<p className="mr-4 text-xs text-gray-600 mt-1">
- Note: during an integration with Heroku, for security reasons, it
- is impossible to maintain end-to-end encryption. In theory, this
- lets Infisical decrypt yor environment variables. In practice, we
- can assure you that this will never be done, and it allows us to
- protect your secrets from bad actors online. The core Infisical
- service will always stay end-to-end encrypted. With any questions,
- reach out [email protected].
+ {t("integrations:available-text2")}
</p>
</div>
- <div className="grid gap-4 grid-cols-3 grid-rows-3 mx-6 mt-4 max-w-5xl">
+ <div className="grid gap-4 grid-cols-4 grid-rows-2 mx-6 mt-4 max-w-5xl">
{Object.keys(integrations).map((integration) => (
<div
className={`relative ${
@@@ -350,6 -344,35 +341,46 @@@
</div>
))}
</div>
+ <div className="flex flex-col justify-between items-start mx-4 mt-12 mb-4 text-xl max-w-5xl px-2">
+ <div className="flex flex-row justify-start items-center text-3xl">
+ <p className="font-semibold mr-4">Framework Integrations</p>
+ </div>
+ <p className="mr-4 text-base text-gray-400">
+ Click on a framework to get the setup instructions.
+ </p>
- </div><div className="grid gap-4 grid-cols-7 grid-rows-2 mx-6 mt-4 max-w-5xl">
++ </div>
++ <div className="grid gap-4 grid-cols-7 grid-rows-2 mx-6 mt-4 max-w-5xl">
+ {frameworks.map((framework) => (
+ <div key={framework.name}>
+ <a
+ href={framework.link}
+ rel="noopener"
+ className={`relative flex flex-row items-center justify-center bg-bunker-500 hover:bg-gradient-to-tr hover:from-sky-400 hover:to-primary duration-200 h-32 rounded-md p-0.5 items-center cursor-pointer`}
+ >
- <div className={`font-semibold bg-bunker-500 flex flex-col items-center justify-center h-full w-full rounded-md text-gray-300 group-hover:text-gray-200 duration-200 ${framework?.name?.split(" ").length > 1 ? "text-sm px-1" : "text-xl px-2"} text-center w-full max-w-xs`}>
- {framework?.image && <Image
- src={`/images/integrations/${framework.image}.png`}
- height={framework?.name ? 60 : 90}
- width={framework?.name ? 60 : 90}
- alt="integration logo"
- ></Image>}
- {framework?.name && framework?.image && <div className="h-2"></div>}
++ <div
++ className={`font-semibold bg-bunker-500 flex flex-col items-center justify-center h-full w-full rounded-md text-gray-300 group-hover:text-gray-200 duration-200 ${
++ framework?.name?.split(" ").length > 1
++ ? "text-sm px-1"
++ : "text-xl px-2"
++ } text-center w-full max-w-xs`}
++ >
++ {framework?.image && (
++ <Image
++ src={`/images/integrations/${framework.image}.png`}
++ height={framework?.name ? 60 : 90}
++ width={framework?.name ? 60 : 90}
++ alt="integration logo"
++ ></Image>
++ )}
++ {framework?.name && framework?.image && (
++ <div className="h-2"></div>
++ )}
+ {framework?.name && framework.name}
+ </div>
+ </a>
+ </div>
+ ))}
+ </div>
</div>
</div>
</div>
diff --cc frontend/pages/signup.js
index 6c3d0b0f06,77c3c7ef46..06632014eb
--- a/frontend/pages/signup.js
+++ b/frontend/pages/signup.js
@@@ -473,7 -455,7 +473,7 @@@ export default function SignUp()
</div>
<div className="flex flex-col items-center justify-center md:p-2 max-h-48 max-w-max mx-auto text-lg px-2 py-3">
<Button
- text={t("auth:signup")}
- text="Sign Up"
++ text={t("signup:signup")}
loading={isLoading}
onButtonPressed={signupErrorCheck}
size="lg"
@@@ -486,19 -468,25 +486,19 @@@
const step4 = (
<div className="bg-bunker flex flex-col items-center w-full max-w-xs md:max-w-lg mx-auto h-7/12 py-8 px-4 md:px-6 mx-1 mb-36 md:mb-16 rounded-xl drop-shadow-xl">
<p className="text-4xl text-center font-semibold flex justify-center text-transparent bg-clip-text bg-gradient-to-br from-sky-400 to-primary">
- {t("auth:step4-message")}
- Save your Emergency Kit
++ {t("signup:step4-message")}
</p>
<div className="flex flex-col items-center justify-center w-full mt-4 md:mt-8 max-w-md text-gray-400 text-md rounded-md px-2">
- <div>{t("auth:step4-description1")}</div>
- <div className="mt-3">{t("auth:step4-description2")}</div>
- <div>
- If you get locked out of your account, your Emergency Kit is the only
- way to sign in.
- </div>
- <div className="mt-3">
- We recommend you download it and keep it somewhere safe.
- </div>
++ <div>{t("signup:step4-description1")}</div>
++ <div className="mt-3">{t("signup:step4-description2")}</div>
</div>
<div className="w-full p-2 flex flex-row items-center bg-white/10 text-gray-400 rounded-md max-w-xs md:max-w-md mx-auto mt-4">
<FontAwesomeIcon icon={faWarning} className="ml-2 mr-4 text-4xl" />
- {t("auth:step4-description3")}
- It contains your Secret Key which we cannot access or recover for you if
- you lose it.
++ {t("signup:step4-description3")}
</div>
<div className="flex flex-row items-center justify-center w-3/4 md:w-full md:p-2 max-h-28 max-w-max mx-auto mt-6 py-1 md:mt-4 text-lg text-center md:text-left">
<Button
- text={t("auth:step4-download")}
- text="Download PDF"
++ text={t("signup:step4-download")}
onButtonPressed={async () => {
await issueBackupKey({
email,