Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Merge remote-tracking branch 'upstream/main' into feat/39
이강준5b8337ac418a
diff --cc backend/package-lock.jsonindex 63a3a30606,85b168c1ef..3f555b8dea--- a/backend/package-lock.json+++ b/backend/package-lock.json@@@ -23,21 -26,23 +26,25 @@@"express-validator": "^6.14.2","handlebars": "^4.7.7","helmet": "^5.1.1",- "jsonwebtoken": "^8.5.1",+ "jsonwebtoken": "^9.0.0","jsrp": "^0.2.4",- "mongoose": "^6.7.1",+ "libsodium-wrappers": "^0.7.10",+ "mongoose": "^6.7.2","nodemailer": "^6.8.0",- "posthog-node": "^2.1.0",- "query-string": "^7.1.1",+ "posthog-node": "^2.2.2",+ "query-string": "^7.1.3","rimraf": "^3.0.2","stripe": "^10.7.0",+ "swagger-jsdoc": "^6.2.5",+ "swagger-ui-express": "^4.6.0","tweetnacl": "^1.0.3","tweetnacl-util": "^0.15.1",- "typescript": "^4.8.4"+ "typescript": "^4.9.3",+ "winston": "^3.8.2",+ "winston-loki": "^6.0.6"},"devDependencies": {+ "@jest/globals": "^29.3.1","@posthog/plugin-scaffold": "^1.3.4","@types/cookie-parser": "^1.4.3","@types/cors": "^2.8.12",@@@ -10917,17 -11518,8 +11639,16 @@@"node_modules/yallist": {"version": "4.0.0","resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",- "dev": true+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="},+ "node_modules/yaml": {+ "version": "2.0.0-1",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz",+ "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ==",+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/yargs": {"version": "17.6.2","resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz",@@@ -19306,14 -20369,8 +20617,13 @@@"yallist": {"version": "4.0.0","resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",- "dev": true+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="},+ "yaml": {+ "version": "2.0.0-1",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz",+ "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ=="+ },"yargs": {"version": "17.6.2","resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz",diff --cc frontend/components/basic/Layout.tsxindex 721dfd5ebb,56a16cb3de..5a8d4098ce--- a/frontend/components/basic/Layout.tsx+++ b/frontend/components/basic/Layout.tsx@@@ -10,28 -9,30 +10,30 @@@ importfaKey,faMobile,faPlug,- faUser-} from '@fortawesome/free-solid-svg-icons';-import { faPlus } from '@fortawesome/free-solid-svg-icons';-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+ faUser,+} from "@fortawesome/free-solid-svg-icons";+import { faPlus } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import getOrganizations from '~/pages/api/organization/getOrgs';-import getOrganizationUserProjects from '~/pages/api/organization/GetOrgUserProjects';-import getOrganizationUsers from '~/pages/api/organization/GetOrgUsers';-import checkUserAction from '~/pages/api/userActions/checkUserAction';-import addUserToWorkspace from '~/pages/api/workspace/addUserToWorkspace';-import createWorkspace from '~/pages/api/workspace/createWorkspace';-import getWorkspaces from '~/pages/api/workspace/getWorkspaces';-import uploadKeys from '~/pages/api/workspace/uploadKeys';+import getOrganizations from "~/pages/api/organization/getOrgs";+import getOrganizationUserProjects from "~/pages/api/organization/GetOrgUserProjects";+import getOrganizationUsers from "~/pages/api/organization/GetOrgUsers";++import checkUserAction from "~/pages/api/userActions/checkUserAction";+import addUserToWorkspace from "~/pages/api/workspace/addUserToWorkspace";+import createWorkspace from "~/pages/api/workspace/createWorkspace";+import getWorkspaces from "~/pages/api/workspace/getWorkspaces";+import uploadKeys from "~/pages/api/workspace/uploadKeys";-import NavBarDashboard from '../navigation/NavBarDashboard';-import onboardingCheck from '../utilities/checks/OnboardingCheck';-import { tempLocalStorage } from '../utilities/checks/tempLocalStorage';+import NavBarDashboard from "../navigation/NavBarDashboard";++import onboardingCheck from "../utilities/checks/OnboardingCheck";+import { tempLocalStorage } from "../utilities/checks/tempLocalStorage";import {decryptAssymmetric,- encryptAssymmetric-} from '../utilities/cryptography/crypto';-import Button from './buttons/Button';-import AddWorkspaceDialog from './dialog/AddWorkspaceDialog';-import Listbox from './Listbox';+ encryptAssymmetric,+} from "../utilities/cryptography/crypto";+import Button from "./buttons/Button";+import AddWorkspaceDialog from "./dialog/AddWorkspaceDialog";+import Listbox from "./Listbox";interface LayoutProps {children: React.ReactNode;@@@ -40,15 -41,15 +42,17 @@@export default function Layout({ children }: LayoutProps) {const router = useRouter();const [workspaceList, setWorkspaceList] = useState([]);- const [workspaceMapping, setWorkspaceMapping] = useState([{ 1: 2 }]);- const [workspaceMapping, setWorkspaceMapping] = useState([{ '1': '2' }]);- const [workspaceSelected, setWorkspaceSelected] = useState('∞');- const [newWorkspaceName, setNewWorkspaceName] = useState('');++ const [workspaceMapping, setWorkspaceMapping] = useState([{ "1": "2" }]);+ const [workspaceSelected, setWorkspaceSelected] = useState("∞");+ const [newWorkspaceName, setNewWorkspaceName] = useState("");const [isOpen, setIsOpen] = useState(false);const [loading, setLoading] = useState(false);const [error, setError] = useState(false);+ const [totalOnboardingActionsDone, setTotalOnboardingActionsDone] =+ useState(0);+ const { t } = useTranslation();+function closeModal() {setIsOpen(false);}@@@ -222,20 -221,20 +227,20 @@@useEffect(() => {try {if (- workspaceMapping[Number(workspaceSelected)] &&- `${workspaceMapping[Number(workspaceSelected)]}` !==+ workspaceMapping[workspaceSelected as any] &&+ `${workspaceMapping[workspaceSelected as any]}` !==router.asPath- .split('/')- [router.asPath.split('/').length - 1].split('?')[0]+ .split("/")+ [router.asPath.split("/").length - 1].split("?")[0]) {router.push(- '/dashboard/' ++ "/dashboard/" +- workspaceMapping[Number(workspaceSelected)] ++ workspaceMapping[workspaceSelected as any] +- '?Development'+ "?Development");localStorage.setItem(- 'projectData.id',+ "projectData.id",- `${workspaceMapping[Number(workspaceSelected)]}`+ `${workspaceMapping[workspaceSelected as any]}`);}} catch (error) {@@@ -329,6 -332,19 +338,19 @@@<FontAwesomeIcon icon={faBookOpen} /></p>Infisical Guide+ <img+ src={`/images/progress-${- totalOnboardingActionsDone == 0 ? '0' : ''- }${totalOnboardingActionsDone == 1 ? '14' : ''}${- totalOnboardingActionsDone == 2 ? '28' : ''- }${totalOnboardingActionsDone == 3 ? '43' : ''}${- totalOnboardingActionsDone == 4 ? '57' : ''- }${totalOnboardingActionsDone == 5 ? '71' : ''}.svg`}++ totalOnboardingActionsDone == 0 ? "0" : ""++ }${totalOnboardingActionsDone == 1 ? "14" : ""}${++ totalOnboardingActionsDone == 2 ? "28" : ""++ }${totalOnboardingActionsDone == 3 ? "43" : ""}${++ totalOnboardingActionsDone == 4 ? "57" : ""++ }${totalOnboardingActionsDone == 5 ? "71" : ""}.svg`}+ height={58}+ width={58}+ alt="progress bar"+ className="absolute right-2 -top-2"+ ></img></div>) : (<Link@@@ -341,6 -357,19 +363,19 @@@<FontAwesomeIcon icon={faBookOpen} /></p>Infisical Guide+ <img+ src={`/images/progress-${- totalOnboardingActionsDone == 0 ? '0' : ''- }${totalOnboardingActionsDone == 1 ? '14' : ''}${- totalOnboardingActionsDone == 2 ? '28' : ''- }${totalOnboardingActionsDone == 3 ? '43' : ''}${- totalOnboardingActionsDone == 4 ? '57' : ''- }${totalOnboardingActionsDone == 5 ? '71' : ''}.svg`}++ totalOnboardingActionsDone == 0 ? "0" : ""++ }${totalOnboardingActionsDone == 1 ? "14" : ""}${++ totalOnboardingActionsDone == 2 ? "28" : ""++ }${totalOnboardingActionsDone == 3 ? "43" : ""}${++ totalOnboardingActionsDone == 4 ? "57" : ""++ }${totalOnboardingActionsDone == 5 ? "71" : ""}.svg`}+ height={58}+ width={58}+ alt="progress bar"+ className="absolute right-2 -top-2"+ ></img></div></Link>)}diff --cc frontend/components/basic/dialog/AddServiceTokenDialog.jsindex 59eecc29a6,ddb20cce35..b02a804b70--- a/frontend/components/basic/dialog/AddServiceTokenDialog.js+++ b/frontend/components/basic/dialog/AddServiceTokenDialog.js@@@ -1,42 -1,40 +1,42 @@@-import { Fragment, useState } from 'react';-import { faCheck, faCopy } from '@fortawesome/free-solid-svg-icons';-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';-import { Dialog, Transition } from '@headlessui/react';-import nacl from 'tweetnacl';+import { Fragment, useState } from "react";- import { useRouter } from "next/router";- import useTranslate from "next-translate/useTranslation";++import { useTranslation } from "next-i18next";+import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Dialog, Transition } from "@headlessui/react";+import nacl from "tweetnacl";-import addServiceToken from '~/pages/api/serviceToken/addServiceToken';-import getLatestFileKey from '~/pages/api/workspace/getLatestFileKey';+import addServiceToken from "~/pages/api/serviceToken/addServiceToken";+import getLatestFileKey from "~/pages/api/workspace/getLatestFileKey";-import { envMapping } from '../../../public/data/frequentConstants';+import { envMapping } from "../../../public/data/frequentConstants";import {decryptAssymmetric,- encryptAssymmetric-} from '../../utilities/cryptography/crypto';-import Button from '../buttons/Button';-import InputField from '../InputField';-import ListBox from '../Listbox';+ encryptAssymmetric,+} from "../../utilities/cryptography/crypto";+import Button from "../buttons/Button";+import InputField from "../InputField";+import ListBox from "../Listbox";const expiryMapping = {- '1 day': 86400,- '7 days': 604800,- '1 month': 2592000,- '6 months': 15552000,- '12 months': 31104000+ "1 day": 86400,+ "7 days": 604800,+ "1 month": 2592000,++ "6 months": 15552000,++ "12 months": 31104000,};const AddServiceTokenDialog = ({isOpen,closeModal,workspaceId,- workspaceName+ workspaceName,}) => {- const router = useRouter();- const [serviceToken, setServiceToken] = useState('');- const [serviceTokenName, setServiceTokenName] = useState('');- const [serviceTokenEnv, setServiceTokenEnv] = useState('Development');- const [serviceTokenExpiresIn, setServiceTokenExpiresIn] = useState('1 day');+ const [serviceToken, setServiceToken] = useState("");+ const [serviceTokenName, setServiceTokenName] = useState("");+ const [serviceTokenEnv, setServiceTokenEnv] = useState("Development");+ const [serviceTokenExpiresIn, setServiceTokenExpiresIn] = useState("1 day");const [serviceTokenCopied, setServiceTokenCopied] = useState(false);- const { t } = useTranslate();++ const { t } = useTranslation();const generateServiceToken = async () => {const latestFileKey = await getLatestFileKey({ workspaceId });@@@ -169,9 -168,15 +169,15 @@@<ListBoxselected={serviceTokenExpiresIn}onChange={setServiceTokenExpiresIn}- data={["1 day", "7 days", "1 month"]}+ data={[- '1 day',- '7 days',- '1 month',- '6 months',- '12 months'++ "1 day",++ "7 days",++ "1 month",++ "6 months",++ "12 months",+ ]}- isFull={true}- text="Expires in: "+ width="full"+ text={`${t("common:expired-in")}: `}/></div><div className="max-w-max">diff --cc frontend/components/dashboard/DropZone.tsxindex 81e5792f24,aef7dbeb37..39f9a65858--- a/frontend/components/dashboard/DropZone.tsx+++ b/frontend/components/dashboard/DropZone.tsx@@@ -66,13 -63,15 +66,15 @@@ const DropZone = (if (event.target === null || event.target.result === null) return;// parse function's argument looks like to be ArrayBufferconst keyPairs = parse(event.target.result as Buffer);- const newData = Object.keys(keyPairs).map((key, index) => [- guidGenerator(),- numCurrentRows + index,- key,- keyPairs[key as keyof typeof keyPairs],- "shared",- ]);+ const newData = Object.keys(keyPairs).map((key, index) => {+ return {+ id: guidGenerator(),+ pos: numCurrentRows + index,+ key: key,+ value: keyPairs[key as keyof typeof keyPairs],- type: 'shared'++ type: "shared",+ };+ });setData(newData);setButtonReady(true);};@@@ -97,16 -96,18 +99,18 @@@reader.onload = (event) => {if (event.target === null || event.target.result === null) return;const { result } = event.target;- if (typeof result === 'string') {+ if (typeof result === "string") {const newData = result- .split('\n')+ .split("\n")- .map((line: string, index: number) => [- guidGenerator(),- numCurrentRows + index,- line.split("=")[0],- line.split("=").slice(1, line.split("=").length).join("="),- "shared",- ]);+ .map((line: string, index: number) => {+ return {+ id: guidGenerator(),+ pos: numCurrentRows + index,- key: line.split('=')[0],- value: line.split('=').slice(1, line.split('=').length).join('='),- type: 'shared'++ key: line.split("=")[0],++ value: line.split("=").slice(1, line.split("=").length).join("="),++ type: "shared",+ };+ });setData(newData);setButtonReady(true);}diff --cc frontend/components/navigation/NavBarDashboard.tsxindex 6712eb30a0,1834d81176..d79bd75b26--- a/frontend/components/navigation/NavBarDashboard.tsx+++ b/frontend/components/navigation/NavBarDashboard.tsx@@@ -12,25 -12,23 +12,23 @@@ importfaEnvelope,faGear,faPlus,- faRightFromBracket-} from '@fortawesome/free-solid-svg-icons';-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';-import { Menu, Transition } from '@headlessui/react';+ faRightFromBracket,+} from "@fortawesome/free-solid-svg-icons";+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 logout from "~/pages/api/auth/Logout";-import guidGenerator from '../utilities/randomId';+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";- /**- * @param {(key: string) => string} t- */+-const supportOptions = [+const supportOptions = (t: TFunction) => [[<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} />,diff --cc frontend/package-lock.jsonindex 0334604c56,b65657f854..639fa7052d--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@@ -24,19 -24,18 +24,21 @@@"fs": "^0.0.1-security","gray-matter": "^4.0.3","http-proxy": "^1.18.1",++ "i18next": "^22.4.6","jspdf": "^2.5.1","jsrp": "^0.2.4","markdown-it": "^13.0.1","next": "^12.2.5",- "next-translate": "^1.6.0",++ "next-i18next": "^13.0.2","posthog-js": "^1.34.0",- "query-string": "^7.1.1",+ "query-string": "^7.1.3","react": "^17.0.2","react-beautiful-dnd": "^13.1.1","react-code-input": "^3.10.1","react-dom": "^17.0.2","react-github-btn": "^1.4.0","react-grid-layout": "^1.3.4",++ "react-i18next": "^12.1.1","react-mailchimp-subscribe": "^2.1.3","react-markdown": "^8.0.3","react-redux": "^8.0.2",@@@ -52,7 -52,7 +55,6 @@@"@tailwindcss/typography": "^0.5.4","@types/node": "18.11.9","@types/react": "^18.0.26",-- "@typescript-eslint/eslint-plugin": "^5.45.0","@typescript-eslint/parser": "^5.45.0","autoprefixer": "^10.4.7","eslint": "^8.29.0",@@@ -219,11 -393,11 +395,11 @@@}},"node_modules/@babel/runtime": {- "version": "7.20.6",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz",- "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==",- "version": "7.18.9",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz",- "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",++ "version": "7.20.7",++ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz",++ "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==","dependencies": {- "regenerator-runtime": "^0.13.4"+ "regenerator-runtime": "^0.13.11"},"engines": {"node": ">=6.9.0"@@@ -1094,12 -1268,12 +1270,6 @@@"hoist-non-react-statics": "^3.3.0"}},-- "node_modules/@types/json-schema": {-- "version": "7.0.11",-- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",-- "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",-- "dev": true-- },"node_modules/@types/json5": {"version": "0.0.29","resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",@@@ -1172,12 -1346,12 +1342,6 @@@"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz","integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="},-- "node_modules/@types/semver": {-- "version": "7.3.13",-- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz",-- "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==",-- "dev": true-- },"node_modules/@types/unist": {"version": "2.0.6","resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",@@@ -1193,62 -1367,62 +1357,6 @@@"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz","integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="},-- "node_modules/@typescript-eslint/eslint-plugin": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz",-- "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==",-- "dev": true,-- "dependencies": {-- "@typescript-eslint/scope-manager": "5.45.0",-- "@typescript-eslint/type-utils": "5.45.0",-- "@typescript-eslint/utils": "5.45.0",-- "debug": "^4.3.4",-- "ignore": "^5.2.0",-- "natural-compare-lite": "^1.4.0",-- "regexpp": "^3.2.0",-- "semver": "^7.3.7",-- "tsutils": "^3.21.0"-- },-- "engines": {-- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"-- },-- "funding": {-- "type": "opencollective",-- "url": "https://opencollective.com/typescript-eslint"-- },-- "peerDependencies": {-- "@typescript-eslint/parser": "^5.0.0",-- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"-- },-- "peerDependenciesMeta": {-- "typescript": {-- "optional": true-- }-- }-- },-- "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": {-- "version": "4.3.4",-- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",-- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",-- "dev": true,-- "dependencies": {-- "ms": "2.1.2"-- },-- "engines": {-- "node": ">=6.0"-- },-- "peerDependenciesMeta": {-- "supports-color": {-- "optional": true-- }-- }-- },-- "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": {-- "version": "2.1.2",-- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",-- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",-- "dev": true-- },"node_modules/@typescript-eslint/parser": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz",@@@ -1316,56 -1490,56 +1424,6 @@@"url": "https://opencollective.com/typescript-eslint"}},-- "node_modules/@typescript-eslint/type-utils": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz",-- "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==",-- "dev": true,-- "dependencies": {-- "@typescript-eslint/typescript-estree": "5.45.0",-- "@typescript-eslint/utils": "5.45.0",-- "debug": "^4.3.4",-- "tsutils": "^3.21.0"-- },-- "engines": {-- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"-- },-- "funding": {-- "type": "opencollective",-- "url": "https://opencollective.com/typescript-eslint"-- },-- "peerDependencies": {-- "eslint": "*"-- },-- "peerDependenciesMeta": {-- "typescript": {-- "optional": true-- }-- }-- },-- "node_modules/@typescript-eslint/type-utils/node_modules/debug": {-- "version": "4.3.4",-- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",-- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",-- "dev": true,-- "dependencies": {-- "ms": "2.1.2"-- },-- "engines": {-- "node": ">=6.0"-- },-- "peerDependenciesMeta": {-- "supports-color": {-- "optional": true-- }-- }-- },-- "node_modules/@typescript-eslint/type-utils/node_modules/ms": {-- "version": "2.1.2",-- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",-- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",-- "dev": true-- },"node_modules/@typescript-eslint/types": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz",@@@ -1429,54 -1603,54 +1487,6 @@@"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==","dev": true},-- "node_modules/@typescript-eslint/utils": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz",-- "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==",-- "dev": true,-- "dependencies": {-- "@types/json-schema": "^7.0.9",-- "@types/semver": "^7.3.12",-- "@typescript-eslint/scope-manager": "5.45.0",-- "@typescript-eslint/types": "5.45.0",-- "@typescript-eslint/typescript-estree": "5.45.0",-- "eslint-scope": "^5.1.1",-- "eslint-utils": "^3.0.0",-- "semver": "^7.3.7"-- },-- "engines": {-- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"-- },-- "funding": {-- "type": "opencollective",-- "url": "https://opencollective.com/typescript-eslint"-- },-- "peerDependencies": {-- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"-- }-- },-- "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": {-- "version": "5.1.1",-- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",-- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",-- "dev": true,-- "dependencies": {-- "esrecurse": "^4.3.0",-- "estraverse": "^4.1.1"-- },-- "engines": {-- "node": ">=8.0.0"-- }-- },-- "node_modules/@typescript-eslint/utils/node_modules/estraverse": {-- "version": "4.3.0",-- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",-- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",-- "dev": true,-- "engines": {-- "node": ">=4.0"-- }-- },"node_modules/@typescript-eslint/visitor-keys": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz",@@@ -2151,8 -2400,8 +2236,7 @@@"version": "3.26.0","resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz","integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==",- "devOptional": true,"hasInstallScript": true,- "optional": true,"funding": {"type": "opencollective","url": "https://opencollective.com/core-js"@@@ -3739,15 -4051,6 +3886,14 @@@"react-is": "^16.7.0"}},+ "node_modules/html-parse-stringify": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",+ "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",- "dev": true,+ "dependencies": {+ "void-elements": "3.1.0"+ }+ },"node_modules/html-tokenize": {"version": "2.0.1","resolved": "https://registry.npmjs.org/html-tokenize/-/html-tokenize-2.0.1.tgz",@@@ -3810,34 -4113,24 +3956,51 @@@"node": ">=8.0.0"}},+ "node_modules/i18next": {- "version": "22.1.4",- "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.1.4.tgz",- "integrity": "sha512-MCDtNRyovLY22rgLoZdCzg2QIza1V1A/3Hxb99akJzTDjcqCRWEsglTpFUt0vUjOxSxz+WmxmFETLHORRS+n6Q==",- "dev": true,++ "version": "22.4.6",++ "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.4.6.tgz",++ "integrity": "sha512-9Tm1ezxWyzV+306CIDMBbYBitC1jedQyYuuLtIv7oxjp2ohh8eyxP9xytIf+2bbQfhH784IQKPSYp+Zq9+YSbw==",+ "funding": [+ {+ "type": "individual",+ "url": "https://locize.com"+ },+ {+ "type": "individual",+ "url": "https://locize.com/i18next.html"+ },+ {+ "type": "individual",+ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"+ }+ ],+ "dependencies": {+ "@babel/runtime": "^7.20.6"+ }+ },+ "node_modules/i18next-fs-backend": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.0.1.tgz",- "integrity": "sha512-fzeiFOXqsMiFAFUnNyC4buERI11vTAuf7JIDWqaiPgBK3R+XJQMSY1LyoXaWspBEFaAkXH/0uMbOv7nttBFztg==",- "dev": true++ "version": "2.1.1",++ "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.1.1.tgz",++ "integrity": "sha512-FTnj+UmNgT3YRml5ruRv0jMZDG7odOL/OP5PF5mOqvXud2vHrPOOs68Zdk6iqzL47cnnM0ZVkK2BAvpFeDJToA=="++ },+ "node_modules/ieee754": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ]},"node_modules/ignore": {"version": "5.2.0",@@@ -5107,12 -5442,12 +5312,6 @@@"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==","dev": true},-- "node_modules/natural-compare-lite": {-- "version": "1.4.0",-- "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",-- "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",-- "dev": true-- },"node_modules/next": {"version": "12.3.1","resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz",@@@ -5165,55 -5500,22 +5364,61 @@@}}},+ "node_modules/next-i18next": {- "version": "13.0.0",- "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.0.0.tgz",- "integrity": "sha512-XiODAmMdueAIETQKIRPvYEZ5ghLOlzHb6PI4/WzwYkKdC/5q6UROzwIRw7aj3VWRB3xwnuuzEVI9NAjMfXyrkQ==",- "dev": true,++ "version": "13.0.2",++ "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.0.2.tgz",++ "integrity": "sha512-aUHyKT2kztMgEP44zDB5KoW8XZUQawIdOYWXcrMH6lxAcS0kBsKX0uKMzGS5XlgLW88gvOVc3D7NdfCznLgyyg==",+ "funding": [+ {+ "type": "individual",- "url": "https://github.com/belgattitude"++ "url": "https://locize.com/i18next.html"+ },+ {+ "type": "individual",- "url": "https://locize.com"++ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"+ },+ {+ "type": "individual",- "url": "https://locize.com/i18next.html"++ "url": "https://locize.com"+ },+ {+ "type": "individual",- "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"++ "url": "https://github.com/belgattitude"+ }+ ],+ "dependencies": {- "@babel/runtime": "^7.18.9",++ "@babel/runtime": "^7.20.6",+ "@types/hoist-non-react-statics": "^3.3.1",+ "core-js": "^3",+ "hoist-non-react-statics": "^3.3.2",- "i18next-fs-backend": "^2.0.0"++ "i18next-fs-backend": "^2.1.0"+ },+ "engines": {+ "node": ">=14"+ },+ "peerDependencies": {+ "i18next": "^22.0.6",+ "next": ">= 12.0.0",+ "react": ">= 17.0.2",- "react-i18next": "^12.0.0"++ "react-i18next": "^12.1.1"+ }+ },- "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-abi": {+ "version": "3.30.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.30.0.tgz",+ "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==",+ "dependencies": {+ "semver": "^7.3.5"+ },+ "engines": {+ "node": ">=10"}},+ "node_modules/node-addon-api": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz",+ "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA=="+ },"node_modules/node-releases": {"version": "2.0.6","resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",@@@ -5954,28 -6295,6 +6198,27 @@@"react-dom": ">= 16.3.0"}},+ "node_modules/react-i18next": {+ "version": "12.1.1",+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.1.1.tgz",+ "integrity": "sha512-mFdieOI0LDy84q3JuZU6Aou1DoWW2fhapcTGeBS8+vWSJuViuoCLQAMYSb0QoHhXS8B0WKUOPpx4cffAP7r/aA==",- "dev": true,+ "dependencies": {+ "@babel/runtime": "^7.14.5",+ "html-parse-stringify": "^3.0.1"+ },+ "peerDependencies": {+ "i18next": ">= 19.0.0",+ "react": ">= 16.8.0"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ },+ "react-native": {+ "optional": true+ }+ }+ },"node_modules/react-is": {"version": "16.13.1","resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",@@@ -7239,15 -7666,6 +7590,14 @@@"url": "https://opencollective.com/unified"}},+ "node_modules/void-elements": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",+ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",- "dev": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/which": {"version": "2.0.2","resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",@@@ -7434,11 -7986,11 +7918,11 @@@}},"@babel/runtime": {- "version": "7.20.6",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz",- "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==",- "version": "7.18.9",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz",- "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",++ "version": "7.20.7",++ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz",++ "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==","requires": {- "regenerator-runtime": "^0.13.4"+ "regenerator-runtime": "^0.13.11"}},"@babel/runtime-corejs3": {@@@ -8038,12 -8590,12 +8522,6 @@@"hoist-non-react-statics": "^3.3.0"}},-- "@types/json-schema": {-- "version": "7.0.11",-- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",-- "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",-- "dev": true-- },"@types/json5": {"version": "0.0.29","resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",@@@ -8116,12 -8668,12 +8594,6 @@@"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz","integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="},-- "@types/semver": {-- "version": "7.3.13",-- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz",-- "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==",-- "dev": true-- },"@types/unist": {"version": "2.0.6","resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",@@@ -8137,40 -8689,40 +8609,6 @@@"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz","integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="},-- "@typescript-eslint/eslint-plugin": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz",-- "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==",-- "dev": true,-- "requires": {-- "@typescript-eslint/scope-manager": "5.45.0",-- "@typescript-eslint/type-utils": "5.45.0",-- "@typescript-eslint/utils": "5.45.0",-- "debug": "^4.3.4",-- "ignore": "^5.2.0",-- "natural-compare-lite": "^1.4.0",-- "regexpp": "^3.2.0",-- "semver": "^7.3.7",-- "tsutils": "^3.21.0"-- },-- "dependencies": {-- "debug": {-- "version": "4.3.4",-- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",-- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",-- "dev": true,-- "requires": {-- "ms": "2.1.2"-- }-- },-- "ms": {-- "version": "2.1.2",-- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",-- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",-- "dev": true-- }-- }-- },"@typescript-eslint/parser": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz",@@@ -8210,35 -8762,35 +8648,6 @@@"@typescript-eslint/visitor-keys": "5.45.0"}},-- "@typescript-eslint/type-utils": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz",-- "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==",-- "dev": true,-- "requires": {-- "@typescript-eslint/typescript-estree": "5.45.0",-- "@typescript-eslint/utils": "5.45.0",-- "debug": "^4.3.4",-- "tsutils": "^3.21.0"-- },-- "dependencies": {-- "debug": {-- "version": "4.3.4",-- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",-- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",-- "dev": true,-- "requires": {-- "ms": "2.1.2"-- }-- },-- "ms": {-- "version": "2.1.2",-- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",-- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",-- "dev": true-- }-- }-- },"@typescript-eslint/types": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz",@@@ -8277,40 -8829,40 +8686,6 @@@}}},-- "@typescript-eslint/utils": {-- "version": "5.45.0",-- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz",-- "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==",-- "dev": true,-- "requires": {-- "@types/json-schema": "^7.0.9",-- "@types/semver": "^7.3.12",-- "@typescript-eslint/scope-manager": "5.45.0",-- "@typescript-eslint/types": "5.45.0",-- "@typescript-eslint/typescript-estree": "5.45.0",-- "eslint-scope": "^5.1.1",-- "eslint-utils": "^3.0.0",-- "semver": "^7.3.7"-- },-- "dependencies": {-- "eslint-scope": {-- "version": "5.1.1",-- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",-- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",-- "dev": true,-- "requires": {-- "esrecurse": "^4.3.0",-- "estraverse": "^4.1.1"-- }-- },-- "estraverse": {-- "version": "4.3.0",-- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",-- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",-- "dev": true-- }-- }-- },"@typescript-eslint/visitor-keys": {"version": "5.45.0","resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz",@@@ -8804,8 -9400,8 +9223,7 @@@"core-js": {"version": "3.26.0","resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz",-- "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==",- "devOptional": true- "optional": true++ "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw=="},"core-js-pure": {"version": "3.26.1",@@@ -10003,15 -10644,6 +10466,14 @@@"react-is": "^16.7.0"}},+ "html-parse-stringify": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",+ "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",- "dev": true,+ "requires": {+ "void-elements": "3.1.0"+ }+ },"html-tokenize": {"version": "2.0.1","resolved": "https://registry.npmjs.org/html-tokenize/-/html-tokenize-2.0.1.tgz",@@@ -10067,20 -10699,10 +10529,23 @@@"requires-port": "^1.0.0"}},+ "i18next": {- "version": "22.1.4",- "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.1.4.tgz",- "integrity": "sha512-MCDtNRyovLY22rgLoZdCzg2QIza1V1A/3Hxb99akJzTDjcqCRWEsglTpFUt0vUjOxSxz+WmxmFETLHORRS+n6Q==",- "dev": true,++ "version": "22.4.6",++ "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.4.6.tgz",++ "integrity": "sha512-9Tm1ezxWyzV+306CIDMBbYBitC1jedQyYuuLtIv7oxjp2ohh8eyxP9xytIf+2bbQfhH784IQKPSYp+Zq9+YSbw==",+ "requires": {+ "@babel/runtime": "^7.20.6"+ }+ },+ "i18next-fs-backend": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.0.1.tgz",- "integrity": "sha512-fzeiFOXqsMiFAFUnNyC4buERI11vTAuf7JIDWqaiPgBK3R+XJQMSY1LyoXaWspBEFaAkXH/0uMbOv7nttBFztg==",- "dev": true++ "version": "2.1.1",++ "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.1.1.tgz",++ "integrity": "sha512-FTnj+UmNgT3YRml5ruRv0jMZDG7odOL/OP5PF5mOqvXud2vHrPOOs68Zdk6iqzL47cnnM0ZVkK2BAvpFeDJToA=="++ },+ "ieee754": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="},"ignore": {"version": "5.2.0",@@@ -10916,12 -11568,12 +11411,6 @@@"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==","dev": true},-- "natural-compare-lite": {-- "version": "1.4.0",-- "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",-- "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",-- "dev": true-- },"next": {"version": "12.3.1","resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz",@@@ -10948,24 -11600,18 +11437,30 @@@"use-sync-external-store": "1.2.0"}},+ "next-i18next": {- "version": "13.0.0",- "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.0.0.tgz",- "integrity": "sha512-XiODAmMdueAIETQKIRPvYEZ5ghLOlzHb6PI4/WzwYkKdC/5q6UROzwIRw7aj3VWRB3xwnuuzEVI9NAjMfXyrkQ==",- "dev": true,++ "version": "13.0.2",++ "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.0.2.tgz",++ "integrity": "sha512-aUHyKT2kztMgEP44zDB5KoW8XZUQawIdOYWXcrMH6lxAcS0kBsKX0uKMzGS5XlgLW88gvOVc3D7NdfCznLgyyg==",+ "requires": {- "@babel/runtime": "^7.18.9",++ "@babel/runtime": "^7.20.6",+ "@types/hoist-non-react-statics": "^3.3.1",+ "core-js": "^3",+ "hoist-non-react-statics": "^3.3.2",- "i18next-fs-backend": "^2.0.0"++ "i18next-fs-backend": "^2.1.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-abi": {+ "version": "3.30.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.30.0.tgz",+ "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==",+ "requires": {+ "semver": "^7.3.5"+ }+ },+ "node-addon-api": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz",+ "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA=="},"node-releases": {"version": "2.0.6",@@@ -11472,16 -12156,6 +12005,15 @@@"react-resizable": "^3.0.4"}},+ "react-i18next": {+ "version": "12.1.1",+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.1.1.tgz",+ "integrity": "sha512-mFdieOI0LDy84q3JuZU6Aou1DoWW2fhapcTGeBS8+vWSJuViuoCLQAMYSb0QoHhXS8B0WKUOPpx4cffAP7r/aA==",- "dev": true,+ "requires": {+ "@babel/runtime": "^7.14.5",+ "html-parse-stringify": "^3.0.1"+ }+ },"react-is": {"version": "16.13.1","resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",@@@ -12385,12 -13126,6 +12984,11 @@@"unist-util-stringify-position": "^3.0.0"}},+ "void-elements": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",- "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",- "dev": true++ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w=="+ },"which": {"version": "2.0.2","resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",diff --cc frontend/package.jsonindex 890e057f97,12b2e9ec27..570a6e5ecb--- a/frontend/package.json+++ b/frontend/package.json@@@ -27,19 -28,18 +28,21 @@@"fs": "^0.0.1-security","gray-matter": "^4.0.3","http-proxy": "^1.18.1",++ "i18next": "^22.4.6","jspdf": "^2.5.1","jsrp": "^0.2.4","markdown-it": "^13.0.1","next": "^12.2.5",- "next-translate": "^1.6.0",++ "next-i18next": "^13.0.2","posthog-js": "^1.34.0",- "query-string": "^7.1.1",+ "query-string": "^7.1.3","react": "^17.0.2","react-beautiful-dnd": "^13.1.1","react-code-input": "^3.10.1","react-dom": "^17.0.2","react-github-btn": "^1.4.0","react-grid-layout": "^1.3.4",++ "react-i18next": "^12.1.1","react-mailchimp-subscribe": "^2.1.3","react-markdown": "^8.0.3","react-redux": "^8.0.2",@@@ -55,7 -56,7 +59,6 @@@"@tailwindcss/typography": "^0.5.4","@types/node": "18.11.9","@types/react": "^18.0.26",-- "@typescript-eslint/eslint-plugin": "^5.45.0","@typescript-eslint/parser": "^5.45.0","autoprefixer": "^10.4.7","eslint": "^8.29.0",diff --cc frontend/pages/_app.jsindex 56d030da12,aeb2050ccb..0d1eeee325--- a/frontend/pages/_app.js+++ b/frontend/pages/_app.js@@@ -1,10 -1,8 +1,9 @@@import { useEffect } from "react";import { useRouter } from "next/router";+import { appWithTranslation } from "next-i18next";import { config } from "@fortawesome/fontawesome-svg-core";- import { initPostHog } from "~/components/analytics/posthog";- import Layout from "~/components/basic/layout";+ import Layout from "~/components/basic/Layout";import NotificationProvider from "~/components/context/Notifications/NotificationProvider";import RouteGuard from "~/components/RouteGuard";import { publicPaths } from "~/const";@@@ -17,22 -15,10 +16,21 @@@ config.autoAddCss = falseconst App = ({ Component, pageProps, ...appProps }) => {const router = useRouter();- const posthog = initPostHog();+ // useEffect(() => {+ // const storedLang = localStorage.getItem("lang");+ // console.log(router.locale);+ // console.log(storedLang);+ // if (router.locale ?? "en" !== storedLang ?? "en") {+ // router.push(router.pathname, router.pathname, {+ // locale: storedLang ?? "en",+ // });+ // }+ // }, [router.locale, router.pathname]);+useEffect(() => {// Init for auto capturing- const posthog = initPostHog();+ const telemetry = new Telemetry().getInstance();const handleRouteChange = () => {if (typeof window !== "undefined") {diff --cc frontend/pages/dashboard/[id].jsindex 0696c2ac5e,36f5eb3f24..a4147ef866--- a/frontend/pages/dashboard/[id].js+++ b/frontend/pages/dashboard/[id].js@@@ -19,30 -18,29 +19,30 @@@ importfaPerson,faPlus,faShuffle,- faX,- } from "@fortawesome/free-solid-svg-icons";- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";- import { Menu, Transition } from "@headlessui/react";-- import Button from "~/components/basic/buttons/Button";- import ListBox from "~/components/basic/Listbox";- import BottonRightPopup from "~/components/basic/popups/BottomRightPopup";- import { useNotificationContext } from "~/components/context/Notifications/NotificationProvider";- import DashboardInputField from "~/components/dashboard/DashboardInputField";- import DropZone from "~/components/dashboard/DropZone";- import NavHeader from "~/components/navigation/NavHeader";- import getSecretsForProject from "~/components/utilities/secrets/getSecretsForProject";- import pushKeys from "~/components/utilities/secrets/pushKeys";- import pushKeysIntegration from "~/components/utilities/secrets/pushKeysIntegration";- import guidGenerator from "~/utilities/randomId";+ faX+ } from '@fortawesome/free-solid-svg-icons';+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+ import { Menu, Transition } from '@headlessui/react';++ import Button from '~/components/basic/buttons/Button';+ import ListBox from '~/components/basic/Listbox';+ import BottonRightPopup from '~/components/basic/popups/BottomRightPopup';+ import { useNotificationContext } from '~/components/context/Notifications/NotificationProvider';+ import DashboardInputField from '~/components/dashboard/DashboardInputField';+ import DropZone from '~/components/dashboard/DropZone';+ import NavHeader from '~/components/navigation/NavHeader';+ import getSecretsForProject from '~/components/utilities/secrets/getSecretsForProject';+ import pushKeys from '~/components/utilities/secrets/pushKeys';+ import pushKeysIntegration from '~/components/utilities/secrets/pushKeysIntegration';+ import guidGenerator from '~/utilities/randomId';+import { getTranslatedServerSideProps } from "~/utilities/withTranslateProps";+- import { envMapping } from "../../public/data/frequentConstants";- import getWorkspaceIntegrations from "../api/integrations/getWorkspaceIntegrations";- import getUser from "../api/user/getUser";- import checkUserAction from "../api/userActions/checkUserAction";- import registerUserAction from "../api/userActions/registerUserAction";- import getWorkspaces from "../api/workspace/getWorkspaces";++ import { envMapping } from '../../public/data/frequentConstants';-import getWorkspaceIntegrations from '../api/integrations/getWorkspaceIntegrations';+ import getUser from '../api/user/getUser';+ import checkUserAction from '../api/userActions/checkUserAction';+ import registerUserAction from '../api/userActions/registerUserAction';+ import getWorkspaces from '../api/workspace/getWorkspaces';/*** This component represent a single row for an environemnt variable on the dashboard@@@ -63,10 -61,9 +63,10 @@@ const KeyPair = (modifyValue,modifyVisibility,isBlurred,- duplicates,+ duplicates}) => {const [randomStringLength, setRandomStringLength] = useState(32);+ const { t } = useTranslation();return (<div className="px-1 flex flex-col items-center ml-1">@@@ -125,12 -122,10 +125,12 @@@><FontAwesomeIconclassName="text-lg pl-1.5 pr-3"- icon={keyPair[4] == "personal" ? faPeopleGroup : faPerson}+ icon={keyPair.type == 'personal' ? faPeopleGroup : faPerson}/><div className="text-sm">- {keyPair.type == 'personal' ? 'Make Shared' : 'Make Personal'}+ {keyPair[4] == "personal"+ ? t("dashboard:make-shared")+ : t("dashboard:make-personal")}</div></div><div@@@ -686,13 -683,13 +689,13 @@@ export default function Dashboard()</div><divclassName={`bg-white/5 mt-1 mb-2 rounded-md p-1 pb-2 max-w-5xl ${- data?.length > 8 ? "h-3/4" : "h-min"+ data?.length > 8 ? 'h-3/4' : 'h-min'}`}>- <div className="sticky top-0 z-40 bg-bunker flex flex-row pl-4 pr-5 pt-4 pb-2 items-center justify-between text-gray-300 font-bold">+ <div className="sticky top-0 z-10 bg-bunker flex flex-row pl-4 pr-5 pt-4 pb-2 items-center justify-between text-gray-300 font-bold">{/* <FontAwesomeIcon icon={faAngleDown} /> */}<div className="flex flex-row items-center">- <p className="pl-2 text-lg">Shared</p>+ <p className="pl-2 text-lg">{t("dashboard:shared")}</p><div className="group font-normal group relative inline-block text-gray-300 underline hover:text-primary duration-200"><FontAwesomeIconclassName="ml-3 text-lg mt-1"diff --cc frontend/pages/integrations/[id].jsindex 2aa3d922cc,32a8e515e6..161da2ca31--- a/frontend/pages/integrations/[id].js+++ b/frontend/pages/integrations/[id].js@@@ -2,399 -2,229 +2,237 @@@ import React, { useEffect, useState } fimport Head from "next/head";import Image from "next/image";import { useRouter } from "next/router";+import { useTranslation } from "next-i18next";+import {+ faArrowRight,+ faCheck,+ faRotate,+ faX,+} from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";- import Button from "~/components/basic/buttons/Button";- import ListBox from "~/components/basic/Listbox";+ import ActivateBotDialog from "~/components/basic/dialog/ActivateBotDialog";-import IntegrationAccessTokenDialog from "~/components/basic/dialog/IntegrationAccessTokenDialog";+ import CloudIntegrationSection from "~/components/integrations/CloudIntegrationSection";+ import FrameworkIntegrationSection from "~/components/integrations/FrameworkIntegrationSection";-import Integration from "~/components/integrations/Integration";+ import IntegrationSection from "~/components/integrations/IntegrationSection";import NavHeader from "~/components/navigation/NavHeader";- import getSecretsForProject from "~/components/utilities/secrets/getSecretsForProject";- import pushKeysIntegration from "~/components/utilities/secrets/pushKeysIntegration";- import guidGenerator from "~/utilities/randomId";+import { getTranslatedServerSideProps } from "~/utilities/withTranslateProps";- 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";- import getIntegrations from "../api/integrations/GetIntegrations";+ import frameworkIntegrationOptions from "../../public/json/frameworkIntegrations.json";+ import getBot from "../api/bot/getBot";+ import setBotActiveStatus from "../api/bot/setBotActiveStatus";+ import getIntegrationOptions from "../api/integrations/GetIntegrationOptions";import getWorkspaceAuthorizations from "../api/integrations/getWorkspaceAuthorizations";import getWorkspaceIntegrations from "../api/integrations/getWorkspaceIntegrations";- import startIntegration from "../api/integrations/StartIntegration";-+ import getLatestFileKey from "../api/workspace/getLatestFileKey";+ const {+ decryptAssymmetric,+ encryptAssymmetric+ } = require('../../components/utilities/cryptography/crypto');const crypto = require("crypto");- const Integration = ({ projectIntegration }) => {- const [integrationEnvironment, setIntegrationEnvironment] = useState(- reverseEnvMapping[projectIntegration.environment]- );- const [fileState, setFileState] = useState([]);- const [data, setData] = useState();- const [isKeyAvailable, setIsKeyAvailable] = useState(true);- const router = useRouter();- const [apps, setApps] = useState([]);- const [integrationApp, setIntegrationApp] = useState(- projectIntegration.app ? projectIntegration.app : apps[0]- );-- const { t } = useTranslation();-- useEffect(async () => {- const tempHerokuApps = await getIntegrationApps({- integrationAuthId: projectIntegration.integrationAuth,- });- const tempHerokuAppNames = tempHerokuApps.map((app) => app.name);- setApps(tempHerokuAppNames);- setIntegrationApp(- projectIntegration.app ? projectIntegration.app : tempHerokuAppNames[0]- );- }, []);-- return (- <div className="flex flex-col max-w-5xl justify-center bg-white/5 p-6 rounded-md mx-6 mt-8">- <div className="relative px-4 flex flex-row items-center justify-between mb-4">- <div className="flex flex-row">- <div>- <div className="text-gray-400 self-start ml-1 mb-1 text-xs font-semibold tracking-wide">- ENVIRONMENT- </div>- <ListBox- data={- !projectIntegration.isActive && [- "Development",- "Staging",- "Production",- ]- }- selected={integrationEnvironment}- onChange={setIntegrationEnvironment}- />- </div>- <FontAwesomeIcon- icon={faArrowRight}- className="mx-4 text-gray-400 mt-8"- />- <div className="mr-2">- <div className="text-gray-400 self-start ml-1 mb-1 text-xs font-semibold tracking-wide">- INTEGRATION- </div>- <div className="py-2.5 bg-white/[.07] rounded-md pl-4 pr-20 text-sm font-semibold text-gray-300">- {projectIntegration.integration.charAt(0).toUpperCase() +- projectIntegration.integration.slice(1)}- </div>- </div>- <div>- <div className="text-gray-400 self-start ml-1 mb-1 text-xs font-semibold tracking-wide">- HEROKU APP- </div>- <ListBox- data={!projectIntegration.isActive && apps}- selected={integrationApp}- onChange={setIntegrationApp}- />- </div>- </div>- <div className="flex flex-row mt-6">- {projectIntegration.isActive ? (- <div className="max-w-5xl flex flex-row items-center bg-white/5 p-2 rounded-md px-4">- <FontAwesomeIcon- icon={faRotate}- className="text-lg mr-2.5 text-primary animate-spin"- />- <div className="text-gray-300 font-semibold">In Sync</div>- </div>- ) : (- <Button- text="Start Integration"- onButtonPressed={async () => {- const result = await startIntegration({- integrationId: projectIntegration._id,- environment: envMapping[integrationEnvironment],- appName: integrationApp,- });- if (result?.status == 200) {- let currentSecrets = await getSecretsForProject({- env: integrationEnvironment,- setFileState,- setIsKeyAvailable,- setData,- workspaceId: router.query.id,- });-- let obj = Object.assign(- {},- ...currentSecrets.map((row) => ({- [row[2]]: row[3],- }))- );- await pushKeysIntegration({- obj,- integrationId: projectIntegration._id,- });- router.reload();- }- }}- color="mineshaft"- size="md"- />- )}- <div className="opacity-50 hover:opacity-100 duration-200 ml-2">- <Button- onButtonPressed={async () => {- await deleteIntegration({- integrationId: projectIntegration._id,- });- router.reload();- }}- color="red"- size="icon-md"- icon={faX}- />- </div>- </div>- </div>- </div>- );- };-export default function Integrations() {- const [integrations, setIntegrations] = useState();- const [projectIntegrations, setProjectIntegrations] = useState();- const [authorizations, setAuthorizations] = useState();+ const [cloudIntegrationOptions, setCloudIntegrationOptions] = useState([]);+ const [integrationAuths, setIntegrationAuths] = useState([]);+ const [integrations, setIntegrations] = useState([]);+ const [bot, setBot] = useState(null);+ const [isActivateBotDialogOpen, setIsActivateBotDialogOpen] = useState(false);+ // const [isIntegrationAccessTokenDialogOpen, setIntegrationAccessTokenDialogOpen] = useState(true);+ const [selectedIntegrationOption, setSelectedIntegrationOption] = useState(null);+const router = useRouter();- const [csrfToken, setCsrfToken] = useState("");+ const { t } = useTranslation();+useEffect(async () => {- const tempCSRFToken = crypto.randomBytes(16).toString("hex");- setCsrfToken(tempCSRFToken);- localStorage.setItem("latestCSRFToken", tempCSRFToken);+ try {+ // get cloud integration options+ setCloudIntegrationOptions(+ await getIntegrationOptions()+ );++ // get project integration authorizations+ setIntegrationAuths(+ await getWorkspaceAuthorizations({+ workspaceId: router.query.id,+ })+ );++ // get project integrations+ setIntegrations(+ await getWorkspaceIntegrations({+ workspaceId: router.query.id,+ })+ );++ // get project bot+ setBot(+ await getBot({+ workspaceId: router.query.id+ }+ ));++ } catch (err) {+ console.log(err);+ }+ }, []);- let projectAuthorizations = await getWorkspaceAuthorizations({- workspaceId: router.query.id,- });- setAuthorizations(projectAuthorizations);+ /**+ * Activate bot for project by performing the following steps:+ * 1. Get the (encrypted) project key+ * 2. Decrypt project key with user's private key+ * 3. Encrypt project key with bot's public key+ * 4. Send encrypted project key to backend and set bot status to active+ */+ const handleBotActivate = async () => {+ let botKey;+ try {- const projectIntegrations = await getWorkspaceIntegrations({- workspaceId: router.query.id,- });- setProjectIntegrations(projectIntegrations);+ if (bot) {+ // case: there is a bot+ const key = await getLatestFileKey({ workspaceId: router.query.id });+ const PRIVATE_KEY = localStorage.getItem('PRIVATE_KEY');++ const WORKSPACE_KEY = decryptAssymmetric({+ ciphertext: key.latestKey.encryptedKey,+ nonce: key.latestKey.nonce,+ publicKey: key.latestKey.sender.publicKey,+ privateKey: PRIVATE_KEY+ });++ const { ciphertext, nonce } = encryptAssymmetric({+ plaintext: WORKSPACE_KEY,+ publicKey: bot.publicKey,+ privateKey: PRIVATE_KEY+ });++ botKey = {+ encryptedKey: ciphertext,+ nonce+ }++ setBot((await setBotActiveStatus({+ botId: bot._id,+ isActive: bot.isActive ? false : true,+ botKey+ })).bot);+ }+ } catch (err) {+ console.error(err);+ }+ }++ /**+ * Start integration for a given integration option [integrationOption]+ * @param {Object} obj+ * @param {Object} obj.integrationOption - an integration option+ * @param {String} obj.name+ * @param {String} obj.type+ * @param {String} obj.docsLink+ * @returns+ */+ const handleIntegrationOption = async ({ integrationOption }) => {++ console.log('handleIntegrationOption', integrationOption);try {- const integrationsData = await getIntegrations();- setIntegrations(integrationsData);- } catch (error) {- console.log("Error", error);+ // generate CSRF token for OAuth2 code-token exchange integrations+ const state = crypto.randomBytes(16).toString("hex");+ localStorage.setItem('latestCSRFToken', state);++ switch (integrationOption.name) {+ case 'Heroku':+ window.location = `https://id.heroku.com/oauth/authorize?client_id=${integrationOption.clientId}&response_type=code&scope=write-protected&state=${state}`;+ break;+ case 'Vercel':+ window.location = `https://vercel.com/integrations/${integrationOption.clientSlug}/new?state=${state}`;+ break;+ case 'Netlify':+ window.location = `https://app.netlify.com/authorize?client_id=${integrationOption.clientId}&response_type=code&state=${state}&redirect_uri=${window.location.origin}/netlify`;+ break;+ case 'GitHub':+ window.location = `https://github.com/login/oauth/authorize?client_id=${integrationOption.clientId}&response_type=code&scope=repo&redirect_uri=${window.location.origin}/github&state=${state}`;+ break;+ // case 'Fly.io':+ // console.log('fly.io');+ // setIntegrationAccessTokenDialogOpen(true);+ // break;+ }+ } catch (err) {+ console.log(err);}- }, []);-- return integrations ? (+ }++ /**+ * Open dialog to activate bot if bot is not active.+ * Otherwise, start integration [integrationOption]+ * @param {Object} integrationOption - an integration option+ * @param {String} integrationOption.name+ * @param {String} integrationOption.type+ * @param {String} integrationOption.docsLink+ * @returns+ */+ const integrationOptionPress = (integrationOption) => {+ try {+ if (bot.isActive) {+ // case: bot is active -> proceed with integration+ handleIntegrationOption({ integrationOption });+ return;+ }++ // case: bot is not active -> open modal to activate bot+ setIsActivateBotDialogOpen(true);+ } catch (err) {+ console.error(err);+ }+ }++ return (<div className="bg-bunker-800 max-h-screen flex flex-col justify-between text-white"><Head>- <title>Dashboard</title>+ <title>- <title>+ {t("common:head-title", { title: t("integrations:title") })}- </title>+ </title><link rel="icon" href="/infisical.ico" /><meta property="og:image" content="/images/message.png" /><meta property="og:title" content="Manage your .env files in seconds" />- <meta- name="og:description"- content="Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files."- />+ <meta name="og:description" content={t("integrations:description")} /></Head>- <div className="flex flex-row">- <div className="w-full max-h-96 pb-2 h-screen max-h-[calc(100vh-10px)] overflow-y-scroll no-scrollbar no-scrollbar::-webkit-scrollbar">- <NavHeader- pageName={t("integrations:title")}- isProjectRelated={true}+ <div className="w-full max-h-96 pb-2 h-screen max-h-[calc(100vh-10px)] overflow-y-scroll no-scrollbar no-scrollbar::-webkit-scrollbar">+ <NavHeader- pageName="Project Integrations"++ pageName={t("integrations:title")}+ isProjectRelated={true}+ />+ <ActivateBotDialog+ isOpen={isActivateBotDialogOpen}+ closeModal={() => setIsActivateBotDialogOpen(false)}+ selectedIntegrationOption={selectedIntegrationOption}+ handleBotActivate={handleBotActivate}+ handleIntegrationOption={handleIntegrationOption}+ />+ {/* <IntegrationAccessTokenDialog+ isOpen={isIntegrationAccessTokenDialogOpen}+ closeModal={() => setIntegrationAccessTokenDialogOpen(false)}+ selectedIntegrationOption={selectedIntegrationOption}+ handleBotActivate={handleBotActivate}+ handleIntegrationOption={handleIntegrationOption}+ /> */}+ <IntegrationSection integrations={integrations} />+ {cloudIntegrationOptions.length > 0 ? (+ <CloudIntegrationSection+ cloudIntegrationOptions={cloudIntegrationOptions}+ setSelectedIntegrationOption={setSelectedIntegrationOption}+ integrationOptionPress={integrationOptionPress}+ integrationAuths={integrationAuths}/>- <div className="flex flex-col justify-between items-start mx-4 mt-6 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">{t("integrations:title")}</p>- </div>- <p className="mr-4 text-base text-gray-400">- {t("integrations:description")}- </p>- </div>- {projectIntegrations.length > 0 ? (- projectIntegrations.map((projectIntegration) => (- <Integration- key={guidGenerator()}- projectIntegration={projectIntegration}- />- ))- ) : (- <div className="flex flex-col max-w-5xl justify-center bg-white/5 p-6 rounded-md mx-6 mt-8">- <div className="relative px-4 flex flex-col text-gray-400 items-center justify-center">- <div className="mb-1">{t("integrations:no-integrations1")}</div>- <div className="">{t("integrations:no-integrations2")}</div>- </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">- {t("integrations:available")}- </p>- </div>- <p className="mr-4 text-base text-gray-400">- {t("integrations:available-text1")}- </p>- <p className="mr-4 text-xs text-gray-600 mt-1">- {t("integrations:available-text2")}- </p>- </div>- <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 ${- ["Heroku"].includes(integrations[integration].name)- ? ""- : "opacity-50"- }`}- key={integrations[integration].name}- >- <a- href={`${- ["Heroku"].includes(integrations[integration].name)- ? `https://id.heroku.com/oauth/authorize?client_id=bc132901-935a-4590-b010-f1857efc380d&response_type=code&scope=write-protected&state=${csrfToken}`- : "#"- }`}- rel="noopener"- className={`relative flex flex-row bg-white/5 h-32 rounded-md p-4 items-center ${- ["Heroku"].includes(integrations[integration].name)- ? "hover:bg-white/10 duration-200 cursor-pointer"- : "cursor-default grayscale"- }`}- >- <Image- src={`/images/integrations/${integrations[integration].name}.png`}- height={70}- width={70}- alt="integration logo"- ></Image>- {integrations[integration].name.split(" ").length > 2 ? (- <div className="font-semibold text-gray-300 group-hover:text-gray-200 duration-200 text-3xl ml-4 max-w-xs">- <div>{integrations[integration].name.split(" ")[0]}</div>- <div className="text-base">- {integrations[integration].name.split(" ")[1]}{" "}- {integrations[integration].name.split(" ")[2]}- </div>- </div>- ) : (- <div className="font-semibold text-gray-300 group-hover:text-gray-200 duration-200 text-xl ml-4 max-w-xs">- {integrations[integration].name}- </div>- )}- </a>- {["Heroku"].includes(integrations[integration].name) &&- authorizations- .map((authorization) => authorization.integration)- .includes(integrations[integration].name.toLowerCase()) && (- <div className="absolute group z-50 top-0 right-0 flex flex-row">- <div- onClick={() => {- deleteIntegrationAuth({- integrationAuthId: authorizations- .filter(- (authorization) =>- authorization.integration ==- integrations[integration].name.toLowerCase()- )- .map((authorization) => authorization._id)[0],- });- router.reload();- }}- className="cursor-pointer w-max bg-red py-0.5 px-2 rounded-b-md text-xs flex flex-row items-center opacity-0 group-hover:opacity-100 duration-200"- >- <FontAwesomeIcon- icon={faX}- className="text-xs mr-2 py-px"- />- Revoke- </div>- <div className="w-max bg-primary py-0.5 px-2 rounded-bl-md rounded-tr-md text-xs flex flex-row items-center text-black opacity-90 group-hover:opacity-100 duration-200">- <FontAwesomeIcon- icon={faCheck}- className="text-xs mr-2"- />- Authorized- </div>- </div>- )}- {!["Heroku"].includes(integrations[integration].name) && (- <div className="absolute group z-50 top-0 right-0 flex flex-row">- <div className="w-max bg-yellow py-0.5 px-2 rounded-bl-md rounded-tr-md text-xs flex flex-row items-center text-black opacity-90">- Coming Soon- </div>- </div>- )}- </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">- {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>- )}- {framework?.name && framework.name}- </div>- </a>- </div>- ))}- </div>- </div>+ ) : (+ <div></div>+ )}+ <FrameworkIntegrationSection+ frameworks={frameworkIntegrationOptions}+ /></div></div>- ) : (- <div className="relative z-10 w-10/12 mr-auto h-full ml-2 bg-bunker-800 flex flex-col items-center justify-center">- <div className="absolute top-0 bg-bunker h-14 border-b border-mineshaft-700 w-full"></div>- <Image- src="/images/loading/loading.gif"- height={70}- width={120}- alt="loading animation"- ></Image>- </div>);}diff --cc frontend/pages/settings/org/[id].jsindex 1c08537031,80f6efc5d0..e2250aa269--- a/frontend/pages/settings/org/[id].js+++ b/frontend/pages/settings/org/[id].js@@@ -5,30 -4,29 +5,30 @@@ import { useTranslation } from "next-i1import {faMagnifyingGlass,faPlus,- faX,- } from "@fortawesome/free-solid-svg-icons";- import { faCheck } from "@fortawesome/free-solid-svg-icons";- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+ faX+ } from '@fortawesome/free-solid-svg-icons';+ import { faCheck } from '@fortawesome/free-solid-svg-icons';+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';-import Button from '~/components/basic/buttons/Button';-import AddIncidentContactDialog from '~/components/basic/dialog/AddIncidentContactDialog';-import AddUserDialog from '~/components/basic/dialog/AddUserDialog';-import InputField from '~/components/basic/InputField';-import UserTable from '~/components/basic/table/UserTable';-import NavHeader from '~/components/navigation/NavHeader';-import guidGenerator from '~/utilities/randomId';+import Button from "~/components/basic/buttons/Button";+import AddIncidentContactDialog from "~/components/basic/dialog/AddIncidentContactDialog";+import AddUserDialog from "~/components/basic/dialog/AddUserDialog";+import InputField from "~/components/basic/InputField";+import UserTable from "~/components/basic/table/UserTable";+import NavHeader from "~/components/navigation/NavHeader";+import guidGenerator from "~/utilities/randomId";+import { getTranslatedServerSideProps } from "~/utilities/withTranslateProps";- import addUserToOrg from "../../api/organization/addUserToOrg";- import deleteIncidentContact from "../../api/organization/deleteIncidentContact";- import getIncidentContacts from "../../api/organization/getIncidentContacts";- import getOrganization from "../../api/organization/GetOrg";- import getOrganizationSubscriptions from "../../api/organization/GetOrgSubscription";- import getOrganizationUsers from "../../api/organization/GetOrgUsers";- import renameOrg from "../../api/organization/renameOrg";- import getUser from "../../api/user/getUser";- import deleteWorkspace from "../../api/workspace/deleteWorkspace";- import getWorkspaces from "../../api/workspace/getWorkspaces";+ import addUserToOrg from '../../api/organization/addUserToOrg';+ import deleteIncidentContact from '../../api/organization/deleteIncidentContact';+ import getIncidentContacts from '../../api/organization/getIncidentContacts';+ import getOrganization from '../../api/organization/GetOrg';+ import getOrganizationSubscriptions from '../../api/organization/GetOrgSubscription';+ import getOrganizationUsers from '../../api/organization/GetOrgUsers';+ import renameOrg from '../../api/organization/renameOrg';+ import getUser from '../../api/user/getUser';+ import deleteWorkspace from '../../api/workspace/deleteWorkspace';+ import getWorkspaces from '../../api/workspace/getWorkspaces';export default function SettingsOrg() {const [buttonReady, setButtonReady] = useState(false);@@@ -41,21 -39,19 +41,21 @@@const [isAddIncidentContactOpen, setIsAddIncidentContactOpen] =useState(false);const [isAddUserOpen, setIsAddUserOpen] = useState(- router.asPath.split("?")[1] == "invite"+ router.asPath.split('?')[1] == 'invite');const [incidentContacts, setIncidentContacts] = useState([]);- const [searchIncidentContact, setSearchIncidentContact] = useState("");+ const [searchIncidentContact, setSearchIncidentContact] = useState('');const [userList, setUserList] = useState();- const [personalEmail, setPersonalEmail] = useState("");+ const [personalEmail, setPersonalEmail] = useState('');let workspaceIdTemp;- const [email, setEmail] = useState("");- const [currentPlan, setCurrentPlan] = useState("");+ const [email, setEmail] = useState('');+ const [currentPlan, setCurrentPlan] = useState('');+ const { t } = useTranslation();+useEffect(async () => {let org = await getOrganization({- orgId: localStorage.getItem("orgData.id"),+ orgId: localStorage.getItem('orgData.id')});let orgData = org;setOrgName(orgData.name);diff --cc frontend/pages/settings/personal/[id].jsindex 5d170e6702,aa497bbfd1..f56281c50f--- a/frontend/pages/settings/personal/[id].js+++ b/frontend/pages/settings/personal/[id].js@@@ -1,7 -1,5 +1,7 @@@-import React, { useEffect, useState } from "react";+import React, { useCallback, useEffect, useState } from "react";import Head from "next/head";++import { useRouter } from "next/router";+import { useTranslation } from "next-i18next";- import setLanguage from "next-translate/setLanguage";import { faCheck, faX } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";@@@ -30,8 -26,6 +30,15 @@@ export default function PersonalSettingconst [backupKeyIssued, setBackupKeyIssued] = useState(false);const [backupKeyError, setBackupKeyError] = useState(false);- const { t, lang } = useTranslation();++ const { t } = useTranslation();++ const router = useRouter();++ const lang = router.locale ?? "en";++++ const setLanguage = async (to) => {++ router.push(router.asPath, router.asPath, { locale: to });++ localStorage.setItem("lang", to);++ };+useEffect(async () => {let user = await getUser();setPersonalEmail(user.email);@@@ -144,14 -118,16 +151,16 @@@value={currentPassword}isRequirederror={currentPasswordError}- errorText="The current password may be wrong"+ errorText={t("section-password:current-wrong")}+ autoComplete="current-password"+ id="current-password"/><div className="py-2"></div><InputField- label="New Password"+ label={t("section-password:new")}onChangeHandler={(password) => {setNewPassword(password);- passwordCheck(+ passwordCheck({password,setPasswordErrorLength,setPasswordErrorNumber,@@@ -306,7 -286,9 +317,9 @@@value={backupPassword}isRequirederror={backupKeyError}- errorText="The current password is wrong"+ errorText={t("section-password:current-wrong")}+ autoComplete="current-password"+ id="current-password"/></div><div className="flex flex-row items-center mt-3 w-full w-60">diff --cc frontend/pages/signup.tsxindex 95e2840a7e,51e2e1c05d..ff11aa6f2d--- a/frontend/pages/signup.tsx+++ b/frontend/pages/signup.tsx@@@ -1,32 -1,29 +1,31 @@@- import React, { useEffect, useRef, useState } from "react";-import React, { useEffect, useState } from 'react';-import ReactCodeInput from 'react-code-input';-import Head from 'next/head';-import Image from 'next/image';-import Link from 'next/link';-import { useRouter } from 'next/router';-import { faCheck, faWarning, faX } from '@fortawesome/free-solid-svg-icons';-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';++import React, { useEffect, useState } from "react";+import ReactCodeInput from "react-code-input";- import dynamic from "next/dynamic";+import Head from "next/head";+import Image from "next/image";+import Link from "next/link";+import { useRouter } from "next/router";++import { useTranslation } from "next-i18next";+import { faCheck, faWarning, faX } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import Button from '~/components/basic/buttons/Button';-import Error from '~/components/basic/Error';-import InputField from '~/components/basic/InputField';-import Aes256Gcm from '~/components/utilities/cryptography/aes-256-gcm';-import issueBackupKey from '~/components/utilities/cryptography/issueBackupKey';-import attemptLogin from '~/utilities/attemptLogin';-import passwordCheck from '~/utilities/checks/PasswordCheck';+import Button from "~/components/basic/buttons/Button";+import Error from "~/components/basic/Error";+import InputField from "~/components/basic/InputField";+import Aes256Gcm from "~/components/utilities/cryptography/aes-256-gcm";+import issueBackupKey from "~/components/utilities/cryptography/issueBackupKey";++import { getTranslatedStaticProps } from "~/components/utilities/withTranslateProps";+import attemptLogin from "~/utilities/attemptLogin";+import passwordCheck from "~/utilities/checks/PasswordCheck";-import checkEmailVerificationCode from './api/auth/CheckEmailVerificationCode';-import completeAccountInformationSignup from './api/auth/CompleteAccountInformationSignup';-import sendVerificationEmail from './api/auth/SendVerificationEmail';-import getWorkspaces from './api/workspace/getWorkspaces';+import checkEmailVerificationCode from "./api/auth/CheckEmailVerificationCode";+import completeAccountInformationSignup from "./api/auth/CompleteAccountInformationSignup";+import sendVerificationEmail from "./api/auth/SendVerificationEmail";+import getWorkspaces from "./api/workspace/getWorkspaces";- import { Trans, useTranslation } from "next-i18next";- import { getTranslatedStaticProps } from "~/components/utilities/withTranslateProps";// const ReactCodeInput = dynamic(import("react-code-input"));-const nacl = require('tweetnacl');-const jsrp = require('jsrp');-nacl.util = require('tweetnacl-util');+const nacl = require("tweetnacl");+const jsrp = require("jsrp");+nacl.util = require("tweetnacl-util");const client = new jsrp.client();// The stye for the verification code input@@@ -84,12 -81,11 +83,14 @@@ export default function SignUp()const router = useRouter();const [errorLogin, setErrorLogin] = useState(false);const [isLoading, setIsLoading] = useState(false);- const [isResendingVerificationEmail, setIsResendingVerificationEmail] = useState(false);++ const [isResendingVerificationEmail, setIsResendingVerificationEmail] =++ useState(false);const [backupKeyError, setBackupKeyError] = useState(false);- const [verificationToken, setVerificationToken] = useState();- const [verificationToken, setVerificationToken] = useState('');++ const [verificationToken, setVerificationToken] = useState("");const [backupKeyIssued, setBackupKeyIssued] = useState(false);+ const { t } = useTranslation();+useEffect(() => {const tryAuth = async () => {try {@@@ -113,8 -109,8 +114,8 @@@setStep(2);} else if (step == 2) {// Checking if the code matches the email.- const response = await checkEmailVerificationCode(email, code);+ const response = await checkEmailVerificationCode({ email, code });- if (response.status === 200 || code == '111222') {+ if (response.status === 200 || code == "111222") {setVerificationToken((await response.json()).token);setStep(3);} else {@@@ -191,11 -188,11 +193,11 @@@.slice(0, 32).padStart(32 + (password.slice(0, 32).length - new Blob([password]).size),- '0',+ "0"- )- ) as { ciphertext: string; iv: string; tag: string };+ ),+ }) as { ciphertext: string; iv: string; tag: string };- localStorage.setItem('PRIVATE_KEY', PRIVATE_KEY);+ localStorage.setItem("PRIVATE_KEY", PRIVATE_KEY);client.init({@@@ -255,13 -262,13 +267,16 @@@const step1 = (<div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-8 md:px-6 mx-1 mb-48 md:mb-16 rounded-xl drop-shadow-xl"><p className="text-4xl font-semibold flex justify-center text-transparent bg-clip-text bg-gradient-to-br from-sky-400 to-primary">- {t("signup:step1-start")}- {'Let\''}s get started++ {"Let'"}s get started</p><div className="flex flex-col items-center justify-center w-full md:pb-2 max-h-24 max-w-md mx-auto pt-2"><Link href="/login">- <button className="w-max pb-3 hover:opacity-90 duration-200">- <button type="button" className="w-max pb-3 hover:opacity-90 duration-200">++ <button++ type="button"++ className="w-max pb-3 hover:opacity-90 duration-200"++ ><u className="font-normal text-md text-sky-500">- Have an account? Log in+ {t("signup:already-have-account")}</u></button></Link>@@@ -276,22 -283,20 +291,19 @@@isRequirederror={emailError}errorText={emailErrorMessage}+ autoComplete="username"/></div>- {/* <div className='flex flex-row justify-left mt-4 max-w-md mx-auto'>+ {/* <div className='flex flex-row justify-left mt-4 max-w-md mx-auto'><Checkbox className="mr-4"/><p className='text-sm'>I do not want to receive emails about Infisical and its products.</p></div> */}<div className="flex flex-col items-center justify-center w-5/6 md:w-full md:p-2 max-h-28 max-w-xs md:max-w-md mx-auto mt-4 md:mt-4 text-sm text-center md:text-left"><p className="text-gray-400 mt-2 md:mx-0.5">- By creating an account, you agree to our Terms and have read and- acknowledged the Privacy Policy.+ {t("signup:step1-privacy")}</p><div className="text-l mt-6 m-2 md:m-8 px-8 py-1 text-lg">- <Button- text={t("signup:step1-submit")}- onButtonPressed={emailCheck}- size="lg"- />- <Button text="Get Started" type="submit" onButtonPressed={emailCheck} size="lg" />++ <Button text="Get Started" onButtonPressed={emailCheck} size="lg" /></div></div></div>@@@ -300,17 -305,12 +312,12 @@@// Step 2 of the signup process (enter the email verification code)const step2 = (<div className="bg-bunker w-max mx-auto h-7/12 pt-10 pb-4 px-8 rounded-xl drop-shadow-xl mb-64 md:mb-16">- <Trans- i18nKey="signup:step2-message"- components={{- wrapper: <p className="text-l flex justify-center text-gray-400" />,- email: (- <p className="text-l flex justify-center font-semibold my-2 text-gray-400" />- ),- }}- values={{ email }}- />-+ <p className="text-l flex justify-center text-gray-400">- {'We\'ve'} sent a verification email to{' '}++ {"We've"} sent a verification email to{" "}+ </p>+ <p className="text-l flex justify-center font-semibold my-2 text-gray-400">- {email}{' '}++ {email}{" "}+ </p><div className="hidden md:block"><ReactCodeInputname=""@@@ -333,24 -333,25 +340,31 @@@className="mt-2 mb-6"/></div>- {codeError && (- <Error text="Oops. Your code is wrong. Please try again." />- )}+ {codeError && <Error text={t("signup:step2-code-error")} />}<div className="flex max-w-min flex-col items-center justify-center md:p-2 max-h-24 max-w-md mx-auto text-lg px-4 mt-4 mb-2">- <Button text="Verify" onButtonPressed={incrementStep} size="lg" />+ <Button- text={t("signup:verify")}++ text={t("signup:verify") ?? ""}+ onButtonPressed={incrementStep}+ size="lg"+ /></div><div className="flex flex-col items-center justify-center w-full max-h-24 max-w-md mx-auto pt-2">- {/* <Link href="/login">- <button className="w-full hover:opacity-90 duration-200">- <u className="font-normal text-sm text-sky-700">- Not seeing an email? Resend- </u>- </button>- </Link> */}+ <div className="flex flex-row items-baseline gap-1">- <span className="text-gray-400">- Not seeing an email?- </span>- <u className={`font-normal text-sm ${isResendingVerificationEmail ? 'text-gray-400' : 'text-sky-500 hover:opacity-90 duration-200'}`}>++ <span className="text-gray-400">Not seeing an email?</span>++ <u++ className={`font-normal text-sm ${++ isResendingVerificationEmail++ ? "text-gray-400"++ : "text-sky-500 hover:opacity-90 duration-200"++ }`}++ >+ <button disabled={isLoading} onClick={resendVerificationEmail}>- {isResendingVerificationEmail ? 'Resending...' : 'Resend'}++ {isResendingVerificationEmail ? "Resending..." : "Resend"}+ </button>+ </u>+ </div><p className="text-sm text-gray-500 pb-2">- Make sure to check your spam inbox.+ {t("signup:step2-spam-alert")}</p></div></div>@@@ -369,12 -370,9 +383,13 @@@type="name"value={firstName}isRequired- errorText="Please input your first name."+ errorText={+ t("common:validate-required", {+ name: t("common:first-name"),+ }) as string+ }error={firstNameError}+ autoComplete="given-name"/></div><div className="mt-2 flex items-center justify-center w-full md:p-2 rounded-lg max-h-24">@@@ -384,12 -382,9 +399,13 @@@type="name"value={lastName}isRequired- errorText="Please input your last name."+ errorText={+ t("common:validate-required", {+ name: t("common:last-name"),+ }) as string+ }error={lastNameError}+ autoComplete="family-name"/></div><div className="mt-2 flex flex-col items-center justify-center w-full md:p-2 rounded-lg max-h-60">@@@ -486,7 -483,7 +504,7 @@@</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("signup:signup")}- text="Sign Up"++ text={t("signup:signup") ?? ""}loading={isLoading}onButtonPressed={signupErrorCheck}size="lg"@@@ -507,37 -509,20 +525,37 @@@</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" />- It contains your Secret Key which we cannot access or recover for you if- you lose it.+ {t("signup:step4-description3")}</div>- <div- className="text-l mt-4 text-lg text-gray-400 hover:text-gray-300 duration-200 bg-white/5 px-8 hover:bg-white/10 py-3 rounded-md cursor-pointer"- onClick={() => {- if (localStorage.getItem("projectData.id")) {- router.push("/dashboard/" + localStorage.getItem("projectData.id"));- } else {- router.push("/noprojects")- }- }}- >- Later+ <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("signup:step4-download")}++ text="Download PDF"+ onButtonPressed={async () => {+ await issueBackupKey({+ email,+ password,+ personalName: firstName + " " + lastName,+ setBackupKeyError,+ setBackupKeyIssued,+ });+ const userWorkspaces = await getWorkspaces();+ const userWorkspace = userWorkspaces[0]._id;+ router.push("/home/" + userWorkspace);+ }}+ size="lg"+ />+ {/* <div+ className="text-l mt-4 text-lg text-gray-400 hover:text-gray-300 duration-200 bg-white/5 px-8 hover:bg-white/10 py-3 rounded-md cursor-pointer"+ onClick={() => {- if (localStorage.getItem("auth:projectData.id")) {- router.push("auth:/dashboard/" + localStorage.getItem("projectData.id"));++ if (localStorage.getItem("projectData.id")) {++ router.push("/dashboard/" + localStorage.getItem("projectData.id"));+ } else {- router.push("auth:/noprojects")++ router.push("/noprojects")+ }+ }}+ >+ Later+ </div> */}</div></div>);diff --cc frontend/pages/users/[id].jsindex 18750faec6,fe96ded3a7..5b8fd5eef1--- a/frontend/pages/users/[id].js+++ b/frontend/pages/users/[id].js@@@ -1,45 -1,40 +1,44 @@@-import React, { useEffect, useState } from 'react';-import Head from 'next/head';-import Image from 'next/image';-import { useRouter } from 'next/router';-import { faMagnifyingGlass, faPlus } from '@fortawesome/free-solid-svg-icons';-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';--import Button from '~/components/basic/buttons/Button';-import AddProjectMemberDialog from '~/components/basic/dialog/AddProjectMemberDialog';-import UserTable from '~/components/basic/table/UserTable';-import NavHeader from '~/components/navigation/NavHeader';-import guidGenerator from '~/utilities/randomId';+import React, { useEffect, useState } from "react";+import Head from "next/head";+import Image from "next/image";+import { useRouter } from "next/router";+import { useTranslation } from "next-i18next";- import { appWithTranslation } from "next-i18next";+import { faMagnifyingGlass, faPlus } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";++import Button from "~/components/basic/buttons/Button";+import AddProjectMemberDialog from "~/components/basic/dialog/AddProjectMemberDialog";+import UserTable from "~/components/basic/table/UserTable";+import NavHeader from "~/components/navigation/NavHeader";+import guidGenerator from "~/utilities/randomId";+import { getTranslatedServerSideProps } from "~/utilities/withTranslateProps";- import getOrganizationUsers from "../api/organization/GetOrgUsers";- import getUser from "../api/user/getUser";+ import getOrganizationUsers from '../api/organization/GetOrgUsers';+ import getUser from '../api/user/getUser';// import DeleteUserDialog from '~/components/basic/dialog/DeleteUserDialog';- import addUserToWorkspace from "../api/workspace/addUserToWorkspace";- import getWorkspaceUsers from "../api/workspace/getWorkspaceUsers";- import uploadKeys from "../api/workspace/uploadKeys";+ import addUserToWorkspace from '../api/workspace/addUserToWorkspace';+ import getWorkspaceUsers from '../api/workspace/getWorkspaceUsers';+ import uploadKeys from '../api/workspace/uploadKeys';// #TODO: Update all the workspaceIds- const crypto = require("crypto");+ const crypto = require('crypto');const {decryptAssymmetric,- encryptAssymmetric,- } = require("../../components/utilities/cryptography/crypto");- const nacl = require("tweetnacl");- nacl.util = require("tweetnacl-util");+ encryptAssymmetric+ } = require('../../components/utilities/cryptography/crypto');+ const nacl = require('tweetnacl');+ nacl.util = require('tweetnacl-util');export default function Users() {let [isAddOpen, setIsAddOpen] = useState(false);// let [isDeleteOpen, setIsDeleteOpen] = useState(false);// let [userIdToBeDeleted, setUserIdToBeDeleted] = useState(false);- let [email, setEmail] = useState("");- const [personalEmail, setPersonalEmail] = useState("");- const [searchUsers, setSearchUsers] = useState("");+ let [email, setEmail] = useState('');+ const [personalEmail, setPersonalEmail] = useState('');+ const [searchUsers, setSearchUsers] = useState('');+ const { t } = useTranslation();+const router = useRouter();let workspaceId;