Skip to content

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

refactor(ui): changed frontend to normal i18n without SSR

akhilmhdh3561c589b189
diff --git a/frontend/next-i18next.config.js b/frontend/next-i18next.config.js
deleted file mode 100644
index e8046b755e..0000000000
--- a/frontend/next-i18next.config.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// @ts-check
-
-/**
- * @type {import('next-i18next').UserConfig}
- */
-module.exports = {
- // https://www.i18next.com/overview/configuration-options#logging
- debug: false,
- i18n: {
- defaultLocale: "en",
- locales: ["en", "ko", "fr", "pt-BR", "pt-PT", "es"],
- },
- fallbackLng: {
- default: ["en"],
- },
-
- reloadOnPrerender: process.env.NODE_ENV === "development",
-
- /**
- * @link https://github.com/i18next/next-i18next#6-advanced-configuration
- */
- // saveMissing: false,
- // strictMode: true,
- // serializeConfig: false,
- // react: { useSuspense: false }
-};
\ No newline at end of file
diff --git a/frontend/next.config.js b/frontend/next.config.js
index 5e7c812700..dbe69eb1db 100644
--- a/frontend/next.config.js
+++ b/frontend/next.config.js
@@ -1,10 +1,8 @@
-
// @ts-check
/**
* @type {import('next').NextConfig}
**/
-const { i18n } = require("./next-i18next.config.js");
const path = require('path');
const ContentSecurityPolicy = `
@@ -23,62 +21,67 @@ const ContentSecurityPolicy = `
// after learning more below.
const securityHeaders = [
{
- key: "X-DNS-Prefetch-Control",
- value: "on",
+ key: 'X-DNS-Prefetch-Control',
+ value: 'on'
},
{
- key: "Strict-Transport-Security",
- value: "max-age=63072000; includeSubDomains; preload",
+ key: 'Strict-Transport-Security',
+ value: 'max-age=63072000; includeSubDomains; preload'
},
{
- key: "X-XSS-Protection",
- value: "1; mode=block",
+ key: 'X-XSS-Protection',
+ value: '1; mode=block'
},
{
- key: "X-Frame-Options",
- value: "SAMEORIGIN",
+ key: 'X-Frame-Options',
+ value: 'SAMEORIGIN'
},
{
- key: "Permissions-Policy",
- value: "camera=(), microphone=()",
+ key: 'Permissions-Policy',
+ value: 'camera=(), microphone=()'
},
{
- key: "X-Content-Type-Options",
- value: "nosniff",
+ key: 'X-Content-Type-Options',
+ value: 'nosniff'
},
{
- key: "Referrer-Policy",
- value: "strict-origin-when-cross-origin",
+ key: 'Referrer-Policy',
+ value: 'strict-origin-when-cross-origin'
},
{
- key: "Content-Security-Policy",
- value: ContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
- },
+ key: 'Content-Security-Policy',
+ value: ContentSecurityPolicy.replace(/\s{2,}/g, ' ').trim()
+ }
];
module.exports = {
- output: "standalone",
+ output: 'standalone',
+ i18n: {
+ locales: ['en', 'ko', 'fr', 'pt-BR', 'pt-PT', 'es'],
+ defaultLocale: 'en'
+ },
async headers() {
return [
{
// Apply these headers to all routes in your application.
- source: "/:path*",
- headers: securityHeaders,
- },
+ source: '/:path*',
+ headers: securityHeaders
+ }
];
},
- webpack: (config, { isServer, webpack }) => { // config
+ webpack: (config, { isServer, webpack }) => {
+ // config
config.module.rules.push({
test: /\.wasm$/,
- loader: "base64-loader",
- type: "javascript/auto",
+ loader: 'base64-loader',
+ type: 'javascript/auto'
});
config.module.noParse = /\.wasm$/;
config.module.rules.forEach((rule) => {
(rule.oneOf || []).forEach((oneOf) => {
- if (oneOf.loader && oneOf.loader.indexOf("file-loader") >= 0) {
+ if (oneOf.loader && oneOf.loader.indexOf('file-loader') >= 0) {
oneOf.exclude.push(/\.wasm$/);
}
});
@@ -89,12 +92,9 @@ module.exports = {
}
// Perform customizations to webpack config
- config.plugins.push(
- new webpack.IgnorePlugin({ resourceRegExp: /\/__tests__\// })
- );
+ config.plugins.push(new webpack.IgnorePlugin({ resourceRegExp: /\/__tests__\// }));
// Important: return the modified config
return config;
- },
- i18n,
+ }
};
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index e53e988df3..fa6e6db41d 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "npm-proj-1682714499482-0.7355675708334568i1ac8K",
+ "name": "frontend",
"lockfileVersion": 2,
"requires": true,
"packages": {
@@ -48,14 +48,15 @@
"fs": "^0.0.1-security",
"gray-matter": "^4.0.3",
"http-proxy": "^1.18.1",
- "i18next": "^22.4.9",
+ "i18next": "^22.4.15",
+ "i18next-browser-languagedetector": "^7.0.1",
+ "i18next-http-backend": "^2.2.0",
"infisical-node": "^1.0.37",
"jspdf": "^2.5.1",
"jsrp": "^0.2.4",
"lottie-react": "^2.4.0",
"markdown-it": "^13.0.1",
"next": "^12.3.4",
- "next-i18next": "^13.0.2",
"posthog-js": "^1.39.4",
"query-string": "^7.1.3",
"react": "^17.0.2",
@@ -64,7 +65,7 @@
"react-dom": "^17.0.2",
"react-grid-layout": "^1.3.4",
"react-hook-form": "^7.43.0",
- "react-i18next": "^12.1.1",
+ "react-i18next": "^12.2.2",
"react-mailchimp-subscribe": "^2.1.3",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.2",
@@ -10017,6 +10018,7 @@
"version": "3.30.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.30.1.tgz",
"integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==",
+ "devOptional": true,
"hasInstallScript": true,
"funding": {
"type": "opencollective",
@@ -10094,6 +10096,33 @@
"dev": true,
"peer": true
},
+ "node_modules/cross-fetch": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
+ "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
+ "dependencies": {
+ "node-fetch": "2.6.7"
+ }
+ },
+ "node_modules/cross-fetch/node_modules/node-fetch": {
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
+ "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -13644,10 +13673,21 @@
"@babel/runtime": "^7.20.6"
}
},
- "node_modules/i18next-fs-backend": {
- "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/i18next-browser-languagedetector": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.0.1.tgz",
+ "integrity": "sha512-Pa5kFwaczXJAeHE56CHG2aWzFBMJNUNghf0Pm4SwSrEMps/PTKqW90EYWlIvhuYStf3Sn1K0vw+gH3+TLdkH1g==",
+ "dependencies": {
+ "@babel/runtime": "^7.19.4"
+ }
+ },
+ "node_modules/i18next-http-backend": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.2.0.tgz",
+ "integrity": "sha512-Z4sM7R6tzdLknSPER9GisEBxKPg5FkI07UrQniuroZmS15PHQrcCPLyuGKj8SS68tf+O2aEDYSUnmy1TZqZSbw==",
+ "dependencies": {
+ "cross-fetch": "3.1.5"
+ }
},
"node_modules/iconv-lite": {
"version": "0.4.24",
@@ -16262,41 +16302,6 @@
}
}
},
- "node_modules/next-i18next": {
- "version": "13.2.2",
- "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.2.2.tgz",
- "integrity": "sha512-t0WU6K+HJoq2nVQ0n6OiiEZja9GyMqtDSU74FmOafgk4ljns+iZ18bsNJiI8rOUXfFfkW96ea1N7D5kbMyT+PA==",
- "funding": [
- {
- "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"
- },
- {
- "type": "individual",
- "url": "https://locize.com"
- }
- ],
- "dependencies": {
- "@babel/runtime": "^7.20.13",
- "@types/hoist-non-react-statics": "^3.3.1",
- "core-js": "^3",
- "hoist-non-react-statics": "^3.3.2",
- "i18next-fs-backend": "^2.1.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "i18next": "^22.0.6",
- "next": ">= 12.0.0",
- "react": ">= 17.0.2",
- "react-i18next": "^12.2.0"
- }
- },
"node_modules/next/node_modules/postcss": {
"version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
@@ -29322,7 +29327,8 @@
"core-js": {
"version": "3.30.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.30.1.tgz",
- "integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ=="
+ "integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==",
+ "devOptional": true
},
"core-js-compat": {
"version": "3.30.1",
@@ -29382,6 +29388,24 @@
"dev": true,
"peer": true
},
+ "cross-fetch": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
+ "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
+ "requires": {
+ "node-fetch": "2.6.7"
+ },
+ "dependencies": {
+ "node-fetch": {
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
+ "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+ "requires": {
+ "whatwg-url": "^5.0.0"
+ }
+ }
+ }
+ },
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -32098,10 +32122,21 @@
"@babel/runtime": "^7.20.6"
}
},
- "i18next-fs-backend": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.1.1.tgz",
- "integrity": "sha512-FTnj+UmNgT3YRml5ruRv0jMZDG7odOL/OP5PF5mOqvXud2vHrPOOs68Zdk6iqzL47cnnM0ZVkK2BAvpFeDJToA=="
+ "i18next-browser-languagedetector": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.0.1.tgz",
+ "integrity": "sha512-Pa5kFwaczXJAeHE56CHG2aWzFBMJNUNghf0Pm4SwSrEMps/PTKqW90EYWlIvhuYStf3Sn1K0vw+gH3+TLdkH1g==",
+ "requires": {
+ "@babel/runtime": "^7.19.4"
+ }
+ },
+ "i18next-http-backend": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.2.0.tgz",
+ "integrity": "sha512-Z4sM7R6tzdLknSPER9GisEBxKPg5FkI07UrQniuroZmS15PHQrcCPLyuGKj8SS68tf+O2aEDYSUnmy1TZqZSbw==",
+ "requires": {
+ "cross-fetch": "3.1.5"
+ }
},
"iconv-lite": {
"version": "0.4.24",
@@ -33950,18 +33985,6 @@
}
}
},
- "next-i18next": {
- "version": "13.2.2",
- "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-13.2.2.tgz",
- "integrity": "sha512-t0WU6K+HJoq2nVQ0n6OiiEZja9GyMqtDSU74FmOafgk4ljns+iZ18bsNJiI8rOUXfFfkW96ea1N7D5kbMyT+PA==",
- "requires": {
- "@babel/runtime": "^7.20.13",
- "@types/hoist-non-react-statics": "^3.3.1",
- "core-js": "^3",
- "hoist-non-react-statics": "^3.3.2",
- "i18next-fs-backend": "^2.1.1"
- }
- },
"no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 9414bc0b12..313bb3e05e 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -55,14 +55,15 @@
"fs": "^0.0.1-security",
"gray-matter": "^4.0.3",
"http-proxy": "^1.18.1",
- "i18next": "^22.4.9",
+ "i18next": "^22.4.15",
+ "i18next-browser-languagedetector": "^7.0.1",
+ "i18next-http-backend": "^2.2.0",
"infisical-node": "^1.0.37",
"jspdf": "^2.5.1",
"jsrp": "^0.2.4",
"lottie-react": "^2.4.0",
"markdown-it": "^13.0.1",
"next": "^12.3.4",
- "next-i18next": "^13.0.2",
"posthog-js": "^1.39.4",
"query-string": "^7.1.3",
"react": "^17.0.2",
@@ -71,7 +72,7 @@
"react-dom": "^17.0.2",
"react-grid-layout": "^1.3.4",
"react-hook-form": "^7.43.0",
- "react-i18next": "^12.1.1",
+ "react-i18next": "^12.2.2",
"react-mailchimp-subscribe": "^2.1.3",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.2",
diff --git a/frontend/public/locales/en/activity.json b/frontend/public/locales/en/activity.json
deleted file mode 100644
index 4db29f2747..0000000000
--- a/frontend/public/locales/en/activity.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Audit Logs",
- "subtitle": "Event history for this Infisical project.",
- "event": {
- "readSecrets": "Secrets Viewed",
- "updateSecrets": "Secrets Updated",
- "addSecrets": "Secrets Added",
- "deleteSecrets": "Secrets Deleted"
- },
- "ip-address": "IP Address"
-}
diff --git a/frontend/public/locales/en/billing.json b/frontend/public/locales/en/billing.json
deleted file mode 100644
index 20c43c0a3e..0000000000
--- a/frontend/public/locales/en/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "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"
-}
diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json
deleted file mode 100644
index 4c966f09c1..0000000000
--- a/frontend/public/locales/en/common.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "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 a .env, .json, or .yml file here.",
- "drop-zone-keys": "Drag and drop a .env, .json, or .yml file here to add more secrets.",
- "role": "Role",
- "role_admin": "admin",
- "display-name": "Display Name",
- "environment": "Environment",
- "expired-in": "Expires in",
- "language": "Language",
- "search": "Search...",
- "note": "Note",
- "view-more": "View More",
- "end-of-history": "End of History",
- "select-event": "Select an event",
- "event": "Event",
- "user": "User",
- "source": "Source",
- "time": "Time",
- "timestamp": "Timestamp"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/en/dashboard.json b/frontend/public/locales/en/dashboard.json
deleted file mode 100644
index 2638873602..0000000000
--- a/frontend/public/locales/en/dashboard.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "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",
- "add-secret": "Add a new secret",
- "check-docs": {
- "button": "Check Docs",
- "title": "Good job!",
- "line1": "Congrats on adding more secrets.",
- "line2": "Here is how to connect them to your codebase."
- },
- "sidebar": {
- "secret": "Secret",
- "key": "Key",
- "value": "Value",
- "override": "Override value with a personal value",
- "version-history": "Version History",
- "comments": "Comments & Notes",
- "personal-explanation": "This secret is personal. It is not shared with any of your teammates.",
- "generate-random-hex": "Generate Random Hex",
- "digits": "digits",
- "delete-key-dialog": {
- "title": "Delete Key",
- "confirm-delete-message": "Are you sure you want to delete this secret? This cannot be undone."
- }
- }
-
-}
diff --git a/frontend/public/locales/en/integrations.json b/frontend/public/locales/en/integrations.json
deleted file mode 100644
index 1fc92ca4e2..0000000000
--- a/frontend/public/locales/en/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "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": "Platform & Cloud Integrations",
- "available-text1": "Click on the integration 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].",
- "cloud-integrations": "Cloud Integrations",
- "framework-integrations": "Framework Integrations",
- "click-to-start": "Click on an integration to begin syncing secrets to it.",
- "click-to-setup": "Click on a framework to get the setup instructions.",
- "grant-access-to-secrets": "Grant Infisical access to your secrets",
- "why-infisical-needs-access": "Most cloud integrations require Infisical to be able to decrypt your secrets so they can be forwarded over.",
- "grant-access-button": "Grant access"
-}
diff --git a/frontend/public/locales/en/login.json b/frontend/public/locales/en/login.json
deleted file mode 100644
index 75b56a014f..0000000000
--- a/frontend/public/locales/en/login.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "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",
- "forgot-password": "Forgot your password?",
- "error-login": "Wrong credentials."
-}
diff --git a/frontend/public/locales/en/mfa.json b/frontend/public/locales/en/mfa.json
deleted file mode 100644
index 2cc50c509b..0000000000
--- a/frontend/public/locales/en/mfa.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "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": "We've sent a verification code to",
- "step2-code-error": "Oops. Your code is wrong. Tries left:",
- "step2-resend-alert": "Don't see the code?",
- "step2-resend-submit": "Resend",
- "step2-resend-progress": "Resending...",
- "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",
- "step5-send-invites": "Send Invites",
- "step5-invite-team": "Invite your team",
- "step5-subtitle": "Infisical is meant to be used with your teammates. Invite them to test it out.",
- "step5-skip": "Skip"
-}
diff --git a/frontend/public/locales/en/nav.json b/frontend/public/locales/en/nav.json
deleted file mode 100644
index 3d0c6facaf..0000000000
--- a/frontend/public/locales/en/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "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"
- }
-}
diff --git a/frontend/public/locales/en/section-api-key.json b/frontend/public/locales/en/section-api-key.json
deleted file mode 100644
index 3419744fe9..0000000000
--- a/frontend/public/locales/en/section-api-key.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "api-keys": "Service Tokens",
- "api-keys-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 an API Key",
- "description": "Specify the name and expiry period. When an API key is generated, you will only be able to see it once before it disappears. Make sure to save it somewhere.",
- "name": "API Key Name",
- "add": "Add API Key",
- "copy-service-token": "Copy your API key",
- "copy-service-token-description": "Once you close this popup, you will never see your API key again"
- }
-}
diff --git a/frontend/public/locales/en/section-incident.json b/frontend/public/locales/en/section-incident.json
deleted file mode 100644
index de8f3e7b71..0000000000
--- a/frontend/public/locales/en/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "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"
- }
-}
diff --git a/frontend/public/locales/en/section-members.json b/frontend/public/locales/en/section-members.json
deleted file mode 100644
index 89dbd2fea0..0000000000
--- a/frontend/public/locales/en/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "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"
- }
-}
diff --git a/frontend/public/locales/en/section-password.json b/frontend/public/locales/en/section-password.json
deleted file mode 100644
index 9c0410d6cb..0000000000
--- a/frontend/public/locales/en/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "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"
-}
diff --git a/frontend/public/locales/en/section-token.json b/frontend/public/locales/en/section-token.json
deleted file mode 100644
index ce468b1af8..0000000000
--- a/frontend/public/locales/en/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "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": "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"
- }
-}
diff --git a/frontend/public/locales/en/settings-members.json b/frontend/public/locales/en/settings-members.json
deleted file mode 100644
index 128a649a0c..0000000000
--- a/frontend/public/locales/en/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Project Members",
- "description": "This page shows the members of the selected project, and allows you to modify their permissions."
-}
diff --git a/frontend/public/locales/en/settings-org.json b/frontend/public/locales/en/settings-org.json
deleted file mode 100644
index d17baa7cd7..0000000000
--- a/frontend/public/locales/en/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Organization Settings",
- "description": "Manage members of your organization. These users could afterwards be formed into projects."
-}
diff --git a/frontend/public/locales/en/settings-personal.json b/frontend/public/locales/en/settings-personal.json
deleted file mode 100644
index 66a90b6c35..0000000000
--- a/frontend/public/locales/en/settings-personal.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "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",
- "api-keys": {
- "title": "API Keys",
- "description": "Manage your personal API Keys to access the Infisical API.",
- "add-new": "Add new"
- }
-}
diff --git a/frontend/public/locales/en/settings-project.json b/frontend/public/locales/en/settings-project.json
deleted file mode 100644
index 3f3401f2e4..0000000000
--- a/frontend/public/locales/en/settings-project.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "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",
- "auto-capitalization": "Auto Capitalization",
- "auto-capitalization-description": "According to standards, Infisical will automatically capitalize your keys. If you want to disable this feature, you can do so here."
-}
diff --git a/frontend/public/locales/en/signup.json b/frontend/public/locales/en/signup.json
deleted file mode 100644
index 5fa5742e3d..0000000000
--- a/frontend/public/locales/en/signup.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "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": "We've sent a verification code to",
- "step2-code-error": "Oops. Your code is wrong. Please try again.",
- "step2-resend-alert": "Don't see the code?",
- "step2-resend-submit": "Resend",
- "step2-resend-progress": "Resending...",
- "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",
- "step5-send-invites": "Send Invites",
- "step5-invite-team": "Invite your team",
- "step5-subtitle": "Infisical is meant to be used with your teammates. Invite them to test it out.",
- "step5-skip": "Skip"
-}
diff --git a/frontend/public/locales/en/translations.json b/frontend/public/locales/en/translations.json
new file mode 100644
index 0000000000..63ccdb2fe4
--- /dev/null
+++ b/frontend/public/locales/en/translations.json
@@ -0,0 +1,319 @@
+{
+ "activity": {
+ "title": "Audit Logs",
+ "subtitle": "Event history for this Infisical project.",
+ "event": {
+ "readSecrets": "Secrets Viewed",
+ "updateSecrets": "Secrets Updated",
+ "addSecrets": "Secrets Added",
+ "deleteSecrets": "Secrets Deleted"
+ },
+ "ip-address": "IP Address"
+ },
+ "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"
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "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 a .env, .json, or .yml file here.",
+ "drop-zone-keys": "Drag and drop a .env, .json, or .yml file here to add more secrets.",
+ "role": "Role",
+ "role_admin": "admin",
+ "display-name": "Display Name",
+ "environment": "Environment",
+ "expired-in": "Expires in",
+ "language": "Language",
+ "search": "Search...",
+ "note": "Note",
+ "view-more": "View More",
+ "end-of-history": "End of History",
+ "select-event": "Select an event",
+ "event": "Event",
+ "user": "User",
+ "source": "Source",
+ "time": "Time",
+ "timestamp": "Timestamp"
+ },
+ "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",
+ "add-secret": "Add a new secret",
+ "check-docs": {
+ "button": "Check Docs",
+ "title": "Good job!",
+ "line1": "Congrats on adding more secrets.",
+ "line2": "Here is how to connect them to your codebase."
+ },
+ "sidebar": {
+ "secret": "Secret",
+ "key": "Key",
+ "value": "Value",
+ "override": "Override value with a personal value",
+ "version-history": "Version History",
+ "comments": "Comments & Notes",
+ "personal-explanation": "This secret is personal. It is not shared with any of your teammates.",
+ "generate-random-hex": "Generate Random Hex",
+ "digits": "digits",
+ "delete-key-dialog": {
+ "title": "Delete Key",
+ "confirm-delete-message": "Are you sure you want to delete this secret? This cannot be undone."
+ }
+ }
+ },
+ "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": "Platform & Cloud Integrations",
+ "available-text1": "Click on the integration 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].",
+ "cloud-integrations": "Cloud Integrations",
+ "framework-integrations": "Framework Integrations",
+ "click-to-start": "Click on an integration to begin syncing secrets to it.",
+ "click-to-setup": "Click on a framework to get the setup instructions.",
+ "grant-access-to-secrets": "Grant Infisical access to your secrets",
+ "why-infisical-needs-access": "Most cloud integrations require Infisical to be able to decrypt your secrets so they can be forwarded over.",
+ "grant-access-button": "Grant access"
+ },
+ "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",
+ "forgot-password": "Forgot your password?",
+ "error-login": "Wrong credentials."
+ },
+ "mfa": {
+ "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": "We've sent a verification code to",
+ "step2-code-error": "Oops. Your code is wrong. Tries left:",
+ "step2-resend-alert": "Don't see the code?",
+ "step2-resend-submit": "Resend",
+ "step2-resend-progress": "Resending...",
+ "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",
+ "step5-send-invites": "Send Invites",
+ "step5-invite-team": "Invite your team",
+ "step5-subtitle": "Infisical is meant to be used with your teammates. Invite them to test it out.",
+ "step5-skip": "Skip"
+ },
+ "nav": {
+ "support": {
+ "slack": "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"
+ }
+ },
+ "section": {
+ "api-key": {
+ "api-keys": "Service Tokens",
+ "api-keys-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 an API Key",
+ "description": "Specify the name and expiry period. When an API key is generated, you will only be able to see it once before it disappears. Make sure to save it somewhere.",
+ "name": "API Key Name",
+ "add": "Add API Key",
+ "copy-service-token": "Copy your API key",
+ "copy-service-token-description": "Once you close this popup, you will never see your API key again"
+ }
+ },
+ "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"
+ }
+ },
+ "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"
+ }
+ },
+ "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"
+ },
+ "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": "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"
+ }
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "Project Members",
+ "description": "This page shows the members of the selected project, and allows you to modify their permissions."
+ },
+ "org": {
+ "title": "Organization Settings",
+ "description": "Manage members of your organization. These users could afterwards be formed into projects."
+ },
+ "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",
+ "api-keys": {
+ "title": "API Keys",
+ "description": "Manage your personal API Keys to access the Infisical API.",
+ "add-new": "Add new"
+ }
+ },
+ "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",
+ "auto-capitalization": "Auto Capitalization",
+ "auto-capitalization-description": "According to standards, Infisical will automatically capitalize your keys. If you want to disable this feature, you can do so here."
+ }
+ },
+ "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": "We've sent a verification code to",
+ "step2-code-error": "Oops. Your code is wrong. Please try again.",
+ "step2-resend-alert": "Don't see the code?",
+ "step2-resend-submit": "Resend",
+ "step2-resend-progress": "Resending...",
+ "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",
+ "step5-send-invites": "Send Invites",
+ "step5-invite-team": "Invite your team",
+ "step5-subtitle": "Infisical is meant to be used with your teammates. Invite them to test it out.",
+ "step5-skip": "Skip"
+ }
+}
diff --git a/frontend/public/locales/es/activity.json b/frontend/public/locales/es/activity.json
deleted file mode 100644
index ef275e39ca..0000000000
--- a/frontend/public/locales/es/activity.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Historial de eventos",
- "subtitle": "Historial de eventos para este proyecto de Infisical.",
- "event": {
- "readSecrets": "Secrets vistas",
- "updateSecrets": "Secrets actualizadas",
- "addSecrets": "Secrets añadidas",
- "deleteSecrets": "Secrets eliminadas"
- },
- "ip-address": "Dirección IP"
-}
diff --git a/frontend/public/locales/es/billing.json b/frontend/public/locales/es/billing.json
deleted file mode 100644
index 8ffc62c846..0000000000
--- a/frontend/public/locales/es/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Uso & Facturación",
- "description": "Visualiza y gestiona la suscripción de tu organización",
- "subscription": "Suscripción",
- "starter": {
- "name": "Starter",
- "price-explanation": "hasta 5 miembros",
- "text": "¡Hasta 5 personas gratis!",
- "subtext": "Después, $5 por miembro/mes."
- },
- "professional": {
- "name": "Professional",
- "price-explanation": "/miembro/mes",
- "subtext": "Includes unlimited projects & members.",
- "text": "Mantén la gestión de claves a medida que creces."
- },
- "enterprise": {
- "name": "Enterprise",
- "text": "Mantén la gestión de claves a medida que creces."
- },
- "current-usage": "Uso actual",
- "free": "Gratis",
- "downgrade": "Reducir",
- "upgrade": "Mejorar",
- "learn-more": "Saber más",
- "custom-pricing": "A medida",
- "schedule-demo": "Solicitar una demo"
-}
diff --git a/frontend/public/locales/es/common.json b/frontend/public/locales/es/common.json
deleted file mode 100644
index 8b0446085e..0000000000
--- a/frontend/public/locales/es/common.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "error_project-already-exists": "Ya existe un proyecto con este nombre.",
- "no-mobile": "Para usar Infisical, inicia sesión con un dispositivo de mayores dimesiones.",
- "email": "Correo electrónico",
- "password": "Contraseña",
- "first-name": "Nombre",
- "last-name": "Apellidos",
- "logout": "Cerrar sesión",
- "validate-required": "Por favor, introduce tu {{name}}",
- "maintenance-alert": "Estamos experimentando problemas técnicos. Estamos trabajando para resolverlos. Por favor, vuelve en unos minutos.",
- "click-to-copy": "Click para copiar",
- "project-id": "ID de proyecto",
- "save-changes": "Guardar cambios",
- "saved": "Guardado",
- "drop-zone": "Arrastra y suelta un archivo .env, .json o .yml aquí.",
- "drop-zone-keys": "Arrastra y suelta un archivo .env, .json, or .yml aquí para añadir más secrets.",
- "role": "Rol",
- "role_admin": "admin",
- "display-name": "Nombre visible",
- "environment": "Entorno",
- "expired-in": "Expira en",
- "language": "Idioma",
- "search": "Buscar...",
- "note": "Nota",
- "view-more": "Ver más",
- "end-of-history": "Fin del historial",
- "select-event": "Selecciona un evento",
- "event": "Evento",
- "user": "Usuario",
- "source": "Fuente",
- "time": "Hora",
- "timestamp": "Marca temporal"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/es/dashboard.json b/frontend/public/locales/es/dashboard.json
deleted file mode 100644
index ac3cef0dd2..0000000000
--- a/frontend/public/locales/es/dashboard.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "title": "Secrets",
- "og-title": "Gestiona tus archivos .env en segundos",
- "og-description": "Infisical es una solución cifrada de extremo a extremo que habilita a los equipos a compartir archivos .env de forma sencilla.",
- "search-keys": "Buscar claves...",
- "add-key": "Añadir clave",
- "personal": "Personal",
- "personal-description": "Las claves personales solo son visibles para ti",
- "shared": "Compartido",
- "shared-description": "Claves compartidas son visibles para todo tu equipo",
- "make-shared": "Hacer compartida",
- "make-personal": "Hacer personal",
- "add-secret": "Añadir una nueva clave",
- "check-docs": {
- "button": "Comprueba la documentación",
- "title": "¡Buen trabajo!",
- "line1": "Enhorabuena por añadir claves.",
- "line2": "Averigua como usarlo desde tu código."
- },
- "sidebar": {
- "secret": "Secret",
- "key": "Clave",
- "value": "valor",
- "override": "Sobreescribir valor con el valor personal",
- "version-history": "Historial de versiones",
- "comments": "Comentarios & Notas",
- "personal-explanation": "Esta clave es personal. No será compartida con ninguno de tus compañeros.",
- "generate-random-hex": "Generar Hex aleatorio",
- "digits": "dígitos",
- "delete-key-dialog": {
- "title": "Eliminar clave",
- "confirm-delete-message": "¿Estás seguro de que quieres eliminar esta clave? Esta operación no se puede deshacer."
- }
- }
-}
diff --git a/frontend/public/locales/es/integrations.json b/frontend/public/locales/es/integrations.json
deleted file mode 100644
index 38d299d5a6..0000000000
--- a/frontend/public/locales/es/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Integraciones del proyecto",
- "description": "Gestiona tus integraciones de Infisical con aplicaciones de terceros.",
- "no-integrations1": "No tienes ninguna integración configurada. Cuando las tengas, aparecerán aquí.",
- "no-integrations2": "Para empezar haz click en cualquiera de las opciones siguientes. Se necesitan tan solo 5 pasos.",
- "available": "Integraciones con la nube",
- "available-text1": "Haz click en la integración que quieras conectar. Esto hará que las variables de entorno se configuren automáticamente en los servicios de terceros seleccionados.",
- "available-text2": "Nota: en la integración con Heroku, por motivos de seguridad, es imposible mantener el cifrado de extremo a extremo. En teoría, esto permite a Infisical descifrar tus variables de entorno. En la práctica, te podemos asegurar que esto nunca va a suceder. El núcleo del servicio Infisical siempre estará cifrado de extremo a extremo. Si tienes dudas, escríbenos a [email protected].",
- "cloud-integrations": "Integraciones con la nube",
- "framework-integrations": "Integraciones con frameworks",
- "click-to-start": "Haz click en una integración para empezar a sincronizar las claves.",
- "click-to-setup": "Haz click en un framework para ver las instrucciones de uso.",
- "grant-access-to-secrets": "Autorizar Infisical el acceso a tus claves",
- "why-infisical-needs-access": "La mayoría de las integraciones en la nube requieren a Infisical tener permiso para descifrar tus claves, para que puedan ser enviadas.",
- "grant-access-button": "Autorizar acceso"
-}
diff --git a/frontend/public/locales/es/login.json b/frontend/public/locales/es/login.json
deleted file mode 100644
index 1fdd5b9704..0000000000
--- a/frontend/public/locales/es/login.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "title": "Iniciar sesión",
- "og-title": "Iniciar sesión en Infisical",
- "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
- "login": "Iniciar sesión",
- "need-account": "¿Necesitas una cuenta de Infisical?",
- "create-account": "Crea una cuenta",
- "forgot-password": "¿Has olvidado tu contraseña?",
- "error-login": "Datos incorrectos."
-}
diff --git a/frontend/public/locales/es/mfa.json b/frontend/public/locales/es/mfa.json
deleted file mode 100644
index 35d41adf5a..0000000000
--- a/frontend/public/locales/es/mfa.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Registrarse",
- "og-title": "Reemplaza los archivos .env con una línea de código. Regístrate en Infisical en solo 3 minutos.",
- "og-description": "Infisical es una plataforma sencilla cifrada de extremo a extremo que permite a equipos sincronizar y gestionar API-keys y variables de entorno. Funciona con Node.js, Next.js, Gatsby, Nest.js...",
- "signup": "Registrarse",
- "already-have-account": "¿Ya tienes una cuenta? Inicia sesión",
- "forgot-password": "¿Has olvidado tu contraseña?",
- "verify": "Verificar",
- "step1-start": "Vamos a empezar",
- "step1-privacy": "Al crear la cuenta, aceptas nuestros Términos y has leído y comprendido nuestra Política de privacidad.",
- "step1-submit": "Empezar",
- "step2-message": "Hemos enviado un código a",
- "step2-code-error": "Oops. Tu código es incorrecto. Intentos restantes:",
- "step2-resend-alert": "¿No ves el código?",
- "step2-resend-submit": "Volver a enviar",
- "step2-resend-progress": "Reenviando...",
- "step2-spam-alert": "Asegúrate de comprobar la carpeta de spam.",
- "step3-message": "¡Casi hemos terminado!",
- "step4-message": "Guarda tu Kit de emergencia",
- "step4-description1": "Si pierdes el acceso a tu cuenta, tu Kit de emergencia es la única forma de iniciar sesión.",
- "step4-description2": "Te recomendamos que lo descargues y lo guardes en un sitio seguro.",
- "step4-description3": "Contiene tu Clave secreta, a la que no tenemos acceso y tampoco podemos recuperar si la pierdes.",
- "step4-download": "Descargar PDF",
- "step5-send-invites": "Enviar invitaciones",
- "step5-invite-team": "Invita a tu equipo",
- "step5-subtitle": "Infisical está pensado para usarlo con tus compañeros. Invítalos a probarlo.",
- "step5-skip": "Saltar"
-}
diff --git a/frontend/public/locales/es/nav.json b/frontend/public/locales/es/nav.json
deleted file mode 100644
index a834466263..0000000000
--- a/frontend/public/locales/es/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "Unirse al Slack",
- "docs": "Leer documentación",
- "issue": "Abrir una Github Issue",
- "email": "Envíanos un correo electrónico"
- },
- "user": {
- "signed-in-as": "INICIADO COMO",
- "current-organization": "ORGANIZACIÓN ACTUAL",
- "usage-billing": "Uso & Facturación",
- "invite": "Invitar miembros",
- "other-organizations": "OTRA ORGANIZACIÓN"
- },
- "menu": {
- "project": "PROYECTO",
- "secrets": "Claves",
- "members": "Miembros",
- "integrations": "Integraciones",
- "project-settings": "Configuración del proyecto"
- }
-}
diff --git a/frontend/public/locales/es/section-api-key.json b/frontend/public/locales/es/section-api-key.json
deleted file mode 100644
index bf385862b8..0000000000
--- a/frontend/public/locales/es/section-api-key.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "api-keys": "Tokens de servicio",
- "api-keys-description": "Cada token de servicio es específico para ti, para cada proyecto y para cada entorno en este proyecto.",
- "add-new": "Añadir nuevo token",
- "add-dialog": {
- "title": "Añadir una API Key",
- "description": "Especifica el nombre y el período de expiración. Cuando una API key es generada, solo podrás verla una vez hasta que desaparezca. Asegúrate de guardarla en algún lado.",
- "name": "Nombre de la API Key",
- "add": "Añadir API Key",
- "copy-service-token": "Copia tu API key",
- "copy-service-token-description": "Una vez que cierres esta ventana, no volverás a ver tu API key"
- }
-}
diff --git a/frontend/public/locales/es/section-incident.json b/frontend/public/locales/es/section-incident.json
deleted file mode 100644
index 79505ab600..0000000000
--- a/frontend/public/locales/es/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "incident-contacts": "Contactos de incidencias",
- "incident-contacts-description": "Estos contactos serán notificados en caso de una incidencia grave.",
- "no-incident-contacts": "No se han encontrado contactos para incidencias.",
- "add-contact": "Añadir contacto",
- "add-dialog": {
- "title": "Añadir un contacto de incidencias",
- "description": "Este contacto será notificado en el caso de una incidencia grave.",
- "add-incident": "Añadir contacto de incidencias"
- }
-}
diff --git a/frontend/public/locales/es/section-members.json b/frontend/public/locales/es/section-members.json
deleted file mode 100644
index 26996d6972..0000000000
--- a/frontend/public/locales/es/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "add-member": "Añadir miembro",
- "org-members": "Miembros de la organización",
- "org-members-description": "Gestiona los miembros de tu organización. Estos usuarios podrán ser agrupados en proyectos más tarde.",
- "search-members": "Buscar miembros...",
- "add-dialog": {
- "add-member-to-project": "Añadir un miembro al proyecto",
- "already-all-invited": "Todos los uaurios en tu organización han sido invitados.",
- "add-user-org-first": "Añadir primero más usuarios a la organización.",
- "user-will-email": "El usuario recibirá un correo electrónico con la invitación.",
- "looking-add": "<0>Si quieres añadir usuarios a tu organización, haz</0><1>click aquí</1>",
- "add-user-to-org": "Añadir usuarios a la organización"
- }
-}
diff --git a/frontend/public/locales/es/section-password.json b/frontend/public/locales/es/section-password.json
deleted file mode 100644
index f3b957ee20..0000000000
--- a/frontend/public/locales/es/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "password": "Contraseña",
- "change": "Cambiar contraseña",
- "current": "Contraseña actual",
- "current-wrong": "La contraseña actual puede puede que sea incorrecta",
- "new": "Nueva contraseña",
- "validate-base": "La contraseña debe contener como mínimo:",
- "validate-length": "14 caracteres",
- "validate-case": "1 letra en minúsculas",
- "validate-number": "1 número"
-}
diff --git a/frontend/public/locales/es/section-token.json b/frontend/public/locales/es/section-token.json
deleted file mode 100644
index fdf04e6000..0000000000
--- a/frontend/public/locales/es/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "service-tokens": "Tokens de servicio",
- "service-tokens-description": "Cada token de servicio es específico para ti, para cada proyecto y para cada entorno en este proyectos.",
- "add-new": "Añadir nuevo token",
- "add-dialog": {
- "title": "Añade un nuevo token de servicio para {{target}}",
- "description": "Cuando se genera un token, solo podrás verlo una vez antes de que desaparezca. Asegúrate de guardarlo en algún lugar.",
- "name": "Nombre del token de servicio",
- "add": "Añadir token de servicio",
- "copy-service-token": "Copiar tu token de servicio",
- "copy-service-token-description": "Una vez cierres esta ventana, no volverás a ver tu token de nuevo"
- }
-}
diff --git a/frontend/public/locales/es/settings-members.json b/frontend/public/locales/es/settings-members.json
deleted file mode 100644
index bf6a0c1066..0000000000
--- a/frontend/public/locales/es/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Miembros del proyecto",
- "description": "Esta página muestra los miembros del proyecto seleccionado, y permite modificar sus permisos."
-}
diff --git a/frontend/public/locales/es/settings-org.json b/frontend/public/locales/es/settings-org.json
deleted file mode 100644
index 3988bd1659..0000000000
--- a/frontend/public/locales/es/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Configuración de la organización",
- "description": "Gestiona los miembros de tu organización. Estos usuarios podrán ser gestionados en proyectos más adelante."
-}
diff --git a/frontend/public/locales/es/settings-personal.json b/frontend/public/locales/es/settings-personal.json
deleted file mode 100644
index 5403865781..0000000000
--- a/frontend/public/locales/es/settings-personal.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Preferencias personales",
- "description": "Visualiza y gestiona aquí tu información personal.",
- "emergency": {
- "name": "Kit de emergencia",
- "text1": "Tu Kit de emergencia contiene la información que necesitarás para iniciar sesión en tu cuenta de Infisical.",
- "text2": "Solo el último Kit de emergencia descargado es válido. Para conseguir uno nuevo, introduce tu contraseña.",
- "download": "Descargar Kit de emergencia"
- },
- "change-language": "Cambiar idioma",
- "api-keys": {
- "title": "API Keys",
- "description": "Gestiona tus API Keys personales para acceder a la API de Infisical.",
- "add-new": "Añadir"
- }
-}
diff --git a/frontend/public/locales/es/settings-project.json b/frontend/public/locales/es/settings-project.json
deleted file mode 100644
index b1757d0720..0000000000
--- a/frontend/public/locales/es/settings-project.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "title": "Configuración de proyecto",
- "description": "Esta configuración solo afecta al proyecto seleccionado.",
- "danger-zone": "Zona de peligro",
- "delete-project": "Eliminar proyecto",
- "project-to-delete": "Proyecto a eliminar",
- "danger-zone-note": "Tan pronto como elimines el proyecto, no podrás volver atrás. Esto eliminará todas las claves. Si aún quieres hacerlo, introduce el nombre del proyecto a continuación.",
- "delete-project-note": "Nota: Solo puedes eliminar un proyecto si tienes más de uno",
- "project-id-description": "Para integrar Infisical en tu aplicación y obtener la inyección automática de variables de entorno, debes usar el siguiente ID de Proyecto.",
- "project-id-description2": "Para más guías, incluyendo ejemplos de código en diferentes lenguajes y frameworks, visita ",
- "auto-generated": "Este es el ID único y autogenerado de proyecto. No se puede modificar.",
- "docs": "Documentación de Infisical",
- "auto-capitalization": "Mayúsculas automáticas",
- "auto-capitalization-description": "De acuerdo con los estándares, Infisical pondrá en mayúsculas tus claves. Si quieres desactivar esta funcionalidad, lo puedes hacer aquí."
-}
diff --git a/frontend/public/locales/es/signup.json b/frontend/public/locales/es/signup.json
deleted file mode 100644
index 35d41adf5a..0000000000
--- a/frontend/public/locales/es/signup.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Registrarse",
- "og-title": "Reemplaza los archivos .env con una línea de código. Regístrate en Infisical en solo 3 minutos.",
- "og-description": "Infisical es una plataforma sencilla cifrada de extremo a extremo que permite a equipos sincronizar y gestionar API-keys y variables de entorno. Funciona con Node.js, Next.js, Gatsby, Nest.js...",
- "signup": "Registrarse",
- "already-have-account": "¿Ya tienes una cuenta? Inicia sesión",
- "forgot-password": "¿Has olvidado tu contraseña?",
- "verify": "Verificar",
- "step1-start": "Vamos a empezar",
- "step1-privacy": "Al crear la cuenta, aceptas nuestros Términos y has leído y comprendido nuestra Política de privacidad.",
- "step1-submit": "Empezar",
- "step2-message": "Hemos enviado un código a",
- "step2-code-error": "Oops. Tu código es incorrecto. Intentos restantes:",
- "step2-resend-alert": "¿No ves el código?",
- "step2-resend-submit": "Volver a enviar",
- "step2-resend-progress": "Reenviando...",
- "step2-spam-alert": "Asegúrate de comprobar la carpeta de spam.",
- "step3-message": "¡Casi hemos terminado!",
- "step4-message": "Guarda tu Kit de emergencia",
- "step4-description1": "Si pierdes el acceso a tu cuenta, tu Kit de emergencia es la única forma de iniciar sesión.",
- "step4-description2": "Te recomendamos que lo descargues y lo guardes en un sitio seguro.",
- "step4-description3": "Contiene tu Clave secreta, a la que no tenemos acceso y tampoco podemos recuperar si la pierdes.",
- "step4-download": "Descargar PDF",
- "step5-send-invites": "Enviar invitaciones",
- "step5-invite-team": "Invita a tu equipo",
- "step5-subtitle": "Infisical está pensado para usarlo con tus compañeros. Invítalos a probarlo.",
- "step5-skip": "Saltar"
-}
diff --git a/frontend/public/locales/es/translations.json b/frontend/public/locales/es/translations.json
new file mode 100644
index 0000000000..e734fb3f23
--- /dev/null
+++ b/frontend/public/locales/es/translations.json
@@ -0,0 +1,319 @@
+{
+ "activity": {
+ "title": "Historial de eventos",
+ "subtitle": "Historial de eventos para este proyecto de Infisical.",
+ "event": {
+ "readSecrets": "Secrets vistas",
+ "updateSecrets": "Secrets actualizadas",
+ "addSecrets": "Secrets añadidas",
+ "deleteSecrets": "Secrets eliminadas"
+ },
+ "ip-address": "Dirección IP"
+ },
+ "billing": {
+ "title": "Uso & Facturación",
+ "description": "Visualiza y gestiona la suscripción de tu organización",
+ "subscription": "Suscripción",
+ "starter": {
+ "name": "Starter",
+ "price-explanation": "hasta 5 miembros",
+ "text": "¡Hasta 5 personas gratis!",
+ "subtext": "Después, $5 por miembro/mes."
+ },
+ "professional": {
+ "name": "Professional",
+ "price-explanation": "/miembro/mes",
+ "subtext": "Includes unlimited projects & members.",
+ "text": "Mantén la gestión de claves a medida que creces."
+ },
+ "enterprise": {
+ "name": "Enterprise",
+ "text": "Mantén la gestión de claves a medida que creces."
+ },
+ "current-usage": "Uso actual",
+ "free": "Gratis",
+ "downgrade": "Reducir",
+ "upgrade": "Mejorar",
+ "learn-more": "Saber más",
+ "custom-pricing": "A medida",
+ "schedule-demo": "Solicitar una demo"
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "error_project-already-exists": "Ya existe un proyecto con este nombre.",
+ "no-mobile": "Para usar Infisical, inicia sesión con un dispositivo de mayores dimesiones.",
+ "email": "Correo electrónico",
+ "password": "Contraseña",
+ "first-name": "Nombre",
+ "last-name": "Apellidos",
+ "logout": "Cerrar sesión",
+ "validate-required": "Por favor, introduce tu {{name}}",
+ "maintenance-alert": "Estamos experimentando problemas técnicos. Estamos trabajando para resolverlos. Por favor, vuelve en unos minutos.",
+ "click-to-copy": "Click para copiar",
+ "project-id": "ID de proyecto",
+ "save-changes": "Guardar cambios",
+ "saved": "Guardado",
+ "drop-zone": "Arrastra y suelta un archivo .env, .json o .yml aquí.",
+ "drop-zone-keys": "Arrastra y suelta un archivo .env, .json, or .yml aquí para añadir más secrets.",
+ "role": "Rol",
+ "role_admin": "admin",
+ "display-name": "Nombre visible",
+ "environment": "Entorno",
+ "expired-in": "Expira en",
+ "language": "Idioma",
+ "search": "Buscar...",
+ "note": "Nota",
+ "view-more": "Ver más",
+ "end-of-history": "Fin del historial",
+ "select-event": "Selecciona un evento",
+ "event": "Evento",
+ "user": "Usuario",
+ "source": "Fuente",
+ "time": "Hora",
+ "timestamp": "Marca temporal"
+ },
+ "dashboard": {
+ "title": "Secrets",
+ "og-title": "Gestiona tus archivos .env en segundos",
+ "og-description": "Infisical es una solución cifrada de extremo a extremo que habilita a los equipos a compartir archivos .env de forma sencilla.",
+ "search-keys": "Buscar claves...",
+ "add-key": "Añadir clave",
+ "personal": "Personal",
+ "personal-description": "Las claves personales solo son visibles para ti",
+ "shared": "Compartido",
+ "shared-description": "Claves compartidas son visibles para todo tu equipo",
+ "make-shared": "Hacer compartida",
+ "make-personal": "Hacer personal",
+ "add-secret": "Añadir una nueva clave",
+ "check-docs": {
+ "button": "Comprueba la documentación",
+ "title": "¡Buen trabajo!",
+ "line1": "Enhorabuena por añadir claves.",
+ "line2": "Averigua como usarlo desde tu código."
+ },
+ "sidebar": {
+ "secret": "Secret",
+ "key": "Clave",
+ "value": "valor",
+ "override": "Sobreescribir valor con el valor personal",
+ "version-history": "Historial de versiones",
+ "comments": "Comentarios & Notas",
+ "personal-explanation": "Esta clave es personal. No será compartida con ninguno de tus compañeros.",
+ "generate-random-hex": "Generar Hex aleatorio",
+ "digits": "dígitos",
+ "delete-key-dialog": {
+ "title": "Eliminar clave",
+ "confirm-delete-message": "¿Estás seguro de que quieres eliminar esta clave? Esta operación no se puede deshacer."
+ }
+ }
+ },
+ "integrations": {
+ "title": "Integraciones del proyecto",
+ "description": "Gestiona tus integraciones de Infisical con aplicaciones de terceros.",
+ "no-integrations1": "No tienes ninguna integración configurada. Cuando las tengas, aparecerán aquí.",
+ "no-integrations2": "Para empezar haz click en cualquiera de las opciones siguientes. Se necesitan tan solo 5 pasos.",
+ "available": "Integraciones con la nube",
+ "available-text1": "Haz click en la integración que quieras conectar. Esto hará que las variables de entorno se configuren automáticamente en los servicios de terceros seleccionados.",
+ "available-text2": "Nota: en la integración con Heroku, por motivos de seguridad, es imposible mantener el cifrado de extremo a extremo. En teoría, esto permite a Infisical descifrar tus variables de entorno. En la práctica, te podemos asegurar que esto nunca va a suceder. El núcleo del servicio Infisical siempre estará cifrado de extremo a extremo. Si tienes dudas, escríbenos a [email protected].",
+ "cloud-integrations": "Integraciones con la nube",
+ "framework-integrations": "Integraciones con frameworks",
+ "click-to-start": "Haz click en una integración para empezar a sincronizar las claves.",
+ "click-to-setup": "Haz click en un framework para ver las instrucciones de uso.",
+ "grant-access-to-secrets": "Autorizar Infisical el acceso a tus claves",
+ "why-infisical-needs-access": "La mayoría de las integraciones en la nube requieren a Infisical tener permiso para descifrar tus claves, para que puedan ser enviadas.",
+ "grant-access-button": "Autorizar acceso"
+ },
+ "login": {
+ "title": "Iniciar sesión",
+ "og-title": "Iniciar sesión en Infisical",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
+ "login": "Iniciar sesión",
+ "need-account": "¿Necesitas una cuenta de Infisical?",
+ "create-account": "Crea una cuenta",
+ "forgot-password": "¿Has olvidado tu contraseña?",
+ "error-login": "Datos incorrectos."
+ },
+ "mfa": {
+ "title": "Registrarse",
+ "og-title": "Reemplaza los archivos .env con una línea de código. Regístrate en Infisical en solo 3 minutos.",
+ "og-description": "Infisical es una plataforma sencilla cifrada de extremo a extremo que permite a equipos sincronizar y gestionar API-keys y variables de entorno. Funciona con Node.js, Next.js, Gatsby, Nest.js...",
+ "signup": "Registrarse",
+ "already-have-account": "¿Ya tienes una cuenta? Inicia sesión",
+ "forgot-password": "¿Has olvidado tu contraseña?",
+ "verify": "Verificar",
+ "step1-start": "Vamos a empezar",
+ "step1-privacy": "Al crear la cuenta, aceptas nuestros Términos y has leído y comprendido nuestra Política de privacidad.",
+ "step1-submit": "Empezar",
+ "step2-message": "Hemos enviado un código a",
+ "step2-code-error": "Oops. Tu código es incorrecto. Intentos restantes:",
+ "step2-resend-alert": "¿No ves el código?",
+ "step2-resend-submit": "Volver a enviar",
+ "step2-resend-progress": "Reenviando...",
+ "step2-spam-alert": "Asegúrate de comprobar la carpeta de spam.",
+ "step3-message": "¡Casi hemos terminado!",
+ "step4-message": "Guarda tu Kit de emergencia",
+ "step4-description1": "Si pierdes el acceso a tu cuenta, tu Kit de emergencia es la única forma de iniciar sesión.",
+ "step4-description2": "Te recomendamos que lo descargues y lo guardes en un sitio seguro.",
+ "step4-description3": "Contiene tu Clave secreta, a la que no tenemos acceso y tampoco podemos recuperar si la pierdes.",
+ "step4-download": "Descargar PDF",
+ "step5-send-invites": "Enviar invitaciones",
+ "step5-invite-team": "Invita a tu equipo",
+ "step5-subtitle": "Infisical está pensado para usarlo con tus compañeros. Invítalos a probarlo.",
+ "step5-skip": "Saltar"
+ },
+ "nav": {
+ "support": {
+ "slack": "Unirse al Slack",
+ "docs": "Leer documentación",
+ "issue": "Abrir una Github Issue",
+ "email": "Envíanos un correo electrónico"
+ },
+ "user": {
+ "signed-in-as": "INICIADO COMO",
+ "current-organization": "ORGANIZACIÓN ACTUAL",
+ "usage-billing": "Uso & Facturación",
+ "invite": "Invitar miembros",
+ "other-organizations": "OTRA ORGANIZACIÓN"
+ },
+ "menu": {
+ "project": "PROYECTO",
+ "secrets": "Claves",
+ "members": "Miembros",
+ "integrations": "Integraciones",
+ "project-settings": "Configuración del proyecto"
+ }
+ },
+ "section": {
+ "api-key": {
+ "api-keys": "Tokens de servicio",
+ "api-keys-description": "Cada token de servicio es específico para ti, para cada proyecto y para cada entorno en este proyecto.",
+ "add-new": "Añadir nuevo token",
+ "add-dialog": {
+ "title": "Añadir una API Key",
+ "description": "Especifica el nombre y el período de expiración. Cuando una API key es generada, solo podrás verla una vez hasta que desaparezca. Asegúrate de guardarla en algún lado.",
+ "name": "Nombre de la API Key",
+ "add": "Añadir API Key",
+ "copy-service-token": "Copia tu API key",
+ "copy-service-token-description": "Una vez que cierres esta ventana, no volverás a ver tu API key"
+ }
+ },
+ "incident": {
+ "incident-contacts": "Contactos de incidencias",
+ "incident-contacts-description": "Estos contactos serán notificados en caso de una incidencia grave.",
+ "no-incident-contacts": "No se han encontrado contactos para incidencias.",
+ "add-contact": "Añadir contacto",
+ "add-dialog": {
+ "title": "Añadir un contacto de incidencias",
+ "description": "Este contacto será notificado en el caso de una incidencia grave.",
+ "add-incident": "Añadir contacto de incidencias"
+ }
+ },
+ "members": {
+ "add-member": "Añadir miembro",
+ "org-members": "Miembros de la organización",
+ "org-members-description": "Gestiona los miembros de tu organización. Estos usuarios podrán ser agrupados en proyectos más tarde.",
+ "search-members": "Buscar miembros...",
+ "add-dialog": {
+ "add-member-to-project": "Añadir un miembro al proyecto",
+ "already-all-invited": "Todos los uaurios en tu organización han sido invitados.",
+ "add-user-org-first": "Añadir primero más usuarios a la organización.",
+ "user-will-email": "El usuario recibirá un correo electrónico con la invitación.",
+ "looking-add": "<0>Si quieres añadir usuarios a tu organización, haz</0><1>click aquí</1>",
+ "add-user-to-org": "Añadir usuarios a la organización"
+ }
+ },
+ "password": {
+ "password": "Contraseña",
+ "change": "Cambiar contraseña",
+ "current": "Contraseña actual",
+ "current-wrong": "La contraseña actual puede puede que sea incorrecta",
+ "new": "Nueva contraseña",
+ "validate-base": "La contraseña debe contener como mínimo:",
+ "validate-length": "14 caracteres",
+ "validate-case": "1 letra en minúsculas",
+ "validate-number": "1 número"
+ },
+ "token": {
+ "service-tokens": "Tokens de servicio",
+ "service-tokens-description": "Cada token de servicio es específico para ti, para cada proyecto y para cada entorno en este proyectos.",
+ "add-new": "Añadir nuevo token",
+ "add-dialog": {
+ "title": "Añade un nuevo token de servicio para {{target}}",
+ "description": "Cuando se genera un token, solo podrás verlo una vez antes de que desaparezca. Asegúrate de guardarlo en algún lugar.",
+ "name": "Nombre del token de servicio",
+ "add": "Añadir token de servicio",
+ "copy-service-token": "Copiar tu token de servicio",
+ "copy-service-token-description": "Una vez cierres esta ventana, no volverás a ver tu token de nuevo"
+ }
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "Miembros del proyecto",
+ "description": "Esta página muestra los miembros del proyecto seleccionado, y permite modificar sus permisos."
+ },
+ "org": {
+ "title": "Configuración de la organización",
+ "description": "Gestiona los miembros de tu organización. Estos usuarios podrán ser gestionados en proyectos más adelante."
+ },
+ "personal": {
+ "title": "Preferencias personales",
+ "description": "Visualiza y gestiona aquí tu información personal.",
+ "emergency": {
+ "name": "Kit de emergencia",
+ "text1": "Tu Kit de emergencia contiene la información que necesitarás para iniciar sesión en tu cuenta de Infisical.",
+ "text2": "Solo el último Kit de emergencia descargado es válido. Para conseguir uno nuevo, introduce tu contraseña.",
+ "download": "Descargar Kit de emergencia"
+ },
+ "change-language": "Cambiar idioma",
+ "api-keys": {
+ "title": "API Keys",
+ "description": "Gestiona tus API Keys personales para acceder a la API de Infisical.",
+ "add-new": "Añadir"
+ }
+ },
+ "project": {
+ "title": "Configuración de proyecto",
+ "description": "Esta configuración solo afecta al proyecto seleccionado.",
+ "danger-zone": "Zona de peligro",
+ "delete-project": "Eliminar proyecto",
+ "project-to-delete": "Proyecto a eliminar",
+ "danger-zone-note": "Tan pronto como elimines el proyecto, no podrás volver atrás. Esto eliminará todas las claves. Si aún quieres hacerlo, introduce el nombre del proyecto a continuación.",
+ "delete-project-note": "Nota: Solo puedes eliminar un proyecto si tienes más de uno",
+ "project-id-description": "Para integrar Infisical en tu aplicación y obtener la inyección automática de variables de entorno, debes usar el siguiente ID de Proyecto.",
+ "project-id-description2": "Para más guías, incluyendo ejemplos de código en diferentes lenguajes y frameworks, visita ",
+ "auto-generated": "Este es el ID único y autogenerado de proyecto. No se puede modificar.",
+ "docs": "Documentación de Infisical",
+ "auto-capitalization": "Mayúsculas automáticas",
+ "auto-capitalization-description": "De acuerdo con los estándares, Infisical pondrá en mayúsculas tus claves. Si quieres desactivar esta funcionalidad, lo puedes hacer aquí."
+ }
+ },
+ "signup": {
+ "title": "Registrarse",
+ "og-title": "Reemplaza los archivos .env con una línea de código. Regístrate en Infisical en solo 3 minutos.",
+ "og-description": "Infisical es una plataforma sencilla cifrada de extremo a extremo que permite a equipos sincronizar y gestionar API-keys y variables de entorno. Funciona con Node.js, Next.js, Gatsby, Nest.js...",
+ "signup": "Registrarse",
+ "already-have-account": "¿Ya tienes una cuenta? Inicia sesión",
+ "forgot-password": "¿Has olvidado tu contraseña?",
+ "verify": "Verificar",
+ "step1-start": "Vamos a empezar",
+ "step1-privacy": "Al crear la cuenta, aceptas nuestros Términos y has leído y comprendido nuestra Política de privacidad.",
+ "step1-submit": "Empezar",
+ "step2-message": "Hemos enviado un código a",
+ "step2-code-error": "Oops. Tu código es incorrecto. Intentos restantes:",
+ "step2-resend-alert": "¿No ves el código?",
+ "step2-resend-submit": "Volver a enviar",
+ "step2-resend-progress": "Reenviando...",
+ "step2-spam-alert": "Asegúrate de comprobar la carpeta de spam.",
+ "step3-message": "¡Casi hemos terminado!",
+ "step4-message": "Guarda tu Kit de emergencia",
+ "step4-description1": "Si pierdes el acceso a tu cuenta, tu Kit de emergencia es la única forma de iniciar sesión.",
+ "step4-description2": "Te recomendamos que lo descargues y lo guardes en un sitio seguro.",
+ "step4-description3": "Contiene tu Clave secreta, a la que no tenemos acceso y tampoco podemos recuperar si la pierdes.",
+ "step4-download": "Descargar PDF",
+ "step5-send-invites": "Enviar invitaciones",
+ "step5-invite-team": "Invita a tu equipo",
+ "step5-subtitle": "Infisical está pensado para usarlo con tus compañeros. Invítalos a probarlo.",
+ "step5-skip": "Saltar"
+ }
+}
diff --git a/frontend/public/locales/fr/activity.json b/frontend/public/locales/fr/activity.json
deleted file mode 100644
index 4360d7d0c9..0000000000
--- a/frontend/public/locales/fr/activity.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Journaux d'activité",
- "subtitle": "Historique des événements pour ce projet Infisical.",
- "event": {
- "readSecrets": "Secrets Visualisés",
- "updateSecrets": "Secrets Mis à jour",
- "addSecrets": "Secrets Ajoutés",
- "deleteSecrets": "Secrets Supprimés"
- },
- "ip-address": "Adresse IP"
-}
diff --git a/frontend/public/locales/fr/billing.json b/frontend/public/locales/fr/billing.json
deleted file mode 100644
index 1acb44339e..0000000000
--- a/frontend/public/locales/fr/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Utilisation et Facturation",
- "description": "Voir et gérer l'abonnement de votre organisation ici",
- "subscription": "Abonnement",
- "starter": {
- "name": "Starter",
- "price-explanation": "jusqu'à 5 membres de l'équipe",
- "text": "Gérez n'importe quel projet jusqu'à 5 membres gratuitement!",
- "subtext": "$5 par membre / mois par la suite."
- },
- "professional": {
- "name": "Professionnel",
- "price-explanation": "/membre/mois",
- "subtext": "Comprend des projets et des membres illimités.",
- "text": "Suivez la gestion clé à mesure que vous grandissez."
- },
- "enterprise": {
- "name": "Entreprise",
- "text": "Suivez la gestion clé à mesure que vous grandissez."
- },
- "current-usage": "Utilisation actuelle",
- "free": "Gratuit",
- "downgrade": "Rétrograder",
- "upgrade": "Améliorer",
- "learn-more": "En savoir plus",
- "custom-pricing": "Prix personnalisés",
- "schedule-demo": "Planifier une démo"
-}
diff --git a/frontend/public/locales/fr/common.json b/frontend/public/locales/fr/common.json
deleted file mode 100644
index 1f6a524473..0000000000
--- a/frontend/public/locales/fr/common.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "error_project-already-exists": "Un projet avec ce nom existe déjà.",
- "no-mobile": " Pour utiliser Infisical, veuillez vous connecter avec un appareil avec des dimensions plus grandes. ",
- "email": "Email",
- "password": "Mot de passe",
- "first-name": "Prénom",
- "last-name": "Nom",
- "logout": "Déconnexion",
- "validate-required": "Veuillez saisir votre {{name}}",
- "maintenance-alert": "Nous rencontrons des difficultés techniques mineures. Nous travaillons sur leurs résolution dès maintenant. Revenez dans quelques minutes.",
- "click-to-copy": "Cliquez pour copiez",
- "project-id": "Identifiant du Projet",
- "save-changes": "Sauvegarder les modifications",
- "saved": "Enregistrée",
- "drop-zone": "Glissez et déposez un fichier .env ou .yml ici.",
- "drop-zone-keys": "Glissez et déposez un fichier .env ou .yml ici pour ajouter plus de clés.",
- "role": "Rôle",
- "role_admin": "administrateur",
- "display-name": "Nom d'affichage",
- "environment": "Environnement",
- "expired-in": "Expire dans",
- "language": "Langue",
- "search": "Recherche...",
- "note": "Note",
- "view-more": "Voir plus",
- "end-of-history": "Fin de l'historique",
- "select-event": "Sélectionnez un événement",
- "event": "Événement",
- "user": "Utilisateur",
- "source": "Source",
- "time": "Heure",
- "timestamp": "Horodatage"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/fr/dashboard.json b/frontend/public/locales/fr/dashboard.json
deleted file mode 100644
index f90bf1fc21..0000000000
--- a/frontend/public/locales/fr/dashboard.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "title": "Secrets",
- "og-title": "Gérez vos fichiers .env rapidement",
- "og-description": "Infisical une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer leurs fichiers .env.",
- "search-keys": "Recherche les clefs...",
- "add-key": "Ajouter une clef",
- "personal": "Personnel",
- "personal-description": "Les clés personnelles ne sont visibles que pour vous",
- "shared": "Partagé",
- "shared-description": "Les clés partagées sont visibles à toute votre équipe",
- "make-shared": "Rendre Partagé",
- "make-personal": "Rendre Personnel",
- "add-secret": "Ajouter un nouveau secret",
- "check-docs": {
- "button": "Vérifier la documentation",
- "title": "Bon travail!",
- "line1": "Félicitations pour avoir ajouté plus de secrets.",
- "line2": "Voici comment les connecter à votre base de code."
- },
- "sidebar": {
- "secret": "Secret",
- "key": "Clef",
- "value": "Valeur",
- "override": "Remplacer la valeur avec une valeur personnelle",
- "version-history": "Historique des versions",
- "comments": "Commentaires & Notes",
- "personal-explanation": "Ce secret est personnel. Il n'est partagé avec aucun de vos coéquipiers.",
- "generate-random-hex": "Générer un Hex aléatoire",
- "digits": "chiffres",
- "delete-key-dialog": {
- "title": "Supprimer la clef",
- "confirm-delete-message": "Êtes-vous sûr de vouloir supprimer ce secret? Cela ne peut pas être annulé."
- }
- }
-
-}
diff --git a/frontend/public/locales/fr/integrations.json b/frontend/public/locales/fr/integrations.json
deleted file mode 100644
index 887e79dfd6..0000000000
--- a/frontend/public/locales/fr/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Intégrations de Projet",
- "description": "Gérez vos intégrations d'Infisical avec des services tiers.",
- "no-integrations1": "Vous n'avez pas encore d'intégration. Quand vous en aurez, elles apparaîtront ici.",
- "no-integrations2": "Pour commencer, cliquez sur l'une des options ci-dessous. La configuration se fait en 5 clics.",
- "available": "Intégrations de plate-forme et cloud",
- "available-text1": "Cliquez sur l'intégration que vous souhaitez connecter. Cela permettra à vos variables d'environnement de circuler automatiquement dans les services tiers sélectionnés.",
- "available-text2": "Remarque: Lors d'une intégration avec Heroku, pour des raisons de sécurité, il est impossible de maintenir le chiffrage de bout en bout. En théorie, cela permet à Infisical de déchiffrer les variables d'environnement. En pratique, nous pouvons vous assurer que cela ne sera jamais fait, et cela nous permet de protéger vos secrets des mauvais acteurs en ligne. Le service Infisical de base restera toujours chiffré de bout en bout. Pour toutes vos intérogations, contactez [email protected].",
- "cloud-integrations": "Intégrations Cloud",
- "framework-integrations": "Intégrations Framework",
- "click-to-start": "Cliquez sur une intégration pour commencer à synchroniser les secrets avec elle.",
- "click-to-setup": "Cliquez sur un framework pour obtenir les instructions de configuration.",
- "grant-access-to-secrets": "Accordez un accès Infisical à vos secrets",
- "why-infisical-needs-access": "La plupart des intégrations cloud nécessitent qu'Infisical puisse déchiffrer vos secrets afin qu'ils puissent être transmis.",
- "grant-access-button": "Autoriser l'accès"
-}
diff --git a/frontend/public/locales/fr/login.json b/frontend/public/locales/fr/login.json
deleted file mode 100644
index 8c93da9fbd..0000000000
--- a/frontend/public/locales/fr/login.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "title": "Connexion",
- "og-title": "Connectez-vous à Infisical",
- "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout permettant aux équipes de synchroniser et de gérer leurs fichiers .env.",
- "login": "Se connecter",
- "need-account": "Besoin d'un compte Infisical?",
- "create-account": "Créer un compte",
- "forgot-password": "Mot de passe oublié?",
- "error-login": "Mauvais identifiants."
-}
diff --git a/frontend/public/locales/fr/mfa.json b/frontend/public/locales/fr/mfa.json
deleted file mode 100644
index 60e3201edf..0000000000
--- a/frontend/public/locales/fr/mfa.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "S'inscrire",
- "og-title": "Remplacez les fichiers .env par 1 ligne de code. Inscrivez-vous à Infisical en 3 minutes.",
- "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer des clefs API et des variables d'environnement. Fonctionne avec Node.js, Next.js, Gatsby, Nest.js ...",
- "signup": "S'inscrire",
- "already-have-account": "Déjà inscris? Se connecter",
- "forgot-password": "Mot de passe oublié?",
- "verify": "Vérifier",
- "step1-start": "Bon, on commence!",
- "step1-privacy": "En créant votre compte, vous acceptez nos conditions et avez lu et reconnu notre politique de confidentialité.",
- "step1-submit": "C'est parti",
- "step2-message": "Nous avons envoyé un email de vérification à",
- "step2-code-error": "Oops. Votre code est faux. Essais restants:",
- "step2-resend-alert": "Vous ne voyez pas le code?",
- "step2-resend-submit": "Renvoyer",
- "step2-resend-progress": "Envoie en cours...",
- "step2-spam-alert": "Assurez-vous de vérifier vos spams.",
- "step3-message": "Nous y sommes presque!",
- "step4-message": "Enregistrez votre kit d'urgence",
- "step4-description1": "Si vous n'arrivez plus à vous connecter à votre compte, votre kit d'urgence est le seul moyen d'y arriver.",
- "step4-description2": "Nous vous recommandons de le télécharger et de le garder en sécurité.",
- "step4-description3": "Il contient votre clef secrète que nous ne pouvons pas récupérer pour vous si vous la perdez.",
- "step4-download": "Téléchargez le PDF",
- "step5-send-invites": "Envoyer les invitations",
- "step5-invite-team": "Invitez votre équipe",
- "step5-subtitle": "Infisical a pour but d'être utilisé avec vos coéquipiers. Invitez-les à le tester.",
- "step5-skip": "Passer"
-}
diff --git a/frontend/public/locales/fr/nav.json b/frontend/public/locales/fr/nav.json
deleted file mode 100644
index 1fda27af97..0000000000
--- a/frontend/public/locales/fr/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "[NEW] Rejoignez le forum Slack",
- "docs": "Lire les documentations",
- "issue": "Ouvrir une issue Github",
- "email": "Envoyez-nous un email"
- },
- "user": {
- "signed-in-as": "CONNECTÉ EN TANT QUE",
- "current-organization": "ORGANISATION ACTUELLE",
- "usage-billing": "Utilisation & Facturation",
- "invite": "Inviter des membres",
- "other-organizations": "AUTRE ORGANISATION"
- },
- "menu": {
- "project": "PROJET",
- "secrets": "Secrets",
- "members": "Membres",
- "integrations": "Intégrations",
- "project-settings": "Paramètres du Projet"
- }
-}
diff --git a/frontend/public/locales/fr/section-incident.json b/frontend/public/locales/fr/section-incident.json
deleted file mode 100644
index 95b77ea13a..0000000000
--- a/frontend/public/locales/fr/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "incident-contacts": "Contacts Incidents",
- "incident-contacts-description": "Ces contacts seront informés dans le cas improbable d'un incident grave.",
- "no-incident-contacts": "Aucun contact incident trouvé.",
- "add-contact": "Ajouter un contact",
- "add-dialog": {
- "title": "Ajouter un contact incident",
- "description": "Ce contact sera informé dans le cas improbable d'un incident grave.",
- "add-incident": "Ajouter un contact incident"
- }
-}
diff --git a/frontend/public/locales/fr/section-members.json b/frontend/public/locales/fr/section-members.json
deleted file mode 100644
index 8faed80e76..0000000000
--- a/frontend/public/locales/fr/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "add-member": "Ajouter un Membre",
- "org-members": "Membres de l'organisation",
- "org-members-description": "Gérer les membres de votre organisation. Ces utilisateurs pourraient ensuite être répartis en projets.",
- "search-members": "Recherche des membres...",
- "add-dialog": {
- "add-member-to-project": "Ajoutez un membre à votre projet",
- "already-all-invited": "Tous les utilisateurs de votre organisation sont déjà invités.",
- "add-user-org-first": "Ajoutez d'abord plus d'utilisateurs à l'organisation.",
- "user-will-email": "L'utilisateur recevra un email avec les instructions.",
- "looking-add": "<0>Si vous cherchez à ajouter des utilisateurs à votre organisation,</0><1>cliquez ici</1>",
- "add-user-to-org": "Ajouter des Utilisateurs à l'Organisation"
- }
-}
diff --git a/frontend/public/locales/fr/section-password.json b/frontend/public/locales/fr/section-password.json
deleted file mode 100644
index 0928233e64..0000000000
--- a/frontend/public/locales/fr/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "password": "Mot de passe",
- "change": "Changer le mot de passe",
- "current": "Mot de passe actuel",
- "current-wrong": "Le mot de passe actuel peut être érroné",
- "new": "Nouveau mot de passe",
- "validate-base": "Le mot de passe doit contenir au moins:",
- "validate-length": "14 caractères",
- "validate-case": "1 caractère miniscule",
- "validate-number": "1 chiffre"
-}
diff --git a/frontend/public/locales/fr/section-token.json b/frontend/public/locales/fr/section-token.json
deleted file mode 100644
index 1f2a3b2332..0000000000
--- a/frontend/public/locales/fr/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "service-tokens": "Jetons de service",
- "service-tokens-description": "Chaque jeton de service vous est spécifique, à un certain projet et à un certain environnement dans ce projet.",
- "add-new": "Ajouter un nouveau jeton",
- "add-dialog": {
- "title": "Ajouter un jeton de service pour {{target}}",
- "description": "Spécifiez le nom, l'environnement et la période d'expiration. Lorsqu'un jeton est généré, vous ne pourrez le voir qu'une seule fois avant qu'il ne disparaisse. Assurez-vous de le sauvegarder quelque part.",
- "name": "Nom du jeton de service",
- "add": "Ajouter un jeton de service",
- "copy-service-token": "Copiez votre jeton de service",
- "copy-service-token-description": "Une fois que vous aurez fermé cette fenêtre, vous ne reverrez plus jamais votre jeton de service"
- }
-}
diff --git a/frontend/public/locales/fr/settings-members.json b/frontend/public/locales/fr/settings-members.json
deleted file mode 100644
index 9f34c7a68a..0000000000
--- a/frontend/public/locales/fr/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Membres du projet",
- "description": "Cette page affiche les membres du projet sélectionné."
-}
diff --git a/frontend/public/locales/fr/settings-org.json b/frontend/public/locales/fr/settings-org.json
deleted file mode 100644
index 952bd68c8f..0000000000
--- a/frontend/public/locales/fr/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Paramètres d'Organisation",
- "description": "Gérer les membres de votre organisation. Ces utilisateurs pourraient ensuite être répartis en projets."
-}
diff --git a/frontend/public/locales/fr/settings-personal.json b/frontend/public/locales/fr/settings-personal.json
deleted file mode 100644
index 30a3d6fa3b..0000000000
--- a/frontend/public/locales/fr/settings-personal.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Paramètres Personnels",
- "description": "Consultez et gérez vos informations personnelles ici.",
- "emergency": {
- "name": "Kit d'urgence",
- "text1": "Votre kit d'urgence contient les informations dont vous aurez besoin pour vous connecter à votre compte Infisical.",
- "text2": "Seul le dernier kit d'urgence émis reste valide. Pour obtenir un nouveau kit d'urgence, vérifiez votre mot de passe.",
- "download": "Télécharger le kit d'urgence"
- },
- "change-language": "Changer de langue"
-}
diff --git a/frontend/public/locales/fr/settings-project.json b/frontend/public/locales/fr/settings-project.json
deleted file mode 100644
index a5a3f1ee35..0000000000
--- a/frontend/public/locales/fr/settings-project.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "title": "Paramètres du Projet",
- "description": "Ces paramètres ne s'appliquent qu'au Projet actuellement sélectionné.",
- "danger-zone": "Zone de danger",
- "delete-project": "Supprimer le Projet",
- "project-to-delete": "Projet à Supprimer",
- "danger-zone-note": "Dès que vous supprimez ce projet, vous ne pourrez plus revenir en arrière. Cela supprimera immédiatement toutes les clefs. Si vous voulez toujours le faire, veuillez saisir le nom du projet ci-dessous.",
- "delete-project-note": "Remarque: Vous ne pouvez supprimer qu'un projet que si vous en avez plus d'un.",
- "project-id-description": "Pour intégrer Infisical dans votre base de code et obtenir une injection automatique de variables d'environnement, vous devez utiliser l'ID du projet suivant.",
- "project-id-description2": "Pour plus de conseils, y compris des extraits de code pour diverses langues et frameworks, voir ",
- "auto-generated": "Ceci est l'identifiant unique généré automatiquement pour votre projet. Il ne peut pas être modifié.",
- "docs": "Documentation Infisical"
-}
diff --git a/frontend/public/locales/fr/signup.json b/frontend/public/locales/fr/signup.json
deleted file mode 100644
index 63d869193b..0000000000
--- a/frontend/public/locales/fr/signup.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "S'inscrire",
- "og-title": "Remplacez les fichiers .env par 1 ligne de code. Inscrivez-vous à Infisical en 3 minutes.",
- "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer des clefs API et des variables d'environnement. Fonctionne avec Node.js, Next.js, Gatsby, Nest.js ...",
- "signup": "S'inscrire",
- "already-have-account": "Déjà inscris? Se connecter",
- "forgot-password": "Mot de passe oublié?",
- "verify": "Vérifier",
- "step1-start": "Bon, on commence!",
- "step1-privacy": "En créant votre compte, vous acceptez nos conditions et avez lu et reconnu notre politique de confidentialité.",
- "step1-submit": "C'est parti",
- "step2-message": "Nous avons envoyé un email de vérification à",
- "step2-code-error": "Oops. Votre code est faux. Veuillez réessayer.",
- "step2-resend-alert": "Vous ne voyez pas le code?",
- "step2-resend-submit": "Renvoyer",
- "step2-resend-progress": "Envoie en cours...",
- "step2-spam-alert": "Assurez-vous de vérifier vos spams.",
- "step3-message": "Nous y sommes presque!",
- "step4-message": "Enregistrez votre kit d'urgence",
- "step4-description1": "Si vous n'arrivez plus à vous connecter à votre compte, votre kit d'urgence est le seul moyen d'y arriver.",
- "step4-description2": "Nous vous recommandons de le télécharger et de le garder en sécurité.",
- "step4-description3": "Il contient votre clef secrète que nous ne pouvons pas récupérer pour vous si vous la perdez.",
- "step4-download": "Téléchargez le PDF",
- "step5-send-invites": "Envoyer les invitations",
- "step5-invite-team": "Invitez votre équipe",
- "step5-subtitle": "Infisical a pour but d'être utilisé avec vos coéquipiers. Invitez-les à le tester.",
- "step5-skip": "Passer"
-}
diff --git a/frontend/public/locales/fr/translations.json b/frontend/public/locales/fr/translations.json
new file mode 100644
index 0000000000..6914e7ea18
--- /dev/null
+++ b/frontend/public/locales/fr/translations.json
@@ -0,0 +1,299 @@
+{
+ "activity": {
+ "title": "Journaux d'activité",
+ "subtitle": "Historique des événements pour ce projet Infisical.",
+ "event": {
+ "readSecrets": "Secrets Visualisés",
+ "updateSecrets": "Secrets Mis à jour",
+ "addSecrets": "Secrets Ajoutés",
+ "deleteSecrets": "Secrets Supprimés"
+ },
+ "ip-address": "Adresse IP"
+ },
+ "billing": {
+ "title": "Utilisation et Facturation",
+ "description": "Voir et gérer l'abonnement de votre organisation ici",
+ "subscription": "Abonnement",
+ "starter": {
+ "name": "Starter",
+ "price-explanation": "jusqu'à 5 membres de l'équipe",
+ "text": "Gérez n'importe quel projet jusqu'à 5 membres gratuitement!",
+ "subtext": "$5 par membre / mois par la suite."
+ },
+ "professional": {
+ "name": "Professionnel",
+ "price-explanation": "/membre/mois",
+ "subtext": "Comprend des projets et des membres illimités.",
+ "text": "Suivez la gestion clé à mesure que vous grandissez."
+ },
+ "enterprise": {
+ "name": "Entreprise",
+ "text": "Suivez la gestion clé à mesure que vous grandissez."
+ },
+ "current-usage": "Utilisation actuelle",
+ "free": "Gratuit",
+ "downgrade": "Rétrograder",
+ "upgrade": "Améliorer",
+ "learn-more": "En savoir plus",
+ "custom-pricing": "Prix personnalisés",
+ "schedule-demo": "Planifier une démo"
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "error_project-already-exists": "Un projet avec ce nom existe déjà.",
+ "no-mobile": " Pour utiliser Infisical, veuillez vous connecter avec un appareil avec des dimensions plus grandes. ",
+ "email": "Email",
+ "password": "Mot de passe",
+ "first-name": "Prénom",
+ "last-name": "Nom",
+ "logout": "Déconnexion",
+ "validate-required": "Veuillez saisir votre {{name}}",
+ "maintenance-alert": "Nous rencontrons des difficultés techniques mineures. Nous travaillons sur leurs résolution dès maintenant. Revenez dans quelques minutes.",
+ "click-to-copy": "Cliquez pour copiez",
+ "project-id": "Identifiant du Projet",
+ "save-changes": "Sauvegarder les modifications",
+ "saved": "Enregistrée",
+ "drop-zone": "Glissez et déposez un fichier .env ou .yml ici.",
+ "drop-zone-keys": "Glissez et déposez un fichier .env ou .yml ici pour ajouter plus de clés.",
+ "role": "Rôle",
+ "role_admin": "administrateur",
+ "display-name": "Nom d'affichage",
+ "environment": "Environnement",
+ "expired-in": "Expire dans",
+ "language": "Langue",
+ "search": "Recherche...",
+ "note": "Note",
+ "view-more": "Voir plus",
+ "end-of-history": "Fin de l'historique",
+ "select-event": "Sélectionnez un événement",
+ "event": "Événement",
+ "user": "Utilisateur",
+ "source": "Source",
+ "time": "Heure",
+ "timestamp": "Horodatage"
+ },
+ "dashboard": {
+ "title": "Secrets",
+ "og-title": "Gérez vos fichiers .env rapidement",
+ "og-description": "Infisical une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer leurs fichiers .env.",
+ "search-keys": "Recherche les clefs...",
+ "add-key": "Ajouter une clef",
+ "personal": "Personnel",
+ "personal-description": "Les clés personnelles ne sont visibles que pour vous",
+ "shared": "Partagé",
+ "shared-description": "Les clés partagées sont visibles à toute votre équipe",
+ "make-shared": "Rendre Partagé",
+ "make-personal": "Rendre Personnel",
+ "add-secret": "Ajouter un nouveau secret",
+ "check-docs": {
+ "button": "Vérifier la documentation",
+ "title": "Bon travail!",
+ "line1": "Félicitations pour avoir ajouté plus de secrets.",
+ "line2": "Voici comment les connecter à votre base de code."
+ },
+ "sidebar": {
+ "secret": "Secret",
+ "key": "Clef",
+ "value": "Valeur",
+ "override": "Remplacer la valeur avec une valeur personnelle",
+ "version-history": "Historique des versions",
+ "comments": "Commentaires & Notes",
+ "personal-explanation": "Ce secret est personnel. Il n'est partagé avec aucun de vos coéquipiers.",
+ "generate-random-hex": "Générer un Hex aléatoire",
+ "digits": "chiffres",
+ "delete-key-dialog": {
+ "title": "Supprimer la clef",
+ "confirm-delete-message": "Êtes-vous sûr de vouloir supprimer ce secret? Cela ne peut pas être annulé."
+ }
+ }
+ },
+ "integrations": {
+ "title": "Intégrations de Projet",
+ "description": "Gérez vos intégrations d'Infisical avec des services tiers.",
+ "no-integrations1": "Vous n'avez pas encore d'intégration. Quand vous en aurez, elles apparaîtront ici.",
+ "no-integrations2": "Pour commencer, cliquez sur l'une des options ci-dessous. La configuration se fait en 5 clics.",
+ "available": "Intégrations de plate-forme et cloud",
+ "available-text1": "Cliquez sur l'intégration que vous souhaitez connecter. Cela permettra à vos variables d'environnement de circuler automatiquement dans les services tiers sélectionnés.",
+ "available-text2": "Remarque: Lors d'une intégration avec Heroku, pour des raisons de sécurité, il est impossible de maintenir le chiffrage de bout en bout. En théorie, cela permet à Infisical de déchiffrer les variables d'environnement. En pratique, nous pouvons vous assurer que cela ne sera jamais fait, et cela nous permet de protéger vos secrets des mauvais acteurs en ligne. Le service Infisical de base restera toujours chiffré de bout en bout. Pour toutes vos intérogations, contactez [email protected].",
+ "cloud-integrations": "Intégrations Cloud",
+ "framework-integrations": "Intégrations Framework",
+ "click-to-start": "Cliquez sur une intégration pour commencer à synchroniser les secrets avec elle.",
+ "click-to-setup": "Cliquez sur un framework pour obtenir les instructions de configuration.",
+ "grant-access-to-secrets": "Accordez un accès Infisical à vos secrets",
+ "why-infisical-needs-access": "La plupart des intégrations cloud nécessitent qu'Infisical puisse déchiffrer vos secrets afin qu'ils puissent être transmis.",
+ "grant-access-button": "Autoriser l'accès"
+ },
+ "login": {
+ "title": "Connexion",
+ "og-title": "Connectez-vous à Infisical",
+ "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout permettant aux équipes de synchroniser et de gérer leurs fichiers .env.",
+ "login": "Se connecter",
+ "need-account": "Besoin d'un compte Infisical?",
+ "create-account": "Créer un compte",
+ "forgot-password": "Mot de passe oublié?",
+ "error-login": "Mauvais identifiants."
+ },
+ "mfa": {
+ "title": "S'inscrire",
+ "og-title": "Remplacez les fichiers .env par 1 ligne de code. Inscrivez-vous à Infisical en 3 minutes.",
+ "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer des clefs API et des variables d'environnement. Fonctionne avec Node.js, Next.js, Gatsby, Nest.js ...",
+ "signup": "S'inscrire",
+ "already-have-account": "Déjà inscris? Se connecter",
+ "forgot-password": "Mot de passe oublié?",
+ "verify": "Vérifier",
+ "step1-start": "Bon, on commence!",
+ "step1-privacy": "En créant votre compte, vous acceptez nos conditions et avez lu et reconnu notre politique de confidentialité.",
+ "step1-submit": "C'est parti",
+ "step2-message": "Nous avons envoyé un email de vérification à",
+ "step2-code-error": "Oops. Votre code est faux. Essais restants:",
+ "step2-resend-alert": "Vous ne voyez pas le code?",
+ "step2-resend-submit": "Renvoyer",
+ "step2-resend-progress": "Envoie en cours...",
+ "step2-spam-alert": "Assurez-vous de vérifier vos spams.",
+ "step3-message": "Nous y sommes presque!",
+ "step4-message": "Enregistrez votre kit d'urgence",
+ "step4-description1": "Si vous n'arrivez plus à vous connecter à votre compte, votre kit d'urgence est le seul moyen d'y arriver.",
+ "step4-description2": "Nous vous recommandons de le télécharger et de le garder en sécurité.",
+ "step4-description3": "Il contient votre clef secrète que nous ne pouvons pas récupérer pour vous si vous la perdez.",
+ "step4-download": "Téléchargez le PDF",
+ "step5-send-invites": "Envoyer les invitations",
+ "step5-invite-team": "Invitez votre équipe",
+ "step5-subtitle": "Infisical a pour but d'être utilisé avec vos coéquipiers. Invitez-les à le tester.",
+ "step5-skip": "Passer"
+ },
+ "nav": {
+ "support": {
+ "slack": "[NEW] Rejoignez le forum Slack",
+ "docs": "Lire les documentations",
+ "issue": "Ouvrir une issue Github",
+ "email": "Envoyez-nous un email"
+ },
+ "user": {
+ "signed-in-as": "CONNECTÉ EN TANT QUE",
+ "current-organization": "ORGANISATION ACTUELLE",
+ "usage-billing": "Utilisation & Facturation",
+ "invite": "Inviter des membres",
+ "other-organizations": "AUTRE ORGANISATION"
+ },
+ "menu": {
+ "project": "PROJET",
+ "secrets": "Secrets",
+ "members": "Membres",
+ "integrations": "Intégrations",
+ "project-settings": "Paramètres du Projet"
+ }
+ },
+ "section": {
+ "incident": {
+ "incident-contacts": "Contacts Incidents",
+ "incident-contacts-description": "Ces contacts seront informés dans le cas improbable d'un incident grave.",
+ "no-incident-contacts": "Aucun contact incident trouvé.",
+ "add-contact": "Ajouter un contact",
+ "add-dialog": {
+ "title": "Ajouter un contact incident",
+ "description": "Ce contact sera informé dans le cas improbable d'un incident grave.",
+ "add-incident": "Ajouter un contact incident"
+ }
+ },
+ "members": {
+ "add-member": "Ajouter un Membre",
+ "org-members": "Membres de l'organisation",
+ "org-members-description": "Gérer les membres de votre organisation. Ces utilisateurs pourraient ensuite être répartis en projets.",
+ "search-members": "Recherche des membres...",
+ "add-dialog": {
+ "add-member-to-project": "Ajoutez un membre à votre projet",
+ "already-all-invited": "Tous les utilisateurs de votre organisation sont déjà invités.",
+ "add-user-org-first": "Ajoutez d'abord plus d'utilisateurs à l'organisation.",
+ "user-will-email": "L'utilisateur recevra un email avec les instructions.",
+ "looking-add": "<0>Si vous cherchez à ajouter des utilisateurs à votre organisation,</0><1>cliquez ici</1>",
+ "add-user-to-org": "Ajouter des Utilisateurs à l'Organisation"
+ }
+ },
+ "password": {
+ "password": "Mot de passe",
+ "change": "Changer le mot de passe",
+ "current": "Mot de passe actuel",
+ "current-wrong": "Le mot de passe actuel peut être érroné",
+ "new": "Nouveau mot de passe",
+ "validate-base": "Le mot de passe doit contenir au moins:",
+ "validate-length": "14 caractères",
+ "validate-case": "1 caractère miniscule",
+ "validate-number": "1 chiffre"
+ },
+ "token": {
+ "service-tokens": "Jetons de service",
+ "service-tokens-description": "Chaque jeton de service vous est spécifique, à un certain projet et à un certain environnement dans ce projet.",
+ "add-new": "Ajouter un nouveau jeton",
+ "add-dialog": {
+ "title": "Ajouter un jeton de service pour {{target}}",
+ "description": "Spécifiez le nom, l'environnement et la période d'expiration. Lorsqu'un jeton est généré, vous ne pourrez le voir qu'une seule fois avant qu'il ne disparaisse. Assurez-vous de le sauvegarder quelque part.",
+ "name": "Nom du jeton de service",
+ "add": "Ajouter un jeton de service",
+ "copy-service-token": "Copiez votre jeton de service",
+ "copy-service-token-description": "Une fois que vous aurez fermé cette fenêtre, vous ne reverrez plus jamais votre jeton de service"
+ }
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "Membres du projet",
+ "description": "Cette page affiche les membres du projet sélectionné."
+ },
+ "org": {
+ "title": "Paramètres d'Organisation",
+ "description": "Gérer les membres de votre organisation. Ces utilisateurs pourraient ensuite être répartis en projets."
+ },
+ "personal": {
+ "title": "Paramètres Personnels",
+ "description": "Consultez et gérez vos informations personnelles ici.",
+ "emergency": {
+ "name": "Kit d'urgence",
+ "text1": "Votre kit d'urgence contient les informations dont vous aurez besoin pour vous connecter à votre compte Infisical.",
+ "text2": "Seul le dernier kit d'urgence émis reste valide. Pour obtenir un nouveau kit d'urgence, vérifiez votre mot de passe.",
+ "download": "Télécharger le kit d'urgence"
+ },
+ "change-language": "Changer de langue"
+ },
+ "project": {
+ "title": "Paramètres du Projet",
+ "description": "Ces paramètres ne s'appliquent qu'au Projet actuellement sélectionné.",
+ "danger-zone": "Zone de danger",
+ "delete-project": "Supprimer le Projet",
+ "project-to-delete": "Projet à Supprimer",
+ "danger-zone-note": "Dès que vous supprimez ce projet, vous ne pourrez plus revenir en arrière. Cela supprimera immédiatement toutes les clefs. Si vous voulez toujours le faire, veuillez saisir le nom du projet ci-dessous.",
+ "delete-project-note": "Remarque: Vous ne pouvez supprimer qu'un projet que si vous en avez plus d'un.",
+ "project-id-description": "Pour intégrer Infisical dans votre base de code et obtenir une injection automatique de variables d'environnement, vous devez utiliser l'ID du projet suivant.",
+ "project-id-description2": "Pour plus de conseils, y compris des extraits de code pour diverses langues et frameworks, voir ",
+ "auto-generated": "Ceci est l'identifiant unique généré automatiquement pour votre projet. Il ne peut pas être modifié.",
+ "docs": "Documentation Infisical"
+ }
+ },
+ "signup": {
+ "title": "S'inscrire",
+ "og-title": "Remplacez les fichiers .env par 1 ligne de code. Inscrivez-vous à Infisical en 3 minutes.",
+ "og-description": "Infisical, une plate-forme simple et chiffré de bout en bout qui permet aux équipes de synchroniser et de gérer des clefs API et des variables d'environnement. Fonctionne avec Node.js, Next.js, Gatsby, Nest.js ...",
+ "signup": "S'inscrire",
+ "already-have-account": "Déjà inscris? Se connecter",
+ "forgot-password": "Mot de passe oublié?",
+ "verify": "Vérifier",
+ "step1-start": "Bon, on commence!",
+ "step1-privacy": "En créant votre compte, vous acceptez nos conditions et avez lu et reconnu notre politique de confidentialité.",
+ "step1-submit": "C'est parti",
+ "step2-message": "Nous avons envoyé un email de vérification à",
+ "step2-code-error": "Oops. Votre code est faux. Veuillez réessayer.",
+ "step2-resend-alert": "Vous ne voyez pas le code?",
+ "step2-resend-submit": "Renvoyer",
+ "step2-resend-progress": "Envoie en cours...",
+ "step2-spam-alert": "Assurez-vous de vérifier vos spams.",
+ "step3-message": "Nous y sommes presque!",
+ "step4-message": "Enregistrez votre kit d'urgence",
+ "step4-description1": "Si vous n'arrivez plus à vous connecter à votre compte, votre kit d'urgence est le seul moyen d'y arriver.",
+ "step4-description2": "Nous vous recommandons de le télécharger et de le garder en sécurité.",
+ "step4-description3": "Il contient votre clef secrète que nous ne pouvons pas récupérer pour vous si vous la perdez.",
+ "step4-download": "Téléchargez le PDF",
+ "step5-send-invites": "Envoyer les invitations",
+ "step5-invite-team": "Invitez votre équipe",
+ "step5-subtitle": "Infisical a pour but d'être utilisé avec vos coéquipiers. Invitez-les à le tester.",
+ "step5-skip": "Passer"
+ }
+}
\ No newline at end of file
diff --git a/frontend/public/locales/ko/billing.json b/frontend/public/locales/ko/billing.json
deleted file mode 100644
index 788afa8e4d..0000000000
--- a/frontend/public/locales/ko/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "요금제 & 결제",
- "description": "이곳에서 조직의 구독을 확인하고 관리할 수 있어요.",
- "subscription": "구독",
- "starter": {
- "name": "스타터",
- "price-explanation": "5명의 팀 맴버까지",
- "text": "어떤 프로젝트든 다섯명의 맴버까지 무료로 이용할 수 있어요!",
- "subtext": "$5명/달 로 바뀔 예정입니다."
- },
- "professional": {
- "name": "전문가",
- "price-explanation": "/맴버/달",
- "subtext": "무제한의 프로젝트와 맴버",
- "text": "조직의 성장에 따라 유연하게 시크릿을 관리하세요."
- },
- "enterprise": {
- "name": "엔터프라이즈",
- "text": "조직의 성장에 따라 유연하게 시크릿을 관리하세요."
- },
- "current-usage": "현재 요금제",
- "free": "무료",
- "downgrade": "다운그레이드",
- "upgrade": "업그레이드",
- "learn-more": "자세히 알아보기",
- "custom-pricing": "커스텀 가격",
- "schedule-demo": "데모 예약하기"
-}
diff --git a/frontend/public/locales/ko/common.json b/frontend/public/locales/ko/common.json
deleted file mode 100644
index f0692ebf70..0000000000
--- a/frontend/public/locales/ko/common.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "error_project-already-exists": "동일한 이름을 가진 프로젝트가 이미 존재해요.",
- "no-mobile": " Infisical을 사용하려면, 큰 화면을 가진 디바이스로 로그인하여 주세요.",
- "email": "메일",
- "password": "비밀번호",
- "first-name": "이름",
- "last-name": "성",
- "logout": "로그아웃",
- "validate-required": "{{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": "클릭하여 복사하기",
- "project-id": "프로젝트 ID",
- "save-changes": "변경사항 저장하기",
- "saved": "저장됨",
- "drop-zone": ".env 파일을 이곳에 드래그 & 드롭 하세요.",
- "drop-zone-keys": "이곳에 .env 파일을 드래그 & 드롭 하여 더 많은 키들을 추가하세요.",
- "role": "Role",
- "role_admin": "admin",
- "display-name": "표시 이름",
- "environment": "환경",
- "expired-in": "만료 기한:",
- "language": "언어",
- "search": "검색하기...",
- "note": "Note"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/ko/dashboard.json b/frontend/public/locales/ko/dashboard.json
deleted file mode 100644
index 73fcf155b8..0000000000
--- a/frontend/public/locales/ko/dashboard.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "title": "시크릿",
- "og-title": "빠르게 .env 파일을 관리하세요",
- "og-description": "Infisical은 팀원과 .env파일을 공유할 수 있는 심플한 end-to-end 암호화 플렛폼입니다.",
- "search-keys": "키 검색하기...",
- "add-key": "키 추가하기",
- "personal": "개인",
- "personal-description": "개인 키는 오직 본인만 볼 수 있어요",
- "shared": "공유",
- "shared-description": "공유 키는 팀 전체가 볼 수 있어요",
- "make-shared": "공유로 만들기",
- "make-personal": "개인으로 만들기",
- "check-docs": {
- "button": "문서 확인하기",
- "title": "좋았어요!",
- "line1": "더 많은 시크릿들을 추가한 것을 축하합니다.",
- "line2": "코드와 연결하는 사용하는 방법을 한번 알아보지 않을래요?"
- },
- "sidebar": {
- "secret": "Secret",
- "key": "Key",
- "value": "Value",
- "override": "Override value with a personal value",
- "version-history": "Version History",
- "comments": "Comments & Notes",
- "personal-explanation": "This secret is personal. It is not shared with any of your teammates.",
- "generate-random-hex": "Generate Random Hex",
- "digits": "digits"
- }
-}
diff --git a/frontend/public/locales/ko/integrations.json b/frontend/public/locales/ko/integrations.json
deleted file mode 100644
index 7431831ae3..0000000000
--- a/frontend/public/locales/ko/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "available": "사용 가능한 연동",
- "available-text1": "연결하고 싶은 서비스를 클릭하세요. 환경 변수가 선택한 외부 서비스와 자동으로 연동됩니다.",
- "available-text2": "참고: Heroku와의 연동에서는 보안상의 이유로 End-To-End 암호화를 유지하는 것이 불가능합니다. 이론적으로는 Infisical이 시크릿을 읽는것이 가능하지만, 절대 그러지 않는다고 확신할 수 있습니다. 핵심 Infisical 서비스는 항상 End-To-End 암호화 상태를 유지합니다. 질문이 있으면 [email protected]으로 문의하세요.",
- "description": "외부 서비스와 함께 Infisical을 연동하고 관리하세요",
- "no-integrations1": "연동된 서비스가 없어요. 연동하게 된다면 이곳에서 표시돼요.",
- "no-integrations2": "시작하려면, 아래의 옵션을 클릭하세요. 대체로 5분 이내로 가능해요.",
- "title": "프로젝트 연동",
- "cloud-integrations": "Cloud Integrations",
- "framework-integrations": "Framework Integrations",
- "click-to-start": "Click on an integration to begin syncing secrets to it.",
- "click-to-setup": "Click on a framework to get the setup instructions.",
- "grant-access-to-secrets": "Grant Infisical access to your secrets",
- "why-infisical-needs-access": "Most cloud integrations require Infisical to be able to decrypt your secrets so they can be forwarded over.",
- "grant-access-button": "Grant access"
-}
diff --git a/frontend/public/locales/ko/login.json b/frontend/public/locales/ko/login.json
deleted file mode 100644
index 70a77d69f0..0000000000
--- a/frontend/public/locales/ko/login.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "title": "로그인",
- "og-title": "Infisical에 로그인하기",
- "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
- "login": "로그인",
- "need-account": "Infisical계정이 필요하신가요?",
- "create-account": "회원가입 하기"
-}
diff --git a/frontend/public/locales/ko/mfa.json b/frontend/public/locales/ko/mfa.json
deleted file mode 100644
index 6c17a68cfd..0000000000
--- a/frontend/public/locales/ko/mfa.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "title": "회원가입",
- "og-title": "한줄의 코드르 .env파일을 교체하세요. 3분이면 가입할 수 있어요.",
- "og-description": "Infisical은 팀원과 .env파일을 공유하고 연동할 수 있는 심플한 end-to-end 암호화 플렛폼입니다. Node.js, Next.js, Gatsby, Nest.js 와 같은 다양한 플렛폼에서 작동해요.",
- "signup": "회원가입",
- "already-have-account": "이미 계정이 있나요? 로그인하기",
- "forgot-password": "비밀번호를 잊으셨나요?",
- "verify": "인증",
- "step1-start": "시작하기",
- "step1-privacy": "회원가입시 약관과 개인 정보 보호 정책을 읽고 동의한 것으로 간주합니다.",
- "step1-submit": "시작하기",
- "step2-message": "<email>{{email}}</email><wrapper>로 인증 메일을 전송하였습니다</wrapper><email>{{email}}</email>",
- "step2-code-error": "코드가 잘못된 것 같아요. 남은 시도:",
- "step2-spam-alert": "스팸함에 메일이 있지는 않은지 확인하세요",
- "step3-message": "거의다 끝났어요!",
- "step4-message": "긴급복구 키트 저장하기",
- "step4-description1": "계정이 잠겼을 경우 비상 키트를 사용하여 로그인할 수 있어요.",
- "step4-description2": "다운로드 후 안전한 곳에 보관하는 것을 추천합니다.",
- "step4-description3": "분실시 접근하거나 복구할 수 없는 시크릿 키가 포함되어 있어요.",
- "step4-download": "PDF 다운로드"
-}
diff --git a/frontend/public/locales/ko/nav.json b/frontend/public/locales/ko/nav.json
deleted file mode 100644
index b07510ff43..0000000000
--- a/frontend/public/locales/ko/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "[NEW] 슬랙 포럼에 가입하기",
- "docs": "문서 보기",
- "issue": "깃허브 이슈 열기",
- "email": "Infisical팀에게 메일 보내기"
- },
- "user": {
- "signed-in-as": "다음으로 로그인됨",
- "current-organization": "현재 조직",
- "usage-billing": "요금제 & 결제",
- "invite": "맴버 초대하기",
- "other-organizations": "다른 조직"
- },
- "menu": {
- "project": "프로젝트",
- "secrets": "시크릿",
- "members": "맴버",
- "integrations": "연동",
- "project-settings": "프로젝트 설정"
- }
-}
diff --git a/frontend/public/locales/ko/section-incident.json b/frontend/public/locales/ko/section-incident.json
deleted file mode 100644
index cbafc5ecb3..0000000000
--- a/frontend/public/locales/ko/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "add-contact": "연락처 추가하기",
- "add-dialog": {
- "add-incident": "비상 연락처 추가하기",
- "description": "중대한 일이 생길 경우, 이 연락처로 알림이 전송됩니다.",
- "title": "비상 연락처 추가하기"
- },
- "incident-contacts": "비상 연락망",
- "incident-contacts-description": "중대한 일이 생길 경우, 아래의 연락처로 알림이 전송됩니다.",
- "no-incident-contacts": "비상 연락망이 존재하지 않아요."
-}
diff --git a/frontend/public/locales/ko/section-members.json b/frontend/public/locales/ko/section-members.json
deleted file mode 100644
index 848574aff7..0000000000
--- a/frontend/public/locales/ko/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "add-member": "맴버 추가하기",
- "org-members": "조직 맴버",
- "search-members": "맴버를 검색하기...",
- "add-dialog": {
- "add-member-to-project": "프로젝트에 맴버 추가하기",
- "already-all-invited": "조직의 모든 유저가 이미 초대되었습니다.",
- "add-user-org-first": "유저를 먼저 조직에 추가해 주세요.",
- "user-will-email": "유저는 안내가 포함된 메일을 받게 됩니다.",
- "looking-add": "<0>조직에 유저를 추가하고 싶다면,</0><1>여기를 클릭하세요</1>",
- "add-user-to-org": "조직에 유저 추가하기"
- },
- "org-members-description": "조직의 맴버들을 관리하세요."
-}
diff --git a/frontend/public/locales/ko/section-password.json b/frontend/public/locales/ko/section-password.json
deleted file mode 100644
index e7c6a6b74f..0000000000
--- a/frontend/public/locales/ko/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "password": "비밀번호",
- "change": "비밀번호 변경",
- "current": "현재 비밀번호",
- "new": "새 비밀번호",
- "current-wrong": "현재 비밀번호가 잘못되었어요",
- "validate-base": "비밀번호는 다음 조건을 만족해야 합니다:",
- "validate-length": "14 글자 이상",
- "validate-case": "1개 이상의 소문자",
- "validate-number": "1개 이상의 숫자"
-}
diff --git a/frontend/public/locales/ko/section-token.json b/frontend/public/locales/ko/section-token.json
deleted file mode 100644
index 936c6066c3..0000000000
--- a/frontend/public/locales/ko/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "add-dialog": {
- "add": "서비스 토큰 추가하기",
- "copy-service-token": "서비스 토큰 복사하기",
- "copy-service-token-description": "팝업을 닫을 시 다시는 토큰을 확인할 수 없어요.",
- "description": "이름, 환경, 만료일을 지정하세요. 토큰이 생성되면 최초 한번만 볼 수 있어요. 안전한 곳에 저장하세요.",
- "name": "서비스 토큰 이름",
- "title": "{{target}}의 토큰 추가하기"
- },
- "add-new": "새 토큰 추가하기",
- "service-tokens": "서비스 토큰",
- "service-tokens-description": "모든 서비스 토큰은 프로젝트 및 환경에 따라 다릅니다."
-}
diff --git a/frontend/public/locales/ko/settings-members.json b/frontend/public/locales/ko/settings-members.json
deleted file mode 100644
index 5954b2bb5a..0000000000
--- a/frontend/public/locales/ko/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "맴버 설정",
- "description": "선택한 프로젝트의 맴버를 확인하세요."
-}
diff --git a/frontend/public/locales/ko/settings-org.json b/frontend/public/locales/ko/settings-org.json
deleted file mode 100644
index 64b5e5e3e9..0000000000
--- a/frontend/public/locales/ko/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "조직 설정",
- "description": "조직의 맴버를 관리하세요."
-}
diff --git a/frontend/public/locales/ko/settings-personal.json b/frontend/public/locales/ko/settings-personal.json
deleted file mode 100644
index 2234272e41..0000000000
--- a/frontend/public/locales/ko/settings-personal.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "개인 설정",
- "description": "계정 및 기본적인 설정을 확인하고 변경하세요.",
- "emergency": {
- "name": "긴급복구 키트",
- "text1": "긴급복구 키트는 Infisical계정에 로그인 할 수 있는 정보를 가지고 있어요.",
- "text2": "오직 마지막으로 발급한 긴급복구 키트만 사용 가능해요. 새로운 긴급복구 키트를 받으려면, 비밀번호를 입력하세요.",
- "download": "긴급복구 키트 다운로드"
- },
- "change-language": "언어 변경하기"
-}
diff --git a/frontend/public/locales/ko/settings-project.json b/frontend/public/locales/ko/settings-project.json
deleted file mode 100644
index 8dca5941cc..0000000000
--- a/frontend/public/locales/ko/settings-project.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "title": "프로젝트 설정",
- "description": "현재 선택한 프로젝트에 대해서 설정해요.",
- "auto-generated": "자동으로 생성된 고유한 키 입니다. 변경할 수 없어요.",
- "danger-zone": "위험존",
- "danger-zone-note": "프로젝트를 삭제한다면 모든 키가 즉시 삭제되며 다시는 되돌릴 수 없어요. 삭제를 원한다면 프로젝트 이름을 아래에 적어주세요.",
- "delete-project": "프로젝트 삭제",
- "delete-project-note": "노트: 최소 한개 이상의 프로젝트는 조직에 존재해야 해요.",
- "docs": "Infisical 문서",
- "project-id-description": "다른 코드에서 Infisical과 환경변수를 연동하기 위해서는 프로젝트 ID가 필요해요.",
- "project-id-description2": "다양한 언어 및 프레임워크에 대한 가이드를 확인하고 싶다면, 다음을 확인하세요. ",
- "project-to-delete": "삭제할 프로젝트"
-}
diff --git a/frontend/public/locales/ko/signup.json b/frontend/public/locales/ko/signup.json
deleted file mode 100644
index 3b45769632..0000000000
--- a/frontend/public/locales/ko/signup.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "title": "회원가입",
- "og-title": "한줄의 코드르 .env파일을 교체하세요. 3분이면 가입할 수 있어요.",
- "og-description": "Infisical은 팀원과 .env파일을 공유하고 연동할 수 있는 심플한 end-to-end 암호화 플렛폼입니다. Node.js, Next.js, Gatsby, Nest.js 와 같은 다양한 플렛폼에서 작동해요.",
- "signup": "회원가입",
- "already-have-account": "이미 계정이 있나요? 로그인하기",
- "forgot-password": "비밀번호를 잊으셨나요?",
- "verify": "인증",
- "step1-start": "시작하기",
- "step1-privacy": "회원가입시 약관과 개인 정보 보호 정책을 읽고 동의한 것으로 간주합니다.",
- "step1-submit": "시작하기",
- "step2-message": "<email>{{email}}</email><wrapper>로 인증 메일을 전송하였습니다</wrapper><email>{{email}}</email>",
- "step2-code-error": "코드가 잘못된 것 같아요. 다시 시도해주세요.",
- "step2-spam-alert": "스팸함에 메일이 있지는 않은지 확인하세요",
- "step3-message": "거의다 끝났어요!",
- "step4-message": "긴급복구 키트 저장하기",
- "step4-description1": "계정이 잠겼을 경우 비상 키트를 사용하여 로그인할 수 있어요.",
- "step4-description2": "다운로드 후 안전한 곳에 보관하는 것을 추천합니다.",
- "step4-description3": "분실시 접근하거나 복구할 수 없는 시크릿 키가 포함되어 있어요.",
- "step4-download": "PDF 다운로드"
-}
diff --git a/frontend/public/locales/ko/translations.json b/frontend/public/locales/ko/translations.json
new file mode 100644
index 0000000000..eea81f37e0
--- /dev/null
+++ b/frontend/public/locales/ko/translations.json
@@ -0,0 +1,259 @@
+{
+ "billing": {
+ "title": "요금제 & 결제",
+ "description": "이곳에서 조직의 구독을 확인하고 관리할 수 있어요.",
+ "subscription": "구독",
+ "starter": {
+ "name": "스타터",
+ "price-explanation": "5명의 팀 맴버까지",
+ "text": "어떤 프로젝트든 다섯명의 맴버까지 무료로 이용할 수 있어요!",
+ "subtext": "$5명/달 로 바뀔 예정입니다."
+ },
+ "professional": {
+ "name": "전문가",
+ "price-explanation": "/맴버/달",
+ "subtext": "무제한의 프로젝트와 맴버",
+ "text": "조직의 성장에 따라 유연하게 시크릿을 관리하세요."
+ },
+ "enterprise": {
+ "name": "엔터프라이즈",
+ "text": "조직의 성장에 따라 유연하게 시크릿을 관리하세요."
+ },
+ "current-usage": "현재 요금제",
+ "free": "무료",
+ "downgrade": "다운그레이드",
+ "upgrade": "업그레이드",
+ "learn-more": "자세히 알아보기",
+ "custom-pricing": "커스텀 가격",
+ "schedule-demo": "데모 예약하기"
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "error_project-already-exists": "동일한 이름을 가진 프로젝트가 이미 존재해요.",
+ "no-mobile": " Infisical을 사용하려면, 큰 화면을 가진 디바이스로 로그인하여 주세요.",
+ "email": "메일",
+ "password": "비밀번호",
+ "first-name": "이름",
+ "last-name": "성",
+ "logout": "로그아웃",
+ "validate-required": "{{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": "클릭하여 복사하기",
+ "project-id": "프로젝트 ID",
+ "save-changes": "변경사항 저장하기",
+ "saved": "저장됨",
+ "drop-zone": ".env 파일을 이곳에 드래그 & 드롭 하세요.",
+ "drop-zone-keys": "이곳에 .env 파일을 드래그 & 드롭 하여 더 많은 키들을 추가하세요.",
+ "role": "Role",
+ "role_admin": "admin",
+ "display-name": "표시 이름",
+ "environment": "환경",
+ "expired-in": "만료 기한:",
+ "language": "언어",
+ "search": "검색하기...",
+ "note": "Note"
+ },
+ "dashboard": {
+ "title": "시크릿",
+ "og-title": "빠르게 .env 파일을 관리하세요",
+ "og-description": "Infisical은 팀원과 .env파일을 공유할 수 있는 심플한 end-to-end 암호화 플렛폼입니다.",
+ "search-keys": "키 검색하기...",
+ "add-key": "키 추가하기",
+ "personal": "개인",
+ "personal-description": "개인 키는 오직 본인만 볼 수 있어요",
+ "shared": "공유",
+ "shared-description": "공유 키는 팀 전체가 볼 수 있어요",
+ "make-shared": "공유로 만들기",
+ "make-personal": "개인으로 만들기",
+ "check-docs": {
+ "button": "문서 확인하기",
+ "title": "좋았어요!",
+ "line1": "더 많은 시크릿들을 추가한 것을 축하합니다.",
+ "line2": "코드와 연결하는 사용하는 방법을 한번 알아보지 않을래요?"
+ },
+ "sidebar": {
+ "secret": "Secret",
+ "key": "Key",
+ "value": "Value",
+ "override": "Override value with a personal value",
+ "version-history": "Version History",
+ "comments": "Comments & Notes",
+ "personal-explanation": "This secret is personal. It is not shared with any of your teammates.",
+ "generate-random-hex": "Generate Random Hex",
+ "digits": "digits"
+ }
+ },
+ "integrations": {
+ "available": "사용 가능한 연동",
+ "available-text1": "연결하고 싶은 서비스를 클릭하세요. 환경 변수가 선택한 외부 서비스와 자동으로 연동됩니다.",
+ "available-text2": "참고: Heroku와의 연동에서는 보안상의 이유로 End-To-End 암호화를 유지하는 것이 불가능합니다. 이론적으로는 Infisical이 시크릿을 읽는것이 가능하지만, 절대 그러지 않는다고 확신할 수 있습니다. 핵심 Infisical 서비스는 항상 End-To-End 암호화 상태를 유지합니다. 질문이 있으면 [email protected]으로 문의하세요.",
+ "description": "외부 서비스와 함께 Infisical을 연동하고 관리하세요",
+ "no-integrations1": "연동된 서비스가 없어요. 연동하게 된다면 이곳에서 표시돼요.",
+ "no-integrations2": "시작하려면, 아래의 옵션을 클릭하세요. 대체로 5분 이내로 가능해요.",
+ "title": "프로젝트 연동",
+ "cloud-integrations": "Cloud Integrations",
+ "framework-integrations": "Framework Integrations",
+ "click-to-start": "Click on an integration to begin syncing secrets to it.",
+ "click-to-setup": "Click on a framework to get the setup instructions.",
+ "grant-access-to-secrets": "Grant Infisical access to your secrets",
+ "why-infisical-needs-access": "Most cloud integrations require Infisical to be able to decrypt your secrets so they can be forwarded over.",
+ "grant-access-button": "Grant access"
+ },
+ "login": {
+ "title": "로그인",
+ "og-title": "Infisical에 로그인하기",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files.",
+ "login": "로그인",
+ "need-account": "Infisical계정이 필요하신가요?",
+ "create-account": "회원가입 하기"
+ },
+ "mfa": {
+ "title": "회원가입",
+ "og-title": "한줄의 코드르 .env파일을 교체하세요. 3분이면 가입할 수 있어요.",
+ "og-description": "Infisical은 팀원과 .env파일을 공유하고 연동할 수 있는 심플한 end-to-end 암호화 플렛폼입니다. Node.js, Next.js, Gatsby, Nest.js 와 같은 다양한 플렛폼에서 작동해요.",
+ "signup": "회원가입",
+ "already-have-account": "이미 계정이 있나요? 로그인하기",
+ "forgot-password": "비밀번호를 잊으셨나요?",
+ "verify": "인증",
+ "step1-start": "시작하기",
+ "step1-privacy": "회원가입시 약관과 개인 정보 보호 정책을 읽고 동의한 것으로 간주합니다.",
+ "step1-submit": "시작하기",
+ "step2-message": "<email>{{email}}</email><wrapper>로 인증 메일을 전송하였습니다</wrapper><email>{{email}}</email>",
+ "step2-code-error": "코드가 잘못된 것 같아요. 남은 시도:",
+ "step2-spam-alert": "스팸함에 메일이 있지는 않은지 확인하세요",
+ "step3-message": "거의다 끝났어요!",
+ "step4-message": "긴급복구 키트 저장하기",
+ "step4-description1": "계정이 잠겼을 경우 비상 키트를 사용하여 로그인할 수 있어요.",
+ "step4-description2": "다운로드 후 안전한 곳에 보관하는 것을 추천합니다.",
+ "step4-description3": "분실시 접근하거나 복구할 수 없는 시크릿 키가 포함되어 있어요.",
+ "step4-download": "PDF 다운로드"
+ },
+ "nav": {
+ "support": {
+ "slack": "[NEW] 슬랙 포럼에 가입하기",
+ "docs": "문서 보기",
+ "issue": "깃허브 이슈 열기",
+ "email": "Infisical팀에게 메일 보내기"
+ },
+ "user": {
+ "signed-in-as": "다음으로 로그인됨",
+ "current-organization": "현재 조직",
+ "usage-billing": "요금제 & 결제",
+ "invite": "맴버 초대하기",
+ "other-organizations": "다른 조직"
+ },
+ "menu": {
+ "project": "프로젝트",
+ "secrets": "시크릿",
+ "members": "맴버",
+ "integrations": "연동",
+ "project-settings": "프로젝트 설정"
+ }
+ },
+ "section": {
+ "incident": {
+ "add-contact": "연락처 추가하기",
+ "add-dialog": {
+ "add-incident": "비상 연락처 추가하기",
+ "description": "중대한 일이 생길 경우, 이 연락처로 알림이 전송됩니다.",
+ "title": "비상 연락처 추가하기"
+ },
+ "incident-contacts": "비상 연락망",
+ "incident-contacts-description": "중대한 일이 생길 경우, 아래의 연락처로 알림이 전송됩니다.",
+ "no-incident-contacts": "비상 연락망이 존재하지 않아요."
+ },
+ "members": {
+ "add-member": "맴버 추가하기",
+ "org-members": "조직 맴버",
+ "search-members": "맴버를 검색하기...",
+ "add-dialog": {
+ "add-member-to-project": "프로젝트에 맴버 추가하기",
+ "already-all-invited": "조직의 모든 유저가 이미 초대되었습니다.",
+ "add-user-org-first": "유저를 먼저 조직에 추가해 주세요.",
+ "user-will-email": "유저는 안내가 포함된 메일을 받게 됩니다.",
+ "looking-add": "<0>조직에 유저를 추가하고 싶다면,</0><1>여기를 클릭하세요</1>",
+ "add-user-to-org": "조직에 유저 추가하기"
+ },
+ "org-members-description": "조직의 맴버들을 관리하세요."
+ },
+ "password": {
+ "password": "비밀번호",
+ "change": "비밀번호 변경",
+ "current": "현재 비밀번호",
+ "new": "새 비밀번호",
+ "current-wrong": "현재 비밀번호가 잘못되었어요",
+ "validate-base": "비밀번호는 다음 조건을 만족해야 합니다:",
+ "validate-length": "14 글자 이상",
+ "validate-case": "1개 이상의 소문자",
+ "validate-number": "1개 이상의 숫자"
+ },
+ "token": {
+ "add-dialog": {
+ "add": "서비스 토큰 추가하기",
+ "copy-service-token": "서비스 토큰 복사하기",
+ "copy-service-token-description": "팝업을 닫을 시 다시는 토큰을 확인할 수 없어요.",
+ "description": "이름, 환경, 만료일을 지정하세요. 토큰이 생성되면 최초 한번만 볼 수 있어요. 안전한 곳에 저장하세요.",
+ "name": "서비스 토큰 이름",
+ "title": "{{target}}의 토큰 추가하기"
+ },
+ "add-new": "새 토큰 추가하기",
+ "service-tokens": "서비스 토큰",
+ "service-tokens-description": "모든 서비스 토큰은 프로젝트 및 환경에 따라 다릅니다."
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "맴버 설정",
+ "description": "선택한 프로젝트의 맴버를 확인하세요."
+ },
+ "org": {
+ "title": "조직 설정",
+ "description": "조직의 맴버를 관리하세요."
+ },
+ "personal": {
+ "title": "개인 설정",
+ "description": "계정 및 기본적인 설정을 확인하고 변경하세요.",
+ "emergency": {
+ "name": "긴급복구 키트",
+ "text1": "긴급복구 키트는 Infisical계정에 로그인 할 수 있는 정보를 가지고 있어요.",
+ "text2": "오직 마지막으로 발급한 긴급복구 키트만 사용 가능해요. 새로운 긴급복구 키트를 받으려면, 비밀번호를 입력하세요.",
+ "download": "긴급복구 키트 다운로드"
+ },
+ "change-language": "언어 변경하기"
+ },
+ "project": {
+ "title": "프로젝트 설정",
+ "description": "현재 선택한 프로젝트에 대해서 설정해요.",
+ "auto-generated": "자동으로 생성된 고유한 키 입니다. 변경할 수 없어요.",
+ "danger-zone": "위험존",
+ "danger-zone-note": "프로젝트를 삭제한다면 모든 키가 즉시 삭제되며 다시는 되돌릴 수 없어요. 삭제를 원한다면 프로젝트 이름을 아래에 적어주세요.",
+ "delete-project": "프로젝트 삭제",
+ "delete-project-note": "노트: 최소 한개 이상의 프로젝트는 조직에 존재해야 해요.",
+ "docs": "Infisical 문서",
+ "project-id-description": "다른 코드에서 Infisical과 환경변수를 연동하기 위해서는 프로젝트 ID가 필요해요.",
+ "project-id-description2": "다양한 언어 및 프레임워크에 대한 가이드를 확인하고 싶다면, 다음을 확인하세요. ",
+ "project-to-delete": "삭제할 프로젝트"
+ }
+ },
+ "signup": {
+ "title": "회원가입",
+ "og-title": "한줄의 코드르 .env파일을 교체하세요. 3분이면 가입할 수 있어요.",
+ "og-description": "Infisical은 팀원과 .env파일을 공유하고 연동할 수 있는 심플한 end-to-end 암호화 플렛폼입니다. Node.js, Next.js, Gatsby, Nest.js 와 같은 다양한 플렛폼에서 작동해요.",
+ "signup": "회원가입",
+ "already-have-account": "이미 계정이 있나요? 로그인하기",
+ "forgot-password": "비밀번호를 잊으셨나요?",
+ "verify": "인증",
+ "step1-start": "시작하기",
+ "step1-privacy": "회원가입시 약관과 개인 정보 보호 정책을 읽고 동의한 것으로 간주합니다.",
+ "step1-submit": "시작하기",
+ "step2-message": "<email>{{email}}</email><wrapper>로 인증 메일을 전송하였습니다</wrapper><email>{{email}}</email>",
+ "step2-code-error": "코드가 잘못된 것 같아요. 다시 시도해주세요.",
+ "step2-spam-alert": "스팸함에 메일이 있지는 않은지 확인하세요",
+ "step3-message": "거의다 끝났어요!",
+ "step4-message": "긴급복구 키트 저장하기",
+ "step4-description1": "계정이 잠겼을 경우 비상 키트를 사용하여 로그인할 수 있어요.",
+ "step4-description2": "다운로드 후 안전한 곳에 보관하는 것을 추천합니다.",
+ "step4-description3": "분실시 접근하거나 복구할 수 없는 시크릿 키가 포함되어 있어요.",
+ "step4-download": "PDF 다운로드"
+ }
+}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/activity.json b/frontend/public/locales/pt-BR/activity.json
deleted file mode 100644
index 9ffdf766d9..0000000000
--- a/frontend/public/locales/pt-BR/activity.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Registro de Atividade",
- "subtitle": "Histórico de eventos para esse projeto Infisical.",
- "event": {
- "readSecrets": "Segredos Visualizados",
- "updateSecrets": "Segredos Atualizados",
- "addSecrets": "Segredos Adicionados",
- "deleteSecrets": "Segredos Excluídos"
- },
- "ip-address": "Endereço IP"
-}
diff --git a/frontend/public/locales/pt-BR/billing.json b/frontend/public/locales/pt-BR/billing.json
deleted file mode 100644
index db784ab2de..0000000000
--- a/frontend/public/locales/pt-BR/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Uso & Faturamento",
- "description": "Visualize e gerencie a assinatura da sua organização aqui",
- "subscription": "Inscrição",
- "starter": {
- "name": "Base",
- "price-explanation": "Até 5 membros de equipe",
- "text": "Gerencie qualquer projeto com 5 membros gratuitamente!",
- "subtext": "$5 por membro adicional / mês."
- },
- "professional": {
- "name": "Profissional",
- "price-explanation": "/membro/mês",
- "subtext": "Inclui projetos e membros ilimitados.",
- "text": "Acompanhe o gerenciamento de chaves à medida que você cresce."
- },
- "enterprise": {
- "name": "Empreendimento",
- "text": "Acompanhe o gerenciamento de chaves à medida que você cresce."
- },
- "current-usage": "Uso atual",
- "free": "Grátis",
- "downgrade": "Reduzir",
- "upgrade": "Melhorar",
- "learn-more": "Saber Mais",
- "custom-pricing": "Preço Personalizado",
- "schedule-demo": "Agende uma Demonstração"
-}
diff --git a/frontend/public/locales/pt-BR/common.json b/frontend/public/locales/pt-BR/common.json
deleted file mode 100644
index 05b0b87fa5..0000000000
--- a/frontend/public/locales/pt-BR/common.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "error_project-already-exists": "Já exite um projeto com este nome.",
- "no-mobile": "Para usar o Infisical, faça o login através de um dispositivo com dimensões maiores.",
- "email": "Email",
- "password": "Senha",
- "first-name": "Primeiro Nome",
- "last-name": "Ultimo Nome",
- "logout": "Sair",
- "validate-required": "Por favor insira o seu {{name}}",
- "maintenance-alert": "Estamos passando por pequenas dificuldades técnicas. Estamos trabalhando para resolvê-las agora. Por favor, volte dentro de alguns minutos.",
- "click-to-copy": "Clique para copiar",
- "project-id": "ID do Projeto",
- "save-changes": "Salvar Alterações",
- "saved": "Salvou",
- "drop-zone": "Arraste e solte seu arquivo .env aqui.",
- "drop-zone-keys": "Arraste e solte seu arquivo .env aqui para adicionar mais chaves.",
- "role": "Role",
- "role_admin": "admin",
- "display-name": "Nome de exibição",
- "environment": "Ambiente",
- "expired-in": "Expira em",
- "language": "Idioma",
- "search": "Procurar...",
- "note": "Note",
- "view-more": "Ver mais",
- "end-of-history": "Fim do Histórico",
- "select-event": "Selecione um evento",
- "event": "Evento",
- "user": "Usuário",
- "source": "Fonte",
- "time": "Data/Hora",
- "timestamp": "Timestamp"
-}
diff --git a/frontend/public/locales/pt-BR/dashboard.json b/frontend/public/locales/pt-BR/dashboard.json
deleted file mode 100644
index 4f44742378..0000000000
--- a/frontend/public/locales/pt-BR/dashboard.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "title": "Segredos",
- "og-title": "Gerencie seus arquivos .env em segundos",
- "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem seus arquivos .env.",
- "search-keys": "Pesquisar chaves...",
- "add-key": "Adicionar Chave",
- "personal": "Pessoal",
- "personal-description": "As chaves pessoais são visíveis apenas para você",
- "shared": "Compartilhado",
- "shared-description": "As chaves compartilhadas ficam visíveis para toda a sua equipe",
- "make-shared": "Tornar Compartilhado",
- "make-personal": "Tornar Pessoal",
- "check-docs": {
- "button": "Checkar Documentação",
- "title": "Bom trabalho!!",
- "line1": "Parabéns por adicionar mais segredos.",
- "line2": "Veja como conectá-los à sua base de código."
- },
- "sidebar": {
- "secret": "Segredo",
- "key": "Chave",
- "value": "Valor",
- "override": "Substitua o valor por um valor pessoal",
- "version-history": "Histórico da versão",
- "comments": "Comentários e Notas",
- "personal-explanation": "Este segredo é pessoal. Não é compartilhado com nenhum de seus colegas de equipe.",
- "generate-random-hex": "Gerar HEX Aleatório",
- "digits": "dígitos",
- "delete-key-dialog": {
- "title": "Excluir Chave",
- "confirm-delete-message": "Você tem certeza que deseja excluir esta chave? Essa ação não pode ser desfeita."
- }
- }
-}
diff --git a/frontend/public/locales/pt-BR/integrations.json b/frontend/public/locales/pt-BR/integrations.json
deleted file mode 100644
index 21c20db5c8..0000000000
--- a/frontend/public/locales/pt-BR/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Integrações de Projetos",
- "description": "Gerencie suas integrações da Infisical com serviços de terceiros.",
- "no-integrations1": "Você ainda não tem integrações configuradas. Quando você fizer isso, elas aparecerão aqui.",
- "no-integrations2": "Para começar, clique em qualquer uma das opções abaixo. Leva 5 cliques para configurar.",
- "available": "Integrações de Plataforma e em Nuvem",
- "available-text1": "Clique na integração que deseja conectar. Isso permitirá que suas variáveis de ambiente fluam automaticamente para serviços de terceiros selecionados.",
- "available-text2": "Observação: durante uma integração com o Heroku, por questões de segurança, é impossível manter a criptografia de ponta a ponta. Em teoria, isso permite que o Infisical descriptografe suas variáveis de ambiente. Na prática, podemos garantir que isso nunca será feito e nos permite proteger seus segredos de pessoas mal-intencionadas online. O serviço básico da Infisical sempre permanecerá criptografado de ponta a ponta. Em caso de dúvidas, entre em contato com [email protected].",
- "cloud-integrations": "Integrações em Nuvem",
- "framework-integrations": "Integrações com framework",
- "click-to-start": "Clique em uma integração para começar a sincronizar segredos com ela.",
- "click-to-setup": "Clique em uma estrutura para obter as instruções de configuração.",
- "grant-access-to-secrets": "Conceda acesso Infisical aos seus segredos",
- "why-infisical-needs-access": "A maioria das integrações em Nuvem exige que o Infisical seja capaz de descriptografar seus segredos para que possam ser encaminhados.",
- "grant-access-button": "Garantir acesso"
-}
diff --git a/frontend/public/locales/pt-BR/login.json b/frontend/public/locales/pt-BR/login.json
deleted file mode 100644
index e06a59acd0..0000000000
--- a/frontend/public/locales/pt-BR/login.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "title": "Entrar",
- "og-title": "Entrar no Infisical",
- "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem seus arquivos .env.",
- "login": "Entrar",
- "need-account": "Precisa de uma conta Infisical?",
- "forgot-password": "Esqueceu sua senha?",
- "create-account": "Criar uma conta"
-}
diff --git a/frontend/public/locales/pt-BR/mfa.json b/frontend/public/locales/pt-BR/mfa.json
deleted file mode 100644
index a2a87b3220..0000000000
--- a/frontend/public/locales/pt-BR/mfa.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "title": "Criar uma conta",
- "og-title": "Substitua os arquivos .env por 1 linha de código. Cadastre-se no Infisical em 3 minutos.",
- "og-description": "Infisical é uma plataforma criptografada de ponta a ponta simples que permite que as equipes sincronizem e gerenciem chaves de API e variáveis ambientais. Funciona com Node.js, Next.js, Gatsby, Nest.js...",
- "signup": "Criar uma conta",
- "already-have-account": "Possui uma conta? Conecte-se",
- "forgot-password": "Esqueceu sua senha?",
- "verify": "Verificar",
- "step1-start": "Vamos começar",
- "step1-privacy": "Ao criar uma conta, você concorda com nossos Termos e leu a Política de Privacidade.",
- "step1-submit": "Começar",
- "step2-message": "<wrapper>Enviamos um e-mail de verificação para</wrapper><email>{{email}}</email>",
- "step2-code-error": "Ops. Seu código está errado. Tentativas restantes:",
- "step2-spam-alert": "Lembre-se de verificar sua caixa de entrada de spam.",
- "step3-message": "Quase lá!",
- "step4-message": "Guarde o seu Kit de Emergência",
- "step4-description1": "Se sua conta for bloqueada, seu Kit de emergência é a única maneira de fazer login.",
- "step4-description2": "Recomendamos que você faça o download e guarde-o em algum lugar seguro.",
- "step4-description3": "Ele contém sua chave secreta que não podemos acessar ou recuperar para você se você a perder.",
- "step4-download": "Baixar PDF",
- "step5-send-invites": "Enviar convites",
- "step5-invite-team": "Convide sua equipe",
- "step5-subtitle": "Infisical foi feito para ser usado com seus colegas. Convide-os para eles testarem também.",
- "step5-skip": "Pular"
-}
diff --git a/frontend/public/locales/pt-BR/nav.json b/frontend/public/locales/pt-BR/nav.json
deleted file mode 100644
index 7922312dde..0000000000
--- a/frontend/public/locales/pt-BR/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "[NEW] Participe do fórum do Slack",
- "docs": "Leia a Documentação",
- "issue": "Abra uma Issue no Github",
- "email": "Envie-nos um e-mail"
- },
- "user": {
- "signed-in-as": "ASSINADO COMO",
- "current-organization": "ORGANIZAÇÃO ATUAL",
- "usage-billing": "Uso & Faturamento",
- "invite": "Convide Membros",
- "other-organizations": "OUTRA ORGANIZAÇÃO"
- },
- "menu": {
- "project": "PROJETO",
- "secrets": "Segredos",
- "members": "Membros",
- "integrations": "Integrações",
- "project-settings": "Configurações do Projeto"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/section-incident.json b/frontend/public/locales/pt-BR/section-incident.json
deleted file mode 100644
index cbe902783b..0000000000
--- a/frontend/public/locales/pt-BR/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "incident-contacts": "Contatos de Emergência",
- "incident-contacts-description": "Esses contatos serão notificados no caso improvável de um incidente grave.",
- "no-incident-contacts": "Nenhum contato de emergência encontrado.",
- "add-contact": "Adicionar contato",
- "add-dialog": {
- "title": "Adicionar um contato de emergência",
- "description": "Este contato será notificado no caso improvável de um incidente grave.",
- "add-incident": "Adicionar contato de emergência"
- }
-}
diff --git a/frontend/public/locales/pt-BR/section-members.json b/frontend/public/locales/pt-BR/section-members.json
deleted file mode 100644
index c8ee1d2a9d..0000000000
--- a/frontend/public/locales/pt-BR/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "add-member": "Adicionar membro",
- "org-members": "Membros da Organização",
- "org-members-description": "Gerencie os membros da sua organização. Esses usuários poderiam posteriormente ser associados a projetos.",
- "search-members": "Pesquisar membros...",
- "add-dialog": {
- "add-member-to-project": "Adicionar um membro ao seu projeto",
- "already-all-invited": "Todos os usuários da sua organização já foram convidados.",
- "add-user-org-first": "Adicione mais usuários à organização primeiro.",
- "user-will-email": "O usuário receberá um e-mail com as instruções.",
- "looking-add": "<0>Se você deseja adicionar usuários à sua organização,</0><1>clique aqui</1>",
- "add-user-to-org": "Adicionar usuários à organização"
- }
-}
diff --git a/frontend/public/locales/pt-BR/section-password.json b/frontend/public/locales/pt-BR/section-password.json
deleted file mode 100644
index 7715817682..0000000000
--- a/frontend/public/locales/pt-BR/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "password": "Senha",
- "change": "Mudar senha",
- "current": "Senha atual",
- "current-wrong": "A senha atual pode estar errada",
- "new": "Nova Senha",
- "validate-base": "A senha deve conter pelo menos:",
- "validate-length": "14 caracteres",
- "validate-case": "1 caractere minúsculo",
- "validate-number": "1 número"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/section-token.json b/frontend/public/locales/pt-BR/section-token.json
deleted file mode 100644
index 1713f8118d..0000000000
--- a/frontend/public/locales/pt-BR/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "service-tokens": "Tokens de Serviço",
- "service-tokens-description": "Cada token de serviço é específico para você, um determinado projeto e um determinado ambiente dentro deste projeto.",
- "add-new": "Adicionar novo token",
- "add-dialog": {
- "title": "Adicione um token de serviço para {{target}}",
- "description": "Especifique o nome, o ambiente e o período de expiração. Quando um token é gerado, você só poderá vê-lo uma vez antes que ele desapareça. Certifique-se de salvá-lo em algum lugar.",
- "name": "Nome do token de serviço",
- "add": "Adicionar token de serviço",
- "copy-service-token": "Copie seu token de serviço",
- "copy-service-token-description": "Depois de fechar este pop-up, você nunca mais verá seu token de serviço"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/settings-members.json b/frontend/public/locales/pt-BR/settings-members.json
deleted file mode 100644
index f48913547f..0000000000
--- a/frontend/public/locales/pt-BR/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Membros do Projeto",
- "description": "Esta página mostra os membros do projeto selecionado."
-}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/settings-org.json b/frontend/public/locales/pt-BR/settings-org.json
deleted file mode 100644
index 458a8ac093..0000000000
--- a/frontend/public/locales/pt-BR/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Configurações da organização",
- "description": "Gerencie os membros da sua organização. Esses usuários poderiam posteriormente ser associados a projetos."
-}
diff --git a/frontend/public/locales/pt-BR/settings-personal.json b/frontend/public/locales/pt-BR/settings-personal.json
deleted file mode 100644
index 9d5dd7f50f..0000000000
--- a/frontend/public/locales/pt-BR/settings-personal.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Configurações Pessoais",
- "description": "Visualize e gerencie suas informações pessoais aqui.",
- "emergency": {
- "name": "Kit de emergência",
- "text1": "Seu Kit de Emergência contém as informações necessárias para acessar sua conta Infisical.",
- "text2": "Apenas o último kit de emergência emitido permanece válido. Para obter um novo Kit de emergência, verifique sua senha.",
- "download": "Baixe o kit de emergência"
- },
- "change-language": "Mudar idioma"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/pt-BR/settings-project.json b/frontend/public/locales/pt-BR/settings-project.json
deleted file mode 100644
index acd88a5d0d..0000000000
--- a/frontend/public/locales/pt-BR/settings-project.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "title": "Configurações do Projeto",
- "description": "Essas configurações se aplicam apenas ao projeto atualmente selecionado.",
- "danger-zone": "Zona de perigo",
- "delete-project": "Excluir projeto",
- "project-to-delete": "Projeto a ser deletado",
- "danger-zone-note": "Assim que você excluir este projeto, não poderá desfazê-lo. Isso removerá imediatamente todas as chaves. Se você ainda quiser fazer isso, digite o nome do projeto abaixo.",
- "delete-project-note": "Observação: você só pode excluir um projeto caso tenha mais de um",
- "project-id-description": "Para integrar Infisical em sua base de código e obter injeção automática de variáveis de ambiente, você deve usar o seguinte ID do projeto.",
- "project-id-description2": "Para obter mais orientações, incluindo trechos de código para várias linguagens e frameworks, consulte ",
- "auto-generated": "Este é o identificador exclusivo - gerado automaticamente - do seu projeto. Não pode ser alterado.",
- "docs": "Documentação do Infisical",
- "auto-capitalization": "Converter em caixa alta automaticamente",
- "auto-capitalization-description": "Por padrão, Infisical converte automaticamente as chaves em caixa alta. Se você quiser desativar essa funcionalidade, pode fazê-lo aqui."
-}
diff --git a/frontend/public/locales/pt-BR/signup.json b/frontend/public/locales/pt-BR/signup.json
deleted file mode 100644
index c08ffea7c0..0000000000
--- a/frontend/public/locales/pt-BR/signup.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "title": "Inscrever-se",
- "og-title": "Substitua os arquivos .env por 1 linha de código. Cadastre-se no Infisical em 3 minutos.",
- "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem chaves de API e variáveis de ambiente. Funciona com Node.js, Next.js, Gatsby, Nest.js...",
- "signup": "Inscrever-se",
- "already-have-account": "Possui uma conta? Conecte-se",
- "forgot-password": "Esqueceu sua senha?",
- "verify": "Verificar",
- "step1-start": "Vamos começar",
- "step1-privacy": "Ao criar uma conta, você concorda com nossos Termos e leu e reconheceu a Política de Privacidade.",
- "step1-submit": "Iniciar",
- "step2-message": "<wrapper>Enviamos um e-mail de verificação para</wrapper><email>{{email}}</email>",
- "step2-code-error": "Ops. Seu código está errado. Por favor, tente novamente.",
- "step2-spam-alert": "Certifique-se de verificar sua caixa de entrada de spam.",
- "step3-message": "Quase lá!",
- "step4-message": "Guarde o seu Kit de Emergência",
- "step4-description1": "Se sua conta for bloqueada, seu Kit de emergência é a única maneira de fazer login.",
- "step4-description2": "Recomendamos que você faça o download e guarde-o em algum lugar seguro.",
- "step4-description3": "Ele contém sua chave secreta que não podemos acessar ou recuperar para você se você a perder.",
- "step4-download": "Baixar PDF",
- "step5-send-invites": "Enviar convites",
- "step5-invite-team": "Convide sua equipe",
- "step5-subtitle": "Infisical foi feito para ser usado com seus colegas. Convide-os para testar também.",
- "step5-skip": "Pular"
-}
diff --git a/frontend/public/locales/pt-BR/translations.json b/frontend/public/locales/pt-BR/translations.json
new file mode 100644
index 0000000000..5b53ce5038
--- /dev/null
+++ b/frontend/public/locales/pt-BR/translations.json
@@ -0,0 +1,293 @@
+{
+ "activity": {
+ "title": "Registro de Atividade",
+ "subtitle": "Histórico de eventos para esse projeto Infisical.",
+ "event": {
+ "readSecrets": "Segredos Visualizados",
+ "updateSecrets": "Segredos Atualizados",
+ "addSecrets": "Segredos Adicionados",
+ "deleteSecrets": "Segredos Excluídos"
+ },
+ "ip-address": "Endereço IP"
+ },
+ "billing": {
+ "title": "Uso & Faturamento",
+ "description": "Visualize e gerencie a assinatura da sua organização aqui",
+ "subscription": "Inscrição",
+ "starter": {
+ "name": "Base",
+ "price-explanation": "Até 5 membros de equipe",
+ "text": "Gerencie qualquer projeto com 5 membros gratuitamente!",
+ "subtext": "$5 por membro adicional / mês."
+ },
+ "professional": {
+ "name": "Profissional",
+ "price-explanation": "/membro/mês",
+ "subtext": "Inclui projetos e membros ilimitados.",
+ "text": "Acompanhe o gerenciamento de chaves à medida que você cresce."
+ },
+ "enterprise": {
+ "name": "Empreendimento",
+ "text": "Acompanhe o gerenciamento de chaves à medida que você cresce."
+ },
+ "current-usage": "Uso atual",
+ "free": "Grátis",
+ "downgrade": "Reduzir",
+ "upgrade": "Melhorar",
+ "learn-more": "Saber Mais",
+ "custom-pricing": "Preço Personalizado",
+ "schedule-demo": "Agende uma Demonstração"
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "error_project-already-exists": "Já exite um projeto com este nome.",
+ "no-mobile": "Para usar o Infisical, faça o login através de um dispositivo com dimensões maiores.",
+ "email": "Email",
+ "password": "Senha",
+ "first-name": "Primeiro Nome",
+ "last-name": "Ultimo Nome",
+ "logout": "Sair",
+ "validate-required": "Por favor insira o seu {{name}}",
+ "maintenance-alert": "Estamos passando por pequenas dificuldades técnicas. Estamos trabalhando para resolvê-las agora. Por favor, volte dentro de alguns minutos.",
+ "click-to-copy": "Clique para copiar",
+ "project-id": "ID do Projeto",
+ "save-changes": "Salvar Alterações",
+ "saved": "Salvou",
+ "drop-zone": "Arraste e solte seu arquivo .env aqui.",
+ "drop-zone-keys": "Arraste e solte seu arquivo .env aqui para adicionar mais chaves.",
+ "role": "Role",
+ "role_admin": "admin",
+ "display-name": "Nome de exibição",
+ "environment": "Ambiente",
+ "expired-in": "Expira em",
+ "language": "Idioma",
+ "search": "Procurar...",
+ "note": "Note",
+ "view-more": "Ver mais",
+ "end-of-history": "Fim do Histórico",
+ "select-event": "Selecione um evento",
+ "event": "Evento",
+ "user": "Usuário",
+ "source": "Fonte",
+ "time": "Data/Hora",
+ "timestamp": "Timestamp"
+ },
+ "dashboard": {
+ "title": "Segredos",
+ "og-title": "Gerencie seus arquivos .env em segundos",
+ "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem seus arquivos .env.",
+ "search-keys": "Pesquisar chaves...",
+ "add-key": "Adicionar Chave",
+ "personal": "Pessoal",
+ "personal-description": "As chaves pessoais são visíveis apenas para você",
+ "shared": "Compartilhado",
+ "shared-description": "As chaves compartilhadas ficam visíveis para toda a sua equipe",
+ "make-shared": "Tornar Compartilhado",
+ "make-personal": "Tornar Pessoal",
+ "check-docs": {
+ "button": "Checkar Documentação",
+ "title": "Bom trabalho!!",
+ "line1": "Parabéns por adicionar mais segredos.",
+ "line2": "Veja como conectá-los à sua base de código."
+ },
+ "sidebar": {
+ "secret": "Segredo",
+ "key": "Chave",
+ "value": "Valor",
+ "override": "Substitua o valor por um valor pessoal",
+ "version-history": "Histórico da versão",
+ "comments": "Comentários e Notas",
+ "personal-explanation": "Este segredo é pessoal. Não é compartilhado com nenhum de seus colegas de equipe.",
+ "generate-random-hex": "Gerar HEX Aleatório",
+ "digits": "dígitos",
+ "delete-key-dialog": {
+ "title": "Excluir Chave",
+ "confirm-delete-message": "Você tem certeza que deseja excluir esta chave? Essa ação não pode ser desfeita."
+ }
+ }
+ },
+ "integrations": {
+ "title": "Integrações de Projetos",
+ "description": "Gerencie suas integrações da Infisical com serviços de terceiros.",
+ "no-integrations1": "Você ainda não tem integrações configuradas. Quando você fizer isso, elas aparecerão aqui.",
+ "no-integrations2": "Para começar, clique em qualquer uma das opções abaixo. Leva 5 cliques para configurar.",
+ "available": "Integrações de Plataforma e em Nuvem",
+ "available-text1": "Clique na integração que deseja conectar. Isso permitirá que suas variáveis de ambiente fluam automaticamente para serviços de terceiros selecionados.",
+ "available-text2": "Observação: durante uma integração com o Heroku, por questões de segurança, é impossível manter a criptografia de ponta a ponta. Em teoria, isso permite que o Infisical descriptografe suas variáveis de ambiente. Na prática, podemos garantir que isso nunca será feito e nos permite proteger seus segredos de pessoas mal-intencionadas online. O serviço básico da Infisical sempre permanecerá criptografado de ponta a ponta. Em caso de dúvidas, entre em contato com [email protected].",
+ "cloud-integrations": "Integrações em Nuvem",
+ "framework-integrations": "Integrações com framework",
+ "click-to-start": "Clique em uma integração para começar a sincronizar segredos com ela.",
+ "click-to-setup": "Clique em uma estrutura para obter as instruções de configuração.",
+ "grant-access-to-secrets": "Conceda acesso Infisical aos seus segredos",
+ "why-infisical-needs-access": "A maioria das integrações em Nuvem exige que o Infisical seja capaz de descriptografar seus segredos para que possam ser encaminhados.",
+ "grant-access-button": "Garantir acesso"
+ },
+ "login": {
+ "title": "Entrar",
+ "og-title": "Entrar no Infisical",
+ "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem seus arquivos .env.",
+ "login": "Entrar",
+ "need-account": "Precisa de uma conta Infisical?",
+ "forgot-password": "Esqueceu sua senha?",
+ "create-account": "Criar uma conta"
+ },
+ "mfa": {
+ "title": "Criar uma conta",
+ "og-title": "Substitua os arquivos .env por 1 linha de código. Cadastre-se no Infisical em 3 minutos.",
+ "og-description": "Infisical é uma plataforma criptografada de ponta a ponta simples que permite que as equipes sincronizem e gerenciem chaves de API e variáveis ambientais. Funciona com Node.js, Next.js, Gatsby, Nest.js...",
+ "signup": "Criar uma conta",
+ "already-have-account": "Possui uma conta? Conecte-se",
+ "forgot-password": "Esqueceu sua senha?",
+ "verify": "Verificar",
+ "step1-start": "Vamos começar",
+ "step1-privacy": "Ao criar uma conta, você concorda com nossos Termos e leu a Política de Privacidade.",
+ "step1-submit": "Começar",
+ "step2-message": "<wrapper>Enviamos um e-mail de verificação para</wrapper><email>{{email}}</email>",
+ "step2-code-error": "Ops. Seu código está errado. Tentativas restantes:",
+ "step2-spam-alert": "Lembre-se de verificar sua caixa de entrada de spam.",
+ "step3-message": "Quase lá!",
+ "step4-message": "Guarde o seu Kit de Emergência",
+ "step4-description1": "Se sua conta for bloqueada, seu Kit de emergência é a única maneira de fazer login.",
+ "step4-description2": "Recomendamos que você faça o download e guarde-o em algum lugar seguro.",
+ "step4-description3": "Ele contém sua chave secreta que não podemos acessar ou recuperar para você se você a perder.",
+ "step4-download": "Baixar PDF",
+ "step5-send-invites": "Enviar convites",
+ "step5-invite-team": "Convide sua equipe",
+ "step5-subtitle": "Infisical foi feito para ser usado com seus colegas. Convide-os para eles testarem também.",
+ "step5-skip": "Pular"
+ },
+ "nav": {
+ "support": {
+ "slack": "[NEW] Participe do fórum do Slack",
+ "docs": "Leia a Documentação",
+ "issue": "Abra uma Issue no Github",
+ "email": "Envie-nos um e-mail"
+ },
+ "user": {
+ "signed-in-as": "ASSINADO COMO",
+ "current-organization": "ORGANIZAÇÃO ATUAL",
+ "usage-billing": "Uso & Faturamento",
+ "invite": "Convide Membros",
+ "other-organizations": "OUTRA ORGANIZAÇÃO"
+ },
+ "menu": {
+ "project": "PROJETO",
+ "secrets": "Segredos",
+ "members": "Membros",
+ "integrations": "Integrações",
+ "project-settings": "Configurações do Projeto"
+ }
+ },
+ "section": {
+ "incident": {
+ "incident-contacts": "Contatos de Emergência",
+ "incident-contacts-description": "Esses contatos serão notificados no caso improvável de um incidente grave.",
+ "no-incident-contacts": "Nenhum contato de emergência encontrado.",
+ "add-contact": "Adicionar contato",
+ "add-dialog": {
+ "title": "Adicionar um contato de emergência",
+ "description": "Este contato será notificado no caso improvável de um incidente grave.",
+ "add-incident": "Adicionar contato de emergência"
+ }
+ },
+ "members": {
+ "add-member": "Adicionar membro",
+ "org-members": "Membros da Organização",
+ "org-members-description": "Gerencie os membros da sua organização. Esses usuários poderiam posteriormente ser associados a projetos.",
+ "search-members": "Pesquisar membros...",
+ "add-dialog": {
+ "add-member-to-project": "Adicionar um membro ao seu projeto",
+ "already-all-invited": "Todos os usuários da sua organização já foram convidados.",
+ "add-user-org-first": "Adicione mais usuários à organização primeiro.",
+ "user-will-email": "O usuário receberá um e-mail com as instruções.",
+ "looking-add": "<0>Se você deseja adicionar usuários à sua organização,</0><1>clique aqui</1>",
+ "add-user-to-org": "Adicionar usuários à organização"
+ }
+ },
+ "password": {
+ "password": "Senha",
+ "change": "Mudar senha",
+ "current": "Senha atual",
+ "current-wrong": "A senha atual pode estar errada",
+ "new": "Nova Senha",
+ "validate-base": "A senha deve conter pelo menos:",
+ "validate-length": "14 caracteres",
+ "validate-case": "1 caractere minúsculo",
+ "validate-number": "1 número"
+ },
+ "token": {
+ "service-tokens": "Tokens de Serviço",
+ "service-tokens-description": "Cada token de serviço é específico para você, um determinado projeto e um determinado ambiente dentro deste projeto.",
+ "add-new": "Adicionar novo token",
+ "add-dialog": {
+ "title": "Adicione um token de serviço para {{target}}",
+ "description": "Especifique o nome, o ambiente e o período de expiração. Quando um token é gerado, você só poderá vê-lo uma vez antes que ele desapareça. Certifique-se de salvá-lo em algum lugar.",
+ "name": "Nome do token de serviço",
+ "add": "Adicionar token de serviço",
+ "copy-service-token": "Copie seu token de serviço",
+ "copy-service-token-description": "Depois de fechar este pop-up, você nunca mais verá seu token de serviço"
+ }
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "Membros do Projeto",
+ "description": "Esta página mostra os membros do projeto selecionado."
+ },
+ "org": {
+ "title": "Configurações da organização",
+ "description": "Gerencie os membros da sua organização. Esses usuários poderiam posteriormente ser associados a projetos."
+ },
+ "personal": {
+ "title": "Configurações Pessoais",
+ "description": "Visualize e gerencie suas informações pessoais aqui.",
+ "emergency": {
+ "name": "Kit de emergência",
+ "text1": "Seu Kit de Emergência contém as informações necessárias para acessar sua conta Infisical.",
+ "text2": "Apenas o último kit de emergência emitido permanece válido. Para obter um novo Kit de emergência, verifique sua senha.",
+ "download": "Baixe o kit de emergência"
+ },
+ "change-language": "Mudar idioma"
+ },
+ "project": {
+ "title": "Configurações do Projeto",
+ "description": "Essas configurações se aplicam apenas ao projeto atualmente selecionado.",
+ "danger-zone": "Zona de perigo",
+ "delete-project": "Excluir projeto",
+ "project-to-delete": "Projeto a ser deletado",
+ "danger-zone-note": "Assim que você excluir este projeto, não poderá desfazê-lo. Isso removerá imediatamente todas as chaves. Se você ainda quiser fazer isso, digite o nome do projeto abaixo.",
+ "delete-project-note": "Observação: você só pode excluir um projeto caso tenha mais de um",
+ "project-id-description": "Para integrar Infisical em sua base de código e obter injeção automática de variáveis de ambiente, você deve usar o seguinte ID do projeto.",
+ "project-id-description2": "Para obter mais orientações, incluindo trechos de código para várias linguagens e frameworks, consulte ",
+ "auto-generated": "Este é o identificador exclusivo - gerado automaticamente - do seu projeto. Não pode ser alterado.",
+ "docs": "Documentação do Infisical",
+ "auto-capitalization": "Converter em caixa alta automaticamente",
+ "auto-capitalization-description": "Por padrão, Infisical converte automaticamente as chaves em caixa alta. Se você quiser desativar essa funcionalidade, pode fazê-lo aqui."
+ }
+ },
+ "signup": {
+ "title": "Inscrever-se",
+ "og-title": "Substitua os arquivos .env por 1 linha de código. Cadastre-se no Infisical em 3 minutos.",
+ "og-description": "Infisical é uma plataforma simples e criptografada de ponta a ponta que permite que as equipes sincronizem e gerenciem chaves de API e variáveis de ambiente. Funciona com Node.js, Next.js, Gatsby, Nest.js...",
+ "signup": "Inscrever-se",
+ "already-have-account": "Possui uma conta? Conecte-se",
+ "forgot-password": "Esqueceu sua senha?",
+ "verify": "Verificar",
+ "step1-start": "Vamos começar",
+ "step1-privacy": "Ao criar uma conta, você concorda com nossos Termos e leu e reconheceu a Política de Privacidade.",
+ "step1-submit": "Iniciar",
+ "step2-message": "<wrapper>Enviamos um e-mail de verificação para</wrapper><email>{{email}}</email>",
+ "step2-code-error": "Ops. Seu código está errado. Por favor, tente novamente.",
+ "step2-spam-alert": "Certifique-se de verificar sua caixa de entrada de spam.",
+ "step3-message": "Quase lá!",
+ "step4-message": "Guarde o seu Kit de Emergência",
+ "step4-description1": "Se sua conta for bloqueada, seu Kit de emergência é a única maneira de fazer login.",
+ "step4-description2": "Recomendamos que você faça o download e guarde-o em algum lugar seguro.",
+ "step4-description3": "Ele contém sua chave secreta que não podemos acessar ou recuperar para você se você a perder.",
+ "step4-download": "Baixar PDF",
+ "step5-send-invites": "Enviar convites",
+ "step5-invite-team": "Convide sua equipe",
+ "step5-subtitle": "Infisical foi feito para ser usado com seus colegas. Convide-os para testar também.",
+ "step5-skip": "Pular"
+ }
+}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/activity.json b/frontend/public/locales/tr/activity.json
deleted file mode 100644
index 80ac8f90d4..0000000000
--- a/frontend/public/locales/tr/activity.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "title": "Aktivite Günlükleri",
- "subtitle": "Bu Infisical projesi için Olay Geçmişi.",
- "event": {
- "readSecrets": "Sırlar Görüntülendi",
- "updateSecrets": "Sırlar Güncellendi",
- "addSecrets": "Sırlar Eklendi",
- "deleteSecrets": "Sırlar Silindi"
- },
- "ip-address": "IP Addresi"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/billing.json b/frontend/public/locales/tr/billing.json
deleted file mode 100644
index d27ddc9765..0000000000
--- a/frontend/public/locales/tr/billing.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Planlar & Fiyatlandırma",
- "description": "Kuruluşunuzun aboneliğini buradan görüntüleyin ve yönetin",
- "subscription": "Abonelik",
- "starter": {
- "name": "Başlangıç",
- "price-explanation": "5 takım üyesine kadar",
- "text": "5 kişiyle herhangi bir projeyi ücretsiz yönet!",
- "subtext": "Sonrasında aylık her üye başına 5$."
- },
- "professional": {
- "name": "Profesyonel",
- "price-explanation": "/üye/ay",
- "subtext": "Sınırsız miktarda üye ve proje dahildir.",
- "text": "Anahtar yönetimine siz büyüdükçe ayak uydurun.."
- },
- "enterprise": {
- "name": "Kurumsal",
- "text": "Anahtar yönetimine siz büyüdükçe ayak uydurun."
- },
- "current-usage": "Mevcut Plan",
- "free": "Ücretsiz",
- "downgrade": "Düşürün",
- "upgrade": "Yükseltin",
- "learn-more": "Daha fazlasını öğrenim",
- "custom-pricing": "Özel Fiyatlandırma",
- "schedule-demo": "Bir Deneme Sürümü Planlayın "
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/common.json b/frontend/public/locales/tr/common.json
deleted file mode 100644
index 38d54b476d..0000000000
--- a/frontend/public/locales/tr/common.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "head-title": "{{title}} | Infisical",
- "error_project-already-exists": "Bu isimle bir proje zaten mevcut.",
- "no-mobile": " Infisical'ı kullanmak için, lütfen daha büyük boyutlara sahip bir cihaz üzerinden giriş yapın. ",
- "email": "Email",
- "password": "Şifre",
- "first-name": "Adınız",
- "last-name": "Soyadınız",
- "logout": "Çıkış Yap",
- "validate-required": "Lütfen girin, sahip olduğunuz {{name}}",
- "maintenance-alert": "Ufak teknik problemler yaşıyoruz. Sorunu çözmek üzere çalışıyoruz. Lütfen birkaç dakika içerisinde yeniden deneyin.",
- "click-to-copy": "Kopyala",
- "project-id": "Project ID",
- "save-changes": "Değişiklikleri Kaydet",
- "saved": "Kaydedildi",
- "drop-zone": ".env yada .yaml dosyasını buraya sürükleyin",
- "drop-zone-keys": "Daha çok anahatar eklemek için bir .env yada .yaml dosyasını sürükleyin.",
- "role": "Rol",
- "role_admin": "yönetici",
- "display-name": "Ekran Adı",
- "environment": "Environment",
- "expired-in": "Süresi geçicek",
- "language": "Dil",
- "search": "Ara...",
- "note": "Not",
- "view-more": "Daha Fazla Göster",
- "end-of-history": "Geçmişin Sonu",
- "select-event": "Bir olay seçin",
- "event": "Olay",
- "user": "Kullanıcı",
- "source": "Kaynak",
- "time": "Zaman",
- "timestamp": "Zaman Damgası"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/dashboard.json b/frontend/public/locales/tr/dashboard.json
deleted file mode 100644
index c480ba18be..0000000000
--- a/frontend/public/locales/tr/dashboard.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "title": "Sırlar",
- "og-title": "Saniyeler içerisinde .env dosyalarınızı yönetin",
- "og-description": "Infisical takımların .env dosyalarını senkronize etmelerini ve yönetmelerini sağlayan uçtan uca şifrelenmiş basit bir platformdur",
- "search-keys": "Anahtarları ara...",
- "add-key": "Anahtar Ekle",
- "personal": "Kişisel",
- "personal-description": "Kişisel anahtarlar sadece sana görünür",
- "shared": "Paylaşılan",
- "shared-description": "Paylaşılan anahatarlar tüm takımına görünür",
- "make-shared": "Paylaşılan Yap",
- "make-personal": "Kişisel Yap",
- "add-secret": "Yeni bir sır ekle",
- "check-docs": {
- "button": "Dokümanları Kontrol Et",
- "title": "İyi iş!",
- "line1": "Tebrikler, yeni anahtarlar eklediniz.",
- "line2": "Bunları kendi Codebase' inize nasıl bağlarsınız, işte böyle."
- },
- "sidebar": {
- "secret": "Sır",
- "key": "Anahtar",
- "value": "Değer",
- "override": "Bu değerin üzerine bir kişisel değer yazın ",
- "version-history": "Versiyon Geçmişi",
- "comments": "Yorumlar & Notlar",
- "personal-explanation": "Bu bir kişisel sır. Herhangi bir takım üyesi ile paylaşılmaz.",
- "generate-random-hex": "Rastegele hex oluştur",
- "digits": "basamak",
- "delete-key-dialog": {
- "title": "Anahtarı Sil",
- "confirm-delete-message": "Bu sırrı silmek istediğinden emin misin? Bu işlem geri alınamaz."
- }
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/integrations.json b/frontend/public/locales/tr/integrations.json
deleted file mode 100644
index b8fe599f49..0000000000
--- a/frontend/public/locales/tr/integrations.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Proje Entegrasyonları",
- "description": "Infisical'ın üçüncü taraf hizmetlerle olan entegrasyonlarınızı yönetin.",
- "no-integrations1": "Henüz ayarlanmış bir entegrasyonunuz yok. Oluşturduğunuz zaman, burada görünecekler.",
- "no-integrations2": "Başlamak için aşağıdaki seçeneklerden herhangi birine tıklayın. Sadece 5 tıklama ile kurulumu halledin.",
- "available": "Platform & Cloud Entegrasyonları",
- "available-text1": "Bağlanmak istediğiniz entegrasyona tıklayın. Bu, ortam değişkenlerinizin seçilen üçüncü taraf hizmetlere otomatik olarak akmasını sağlar.",
- "available-text2": "Not: Heroku ile entegrasyon sırasında güvenlik nedenleriyle uçtan uca şifrelemenin sürdürülmesi mümkün değildir. Teorik olarak bu, Infisical'ın ortam değişkenlerinin şifresini çözmesine izin verir. Pratikte biz bunun asla yapılmayacağının garantisini verebiliriz ve bu durum sırlarınızı çevrimiçi kötü niyetlilerden korumamıza olanak tanır. Çekirdek Infisical hizmeti her zaman uçtan uca şifreli kalacaktır. Sorularınız için [email protected] adresine ulaşın.",
- "cloud-integrations": "Cloud Entegrasyonları",
- "framework-integrations": "Framework Entegrasyonları",
- "click-to-start": "Sırlarınızı senkronize etmeye başlamak için bir entegrasyona tıklayın.",
- "click-to-setup": "Kurulum talimatlarını almak için bir frameworke tıklayın.",
- "grant-access-to-secrets": "Infisical'a sırlarınıza erişim izni verin",
- "why-infisical-needs-access": "Çoğu cloud entegrasyonu, Infisical'ın sırlarınızı aktarabilmek için sırlarınızı deşifre etmesini gerektirir.",
- "grant-access-button": "Erişim izni ver"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/login.json b/frontend/public/locales/tr/login.json
deleted file mode 100644
index f42551188b..0000000000
--- a/frontend/public/locales/tr/login.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "title": "Giriş Yap",
- "og-title": "Infisical'a Giriş Yap",
- "og-description": "Infisical ekiplerin .env dosyalarını senkronize etmelerini ve yönetmelerini sağlayan uçtan uca şifrelenmiş basit bir platformdur",
- "login": "Giriş Yap",
- "need-account": "Bir Infisical hesabına mı ihtiyacınız var?",
- "create-account": "Hesap oluşturun",
- "forgot-password": "Şifrenizi mi unuttunuz?",
- "error-login": "Kimlik bilgileri yanlış."
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/mfa.json b/frontend/public/locales/tr/mfa.json
deleted file mode 100644
index fe4eb16542..0000000000
--- a/frontend/public/locales/tr/mfa.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Kayıt olun",
- "og-title": "Tek satır kodla .env dosyalarını değiştirin. 3 dakika içerinde Infisical'a kayıt olun.",
- "og-description": "Infisical takımların API anahtarlarını ve ortam değişkenlerini yönetmelerini ve senkronize etmelerini sağlayan basit, uçtan uca şifrelenmiş bir platformdur. Node.js, Next.js, Gatsby, Nest.js ve daha fazlası ile çalışır.",
- "signup": "Kayıt ol",
- "already-have-account": "Hesabın var mı? Giriş yap",
- "forgot-password": "Şifreni mi unuttun?",
- "verify": "Doğrula",
- "step1-start": "Hadi başlayalım",
- "step1-privacy": "Hesap oluşturarak, Şartlarımızı ve Gizlilik Politikasını okuyup kabul etmiş olursunuz.",
- "step1-submit": "Başla",
- "step2-message": "Şu adrese bir doğrulama maili yolladık",
- "step2-code-error": "Tüh. Kodun hatalı. Kalan denemeler:",
- "step2-resend-alert": "Kodu ulaşamadı mı?",
- "step2-resend-submit": "Tekrar Yolla",
- "step2-resend-progress": "Tekrar yollanıyor...",
- "step2-spam-alert": "Spam kutunuzu kontrol ettiğinizden emin olun.",
- "step3-message": "Çok az kaldı!",
- "step4-message": "Acil Durum Kitinizi kayıt edin",
- "step4-description1": "Eğer hesabınıza erişemezseniz, Acil Durum Kitiniz giriş yapmanın tek yoludur.",
- "step4-description2": "Bunu indirmenizi ve güvenli bir ortamda saklamanızı öneriyoruz.",
- "step4-description3": "Kaybetmeniz durumunda bizim dahi erişemeyeceğimiz veya kurtaramayacağımız Gizli Anahtarınızı barındırır.",
- "step4-download": "PDF'yi indir",
- "step5-send-invites": "Davetleri yolla",
- "step5-invite-team": "Takımını davet et",
- "step5-subtitle": "Infisical takım arkadaşlarınız ile kullanılmak üzere yapılmıştır. Birlikte test etmek için onları davet edin.",
- "step5-skip": "Atla"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/nav.json b/frontend/public/locales/tr/nav.json
deleted file mode 100644
index aa6ea2df44..0000000000
--- a/frontend/public/locales/tr/nav.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "support": {
- "slack": "[YENİ] Slack Foruma katılın",
- "docs": "Dokümanları okuyun",
- "issue": "Bir Github Issue açın",
- "email": "Bize mail yollayın"
- },
- "user": {
- "signed-in-as": "ŞU HESABA GİRİŞ YAPILDI",
- "current-organization": "MEVZUT ORGANİZASYON",
- "usage-billing": "Plan & Fiyatlandırma",
- "invite": "Üyeleri Davet Et",
- "other-organizations": "DİĞER ORGANİZASYONLAR"
- },
- "menu": {
- "project": "PROJE",
- "secrets": "Sırlar",
- "members": "Üyeler",
- "integrations": "Entegrasyonlar",
- "project-settings": "Proje Ayarları"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/section-api-key.json b/frontend/public/locales/tr/section-api-key.json
deleted file mode 100644
index 0c768ded66..0000000000
--- a/frontend/public/locales/tr/section-api-key.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "api-keys": "Servis Belirteçleri",
- "api-keys-description": "Her servis belirteci size, belirli bir projeye ve o proje içindeki belirli bir ortama özeldir.",
- "add-new": "Yeni Belirteç Ekleyin",
- "add-dialog": {
- "title": "Bir API Anahtarı Ekleyin",
- "description": "Adını ve son kullanma süresini belirleyin. Bir API anahtarı oluşturulduğunda, kaybolmadan önce yalnızca bir kez görebileceksiniz. Bir yere kaydettiğinizden emin olun.",
- "name": "API Anahtarı Adı",
- "add": "API Anahtarı Ekleyin",
- "copy-service-token": "API Anahtarızı kopyalayın",
- "copy-service-token-description": "Bu açılır pencereyi kapattığınızda, API anahtarınızı bir daha asla görmeyeceksiniz"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/section-incident.json b/frontend/public/locales/tr/section-incident.json
deleted file mode 100644
index 776c71c63f..0000000000
--- a/frontend/public/locales/tr/section-incident.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "incident-contacts": "Özel Durum İletişim Adresleri",
- "incident-contacts-description": "Bu adresler olası olmayan ciddi bir olay durumunda bilgilendirilecek.",
- "no-incident-contacts": "Hiçbir Özel Durum İletişim Adresi bulunamadı.",
- "add-contact": "İletişim Adresi Ekle",
- "add-dialog": {
- "title": "Bir Özel Durum İletişim Adresi Ekleyin",
- "description": "Bu kişi, olası olmayan ciddi bir olay durumunda bilgilendirilecektir..",
- "add-incident": "Özel Durum İletişim Adresi Ekle"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/section-members.json b/frontend/public/locales/tr/section-members.json
deleted file mode 100644
index b4a0c0ec72..0000000000
--- a/frontend/public/locales/tr/section-members.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "add-member": "Üye Ekle",
- "org-members": "Kuruluş Üyeleri",
- "org-members-description": "Kuruluşunuzun üyelerini yönetin. Bu kullanıcılar daha sonra projelere yönlendirilebilir..",
- "search-members": "Üyeleri arayın...",
- "add-dialog": {
- "add-member-to-project": "Projenize bir üye ekleyin",
- "already-all-invited": "Kuruluşunuzdaki tüm kullanıcılar zaten davet edildi.",
- "add-user-org-first": "Önce kuruluşa daha fazla kullanıcı ekleyin.",
- "user-will-email": "Kullanıcı, talimatları içeren bir e-posta alacak.",
- "looking-add": "<0>Kuruluşunuza kullanıcı eklemek istiyorsanız,</0><1>buraya tıklayın</1>",
- "add-user-to-org": "Kuruluşa Kullanıcı Ekleyin"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/section-password.json b/frontend/public/locales/tr/section-password.json
deleted file mode 100644
index 07e26ba587..0000000000
--- a/frontend/public/locales/tr/section-password.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "password": "Şifre",
- "change": "Şifreyi değiştir",
- "current": "Mevcut şifre",
- "current-wrong": "Mevcut şifre yanlış olabilir",
- "new": "Yeni şifre",
- "validate-base": "Şifre en az şunları içermelidir:",
- "validate-length": "14 karakter",
- "validate-case": "1 küçük harf",
- "validate-number": "1 rakam"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/section-token.json b/frontend/public/locales/tr/section-token.json
deleted file mode 100644
index aceaba6dd0..0000000000
--- a/frontend/public/locales/tr/section-token.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "service-tokens": "Servis Belirteçleri",
- "service-tokens-description": "Her servis belirteci size, belirli bir projeye ve o proje içindeki belirli bir ortama özeldir.",
- "add-new": "Yeni Belirteç Ekle",
- "add-dialog": {
- "title": "{{target}} için bir servis belirteci ekleyin",
- "description": "Adı, ortamı ve son kullanma süresini belirtin. Bir belirteç oluşturulduğunda, onu kaybolmadan önce yalnızca bir kez görebileceksiniz. Bir yere kaydettiğinizden emin olun.",
- "name": "Servis Belirteci Adı",
- "add": "Servis Belirteci Ekle",
- "copy-service-token": "Service belirtecinizi kopyalayın",
- "copy-service-token-description": "Bu açılır pencereyi kapattığınızda, servis belirtecinizi bir daha asla göremeyeceksiniz"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/settings-members.json b/frontend/public/locales/tr/settings-members.json
deleted file mode 100644
index c4a7441b76..0000000000
--- a/frontend/public/locales/tr/settings-members.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Proje Üyeleri",
- "description": "Bu sayfa seçilen projenin üyelerini gösterir."
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/settings-org.json b/frontend/public/locales/tr/settings-org.json
deleted file mode 100644
index 3cc5c0d829..0000000000
--- a/frontend/public/locales/tr/settings-org.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "title": "Kuruluş Ayarları",
- "description": "Kuruluşunuzun üyelerini yönetin. Bu kullanıcılar daha sonra projelere yönlendirilebilir.."
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/settings-personal.json b/frontend/public/locales/tr/settings-personal.json
deleted file mode 100644
index 31c858efb6..0000000000
--- a/frontend/public/locales/tr/settings-personal.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title": "Kişisel Ayarlar",
- "description": "Kişisel bilgilerinizi burada görüntüleyin ve yönetin.",
- "emergency": {
- "name": "Acil Durum Kiti",
- "text1": "Acil Durum Kitiniz, Infisical hesabınızda oturum açmak için ihtiyaç duyacağınız bilgileri içerir.",
- "text2": "Yalnızca en son yayınlanan Acil Durum Kiti geçerliliğini korur. Yeni bir Acil Durum Kiti almak için parolanızı doğrulayın.",
- "download": "Acil Durum Kitini İndir"
- },
- "change-language": "Dili Değiştir",
- "api-keys": {
- "title": "API Anahtarları",
- "description": "Infisical API'ye erişmek için kişisel API Anahtarlarınızı yönetin",
- "add-new": "Ekle yeni"
- }
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/settings-project.json b/frontend/public/locales/tr/settings-project.json
deleted file mode 100644
index 41f9f30015..0000000000
--- a/frontend/public/locales/tr/settings-project.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "title": "Proje Ayarları",
- "description": "Bu ayarlar yalnızca mevcut seçili projeye uygulanacak.",
- "danger-zone": "Tehlikeli Bölge",
- "delete-project": "Projeyi Sil",
- "project-to-delete": "Silinmek Üzere Olan Proje",
- "danger-zone-note": "Bu projeyi sildiğiniz anda geri alamayacaksınız. Bu, tüm anahtarları hemen kaldıracaktır. Bunu hala yapmak istiyorsanız, lütfen aşağıya projenin adını girin.",
- "delete-project-note": "Not: Yalnızca birden fazla projeniz olması durumunda, bir projeyi silebilirsiniz.",
- "project-id-description": "Infisical'ı kod tabanınıza entegre etmek ve çevresel değişkenlerin otomatik enjeksiyonunu almak için aşağıdaki Proje Kimliğini kullanmalısınız.",
- "project-id-description2": "Çeşitli diller ve çerçeveler için kod parçaları da dahil olmak üzere daha fazla rehberlik için bkz.",
- "auto-generated": "Bu, projenizin otomatik olarak oluşturulan benzersiz tanımlayıcısıdır. Değiştirilemez..",
- "docs": "Infisical Dokümanları"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/signup.json b/frontend/public/locales/tr/signup.json
deleted file mode 100644
index 663b6b72b4..0000000000
--- a/frontend/public/locales/tr/signup.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "title": "Kayıt olun",
- "og-title": "Tek satır kodla .env dosyalarını değiştirin. 3 dakika içerinde Infisical'a kayıt olun.",
- "og-description": "Infisical takımların API anahtarlarını ve ortam değişkenlerini yönetmelerini ve senkronize etmelerini sağlayan basit, uçtan uca şifrelenmiş bir platformdur. Node.js, Next.js, Gatsby, Nest.js ve daha fazlası ile çalışır.",
- "signup": "Kayıt ol",
- "already-have-account": "Hesabın var mı? Giriş yap",
- "forgot-password": "Şifreni mi unuttun?",
- "verify": "Doğrula",
- "step1-start": "Hadi başlayalım",
- "step1-privacy": "Hesap oluşturarak, Şartlarımızı ve Gizlilik Politikasını okuyup kabul etmiş olursunuz.",
- "step1-submit": "Başla",
- "step2-message": "Şu adrese bir doğrulama maili yolladık",
- "step2-code-error": "Tüh. Kodun hatalı. Lütfen tekrar dene.",
- "step2-resend-alert": "Kodu ulaşamadı mı?",
- "step2-resend-submit": "Tekrar Yolla",
- "step2-resend-progress": "Tekrar yollanıyor...",
- "step2-spam-alert": "Spam kutunuzu kontrol ettiğinizden emin olun.",
- "step3-message": "Çok az kaldı!",
- "step4-message": "Acil Durum Kitinizi kayıt edin",
- "step4-description1": "Eğer hesabınıza erişemezseniz, Acil Durum Kitiniz giriş yapmanın tek yoludur.",
- "step4-description2": "Bunu indirmenizi ve güvenli bir ortamda saklamanızı öneriyoruz.",
- "step4-description3": "Kaybetmeniz durumunda bizim dahi erişemeyeceğimiz veya kurtaramayacağımız Gizli Anahtarınızı barındırır.",
- "step4-download": "PDF'yi indir",
- "step5-send-invites": "Davetleri yolla",
- "step5-invite-team": "Takımını davet et",
- "step5-subtitle": "Infisical takım arkadaşlarınız ile kullanılmak üzere yapılmıştır. Birlikte test etmek için onları davet edin.",
- "step5-skip": "Atla"
-}
\ No newline at end of file
diff --git a/frontend/public/locales/tr/translations.json b/frontend/public/locales/tr/translations.json
new file mode 100644
index 0000000000..7069984951
--- /dev/null
+++ b/frontend/public/locales/tr/translations.json
@@ -0,0 +1,317 @@
+{
+ "activity": {
+ "title": "Aktivite Günlükleri",
+ "subtitle": "Bu Infisical projesi için Olay Geçmişi.",
+ "event": {
+ "readSecrets": "Sırlar Görüntülendi",
+ "updateSecrets": "Sırlar Güncellendi",
+ "addSecrets": "Sırlar Eklendi",
+ "deleteSecrets": "Sırlar Silindi"
+ },
+ "ip-address": "IP Addresi"
+ },
+ "billing": {
+ "title": "Planlar & Fiyatlandırma",
+ "description": "Kuruluşunuzun aboneliğini buradan görüntüleyin ve yönetin",
+ "subscription": "Abonelik",
+ "starter": {
+ "name": "Başlangıç",
+ "price-explanation": "5 takım üyesine kadar",
+ "text": "5 kişiyle herhangi bir projeyi ücretsiz yönet!",
+ "subtext": "Sonrasında aylık her üye başına 5$."
+ },
+ "professional": {
+ "name": "Profesyonel",
+ "price-explanation": "/üye/ay",
+ "subtext": "Sınırsız miktarda üye ve proje dahildir.",
+ "text": "Anahtar yönetimine siz büyüdükçe ayak uydurun.."
+ },
+ "enterprise": {
+ "name": "Kurumsal",
+ "text": "Anahtar yönetimine siz büyüdükçe ayak uydurun."
+ },
+ "current-usage": "Mevcut Plan",
+ "free": "Ücretsiz",
+ "downgrade": "Düşürün",
+ "upgrade": "Yükseltin",
+ "learn-more": "Daha fazlasını öğrenim",
+ "custom-pricing": "Özel Fiyatlandırma",
+ "schedule-demo": "Bir Deneme Sürümü Planlayın "
+ },
+ "common": {
+ "head-title": "{{title}} | Infisical",
+ "error_project-already-exists": "Bu isimle bir proje zaten mevcut.",
+ "no-mobile": " Infisical'ı kullanmak için, lütfen daha büyük boyutlara sahip bir cihaz üzerinden giriş yapın. ",
+ "email": "Email",
+ "password": "Şifre",
+ "first-name": "Adınız",
+ "last-name": "Soyadınız",
+ "logout": "Çıkış Yap",
+ "validate-required": "Lütfen girin, sahip olduğunuz {{name}}",
+ "maintenance-alert": "Ufak teknik problemler yaşıyoruz. Sorunu çözmek üzere çalışıyoruz. Lütfen birkaç dakika içerisinde yeniden deneyin.",
+ "click-to-copy": "Kopyala",
+ "project-id": "Project ID",
+ "save-changes": "Değişiklikleri Kaydet",
+ "saved": "Kaydedildi",
+ "drop-zone": ".env yada .yaml dosyasını buraya sürükleyin",
+ "drop-zone-keys": "Daha çok anahatar eklemek için bir .env yada .yaml dosyasını sürükleyin.",
+ "role": "Rol",
+ "role_admin": "yönetici",
+ "display-name": "Ekran Adı",
+ "environment": "Environment",
+ "expired-in": "Süresi geçicek",
+ "language": "Dil",
+ "search": "Ara...",
+ "note": "Not",
+ "view-more": "Daha Fazla Göster",
+ "end-of-history": "Geçmişin Sonu",
+ "select-event": "Bir olay seçin",
+ "event": "Olay",
+ "user": "Kullanıcı",
+ "source": "Kaynak",
+ "time": "Zaman",
+ "timestamp": "Zaman Damgası"
+ },
+ "dashboard": {
+ "title": "Sırlar",
+ "og-title": "Saniyeler içerisinde .env dosyalarınızı yönetin",
+ "og-description": "Infisical takımların .env dosyalarını senkronize etmelerini ve yönetmelerini sağlayan uçtan uca şifrelenmiş basit bir platformdur",
+ "search-keys": "Anahtarları ara...",
+ "add-key": "Anahtar Ekle",
+ "personal": "Kişisel",
+ "personal-description": "Kişisel anahtarlar sadece sana görünür",
+ "shared": "Paylaşılan",
+ "shared-description": "Paylaşılan anahatarlar tüm takımına görünür",
+ "make-shared": "Paylaşılan Yap",
+ "make-personal": "Kişisel Yap",
+ "add-secret": "Yeni bir sır ekle",
+ "check-docs": {
+ "button": "Dokümanları Kontrol Et",
+ "title": "İyi iş!",
+ "line1": "Tebrikler, yeni anahtarlar eklediniz.",
+ "line2": "Bunları kendi Codebase' inize nasıl bağlarsınız, işte böyle."
+ },
+ "sidebar": {
+ "secret": "Sır",
+ "key": "Anahtar",
+ "value": "Değer",
+ "override": "Bu değerin üzerine bir kişisel değer yazın ",
+ "version-history": "Versiyon Geçmişi",
+ "comments": "Yorumlar & Notlar",
+ "personal-explanation": "Bu bir kişisel sır. Herhangi bir takım üyesi ile paylaşılmaz.",
+ "generate-random-hex": "Rastegele hex oluştur",
+ "digits": "basamak",
+ "delete-key-dialog": {
+ "title": "Anahtarı Sil",
+ "confirm-delete-message": "Bu sırrı silmek istediğinden emin misin? Bu işlem geri alınamaz."
+ }
+ }
+ },
+ "integrations": {
+ "title": "Proje Entegrasyonları",
+ "description": "Infisical'ın üçüncü taraf hizmetlerle olan entegrasyonlarınızı yönetin.",
+ "no-integrations1": "Henüz ayarlanmış bir entegrasyonunuz yok. Oluşturduğunuz zaman, burada görünecekler.",
+ "no-integrations2": "Başlamak için aşağıdaki seçeneklerden herhangi birine tıklayın. Sadece 5 tıklama ile kurulumu halledin.",
+ "available": "Platform & Cloud Entegrasyonları",
+ "available-text1": "Bağlanmak istediğiniz entegrasyona tıklayın. Bu, ortam değişkenlerinizin seçilen üçüncü taraf hizmetlere otomatik olarak akmasını sağlar.",
+ "available-text2": "Not: Heroku ile entegrasyon sırasında güvenlik nedenleriyle uçtan uca şifrelemenin sürdürülmesi mümkün değildir. Teorik olarak bu, Infisical'ın ortam değişkenlerinin şifresini çözmesine izin verir. Pratikte biz bunun asla yapılmayacağının garantisini verebiliriz ve bu durum sırlarınızı çevrimiçi kötü niyetlilerden korumamıza olanak tanır. Çekirdek Infisical hizmeti her zaman uçtan uca şifreli kalacaktır. Sorularınız için [email protected] adresine ulaşın.",
+ "cloud-integrations": "Cloud Entegrasyonları",
+ "framework-integrations": "Framework Entegrasyonları",
+ "click-to-start": "Sırlarınızı senkronize etmeye başlamak için bir entegrasyona tıklayın.",
+ "click-to-setup": "Kurulum talimatlarını almak için bir frameworke tıklayın.",
+ "grant-access-to-secrets": "Infisical'a sırlarınıza erişim izni verin",
+ "why-infisical-needs-access": "Çoğu cloud entegrasyonu, Infisical'ın sırlarınızı aktarabilmek için sırlarınızı deşifre etmesini gerektirir.",
+ "grant-access-button": "Erişim izni ver"
+ },
+ "login": {
+ "title": "Giriş Yap",
+ "og-title": "Infisical'a Giriş Yap",
+ "og-description": "Infisical ekiplerin .env dosyalarını senkronize etmelerini ve yönetmelerini sağlayan uçtan uca şifrelenmiş basit bir platformdur",
+ "login": "Giriş Yap",
+ "need-account": "Bir Infisical hesabına mı ihtiyacınız var?",
+ "create-account": "Hesap oluşturun",
+ "forgot-password": "Şifrenizi mi unuttunuz?",
+ "error-login": "Kimlik bilgileri yanlış."
+ },
+ "mfa": {
+ "title": "Kayıt olun",
+ "og-title": "Tek satır kodla .env dosyalarını değiştirin. 3 dakika içerinde Infisical'a kayıt olun.",
+ "og-description": "Infisical takımların API anahtarlarını ve ortam değişkenlerini yönetmelerini ve senkronize etmelerini sağlayan basit, uçtan uca şifrelenmiş bir platformdur. Node.js, Next.js, Gatsby, Nest.js ve daha fazlası ile çalışır.",
+ "signup": "Kayıt ol",
+ "already-have-account": "Hesabın var mı? Giriş yap",
+ "forgot-password": "Şifreni mi unuttun?",
+ "verify": "Doğrula",
+ "step1-start": "Hadi başlayalım",
+ "step1-privacy": "Hesap oluşturarak, Şartlarımızı ve Gizlilik Politikasını okuyup kabul etmiş olursunuz.",
+ "step1-submit": "Başla",
+ "step2-message": "Şu adrese bir doğrulama maili yolladık",
+ "step2-code-error": "Tüh. Kodun hatalı. Kalan denemeler:",
+ "step2-resend-alert": "Kodu ulaşamadı mı?",
+ "step2-resend-submit": "Tekrar Yolla",
+ "step2-resend-progress": "Tekrar yollanıyor...",
+ "step2-spam-alert": "Spam kutunuzu kontrol ettiğinizden emin olun.",
+ "step3-message": "Çok az kaldı!",
+ "step4-message": "Acil Durum Kitinizi kayıt edin",
+ "step4-description1": "Eğer hesabınıza erişemezseniz, Acil Durum Kitiniz giriş yapmanın tek yoludur.",
+ "step4-description2": "Bunu indirmenizi ve güvenli bir ortamda saklamanızı öneriyoruz.",
+ "step4-description3": "Kaybetmeniz durumunda bizim dahi erişemeyeceğimiz veya kurtaramayacağımız Gizli Anahtarınızı barındırır.",
+ "step4-download": "PDF'yi indir",
+ "step5-send-invites": "Davetleri yolla",
+ "step5-invite-team": "Takımını davet et",
+ "step5-subtitle": "Infisical takım arkadaşlarınız ile kullanılmak üzere yapılmıştır. Birlikte test etmek için onları davet edin.",
+ "step5-skip": "Atla"
+ },
+ "nav": {
+ "support": {
+ "slack": "[YENİ] Slack Foruma katılın",
+ "docs": "Dokümanları okuyun",
+ "issue": "Bir Github Issue açın",
+ "email": "Bize mail yollayın"
+ },
+ "user": {
+ "signed-in-as": "ŞU HESABA GİRİŞ YAPILDI",
+ "current-organization": "MEVZUT ORGANİZASYON",
+ "usage-billing": "Plan & Fiyatlandırma",
+ "invite": "Üyeleri Davet Et",
+ "other-organizations": "DİĞER ORGANİZASYONLAR"
+ },
+ "menu": {
+ "project": "PROJE",
+ "secrets": "Sırlar",
+ "members": "Üyeler",
+ "integrations": "Entegrasyonlar",
+ "project-settings": "Proje Ayarları"
+ }
+ },
+ "section": {
+ "api-key": {
+ "api-keys": "Servis Belirteçleri",
+ "api-keys-description": "Her servis belirteci size, belirli bir projeye ve o proje içindeki belirli bir ortama özeldir.",
+ "add-new": "Yeni Belirteç Ekleyin",
+ "add-dialog": {
+ "title": "Bir API Anahtarı Ekleyin",
+ "description": "Adını ve son kullanma süresini belirleyin. Bir API anahtarı oluşturulduğunda, kaybolmadan önce yalnızca bir kez görebileceksiniz. Bir yere kaydettiğinizden emin olun.",
+ "name": "API Anahtarı Adı",
+ "add": "API Anahtarı Ekleyin",
+ "copy-service-token": "API Anahtarızı kopyalayın",
+ "copy-service-token-description": "Bu açılır pencereyi kapattığınızda, API anahtarınızı bir daha asla görmeyeceksiniz"
+ }
+ },
+ "incident": {
+ "incident-contacts": "Özel Durum İletişim Adresleri",
+ "incident-contacts-description": "Bu adresler olası olmayan ciddi bir olay durumunda bilgilendirilecek.",
+ "no-incident-contacts": "Hiçbir Özel Durum İletişim Adresi bulunamadı.",
+ "add-contact": "İletişim Adresi Ekle",
+ "add-dialog": {
+ "title": "Bir Özel Durum İletişim Adresi Ekleyin",
+ "description": "Bu kişi, olası olmayan ciddi bir olay durumunda bilgilendirilecektir..",
+ "add-incident": "Özel Durum İletişim Adresi Ekle"
+ }
+ },
+ "members": {
+ "add-member": "Üye Ekle",
+ "org-members": "Kuruluş Üyeleri",
+ "org-members-description": "Kuruluşunuzun üyelerini yönetin. Bu kullanıcılar daha sonra projelere yönlendirilebilir..",
+ "search-members": "Üyeleri arayın...",
+ "add-dialog": {
+ "add-member-to-project": "Projenize bir üye ekleyin",
+ "already-all-invited": "Kuruluşunuzdaki tüm kullanıcılar zaten davet edildi.",
+ "add-user-org-first": "Önce kuruluşa daha fazla kullanıcı ekleyin.",
+ "user-will-email": "Kullanıcı, talimatları içeren bir e-posta alacak.",
+ "looking-add": "<0>Kuruluşunuza kullanıcı eklemek istiyorsanız,</0><1>buraya tıklayın</1>",
+ "add-user-to-org": "Kuruluşa Kullanıcı Ekleyin"
+ }
+ },
+ "password": {
+ "password": "Şifre",
+ "change": "Şifreyi değiştir",
+ "current": "Mevcut şifre",
+ "current-wrong": "Mevcut şifre yanlış olabilir",
+ "new": "Yeni şifre",
+ "validate-base": "Şifre en az şunları içermelidir:",
+ "validate-length": "14 karakter",
+ "validate-case": "1 küçük harf",
+ "validate-number": "1 rakam"
+ },
+ "token": {
+ "service-tokens": "Servis Belirteçleri",
+ "service-tokens-description": "Her servis belirteci size, belirli bir projeye ve o proje içindeki belirli bir ortama özeldir.",
+ "add-new": "Yeni Belirteç Ekle",
+ "add-dialog": {
+ "title": "{{target}} için bir servis belirteci ekleyin",
+ "description": "Adı, ortamı ve son kullanma süresini belirtin. Bir belirteç oluşturulduğunda, onu kaybolmadan önce yalnızca bir kez görebileceksiniz. Bir yere kaydettiğinizden emin olun.",
+ "name": "Servis Belirteci Adı",
+ "add": "Servis Belirteci Ekle",
+ "copy-service-token": "Service belirtecinizi kopyalayın",
+ "copy-service-token-description": "Bu açılır pencereyi kapattığınızda, servis belirtecinizi bir daha asla göremeyeceksiniz"
+ }
+ }
+ },
+ "settings": {
+ "members": {
+ "title": "Proje Üyeleri",
+ "description": "Bu sayfa seçilen projenin üyelerini gösterir."
+ },
+ "org": {
+ "title": "Kuruluş Ayarları",
+ "description": "Kuruluşunuzun üyelerini yönetin. Bu kullanıcılar daha sonra projelere yönlendirilebilir.."
+ },
+ "personal": {
+ "title": "Kişisel Ayarlar",
+ "description": "Kişisel bilgilerinizi burada görüntüleyin ve yönetin.",
+ "emergency": {
+ "name": "Acil Durum Kiti",
+ "text1": "Acil Durum Kitiniz, Infisical hesabınızda oturum açmak için ihtiyaç duyacağınız bilgileri içerir.",
+ "text2": "Yalnızca en son yayınlanan Acil Durum Kiti geçerliliğini korur. Yeni bir Acil Durum Kiti almak için parolanızı doğrulayın.",
+ "download": "Acil Durum Kitini İndir"
+ },
+ "change-language": "Dili Değiştir",
+ "api-keys": {
+ "title": "API Anahtarları",
+ "description": "Infisical API'ye erişmek için kişisel API Anahtarlarınızı yönetin",
+ "add-new": "Ekle yeni"
+ }
+ },
+ "project": {
+ "title": "Proje Ayarları",
+ "description": "Bu ayarlar yalnızca mevcut seçili projeye uygulanacak.",
+ "danger-zone": "Tehlikeli Bölge",
+ "delete-project": "Projeyi Sil",
+ "project-to-delete": "Silinmek Üzere Olan Proje",
+ "danger-zone-note": "Bu projeyi sildiğiniz anda geri alamayacaksınız. Bu, tüm anahtarları hemen kaldıracaktır. Bunu hala yapmak istiyorsanız, lütfen aşağıya projenin adını girin.",
+ "delete-project-note": "Not: Yalnızca birden fazla projeniz olması durumunda, bir projeyi silebilirsiniz.",
+ "project-id-description": "Infisical'ı kod tabanınıza entegre etmek ve çevresel değişkenlerin otomatik enjeksiyonunu almak için aşağıdaki Proje Kimliğini kullanmalısınız.",
+ "project-id-description2": "Çeşitli diller ve çerçeveler için kod parçaları da dahil olmak üzere daha fazla rehberlik için bkz.",
+ "auto-generated": "Bu, projenizin otomatik olarak oluşturulan benzersiz tanımlayıcısıdır. Değiştirilemez..",
+ "docs": "Infisical Dokümanları"
+ }
+ },
+ "signup": {
+ "title": "Kayıt olun",
+ "og-title": "Tek satır kodla .env dosyalarını değiştirin. 3 dakika içerinde Infisical'a kayıt olun.",
+ "og-description": "Infisical takımların API anahtarlarını ve ortam değişkenlerini yönetmelerini ve senkronize etmelerini sağlayan basit, uçtan uca şifrelenmiş bir platformdur. Node.js, Next.js, Gatsby, Nest.js ve daha fazlası ile çalışır.",
+ "signup": "Kayıt ol",
+ "already-have-account": "Hesabın var mı? Giriş yap",
+ "forgot-password": "Şifreni mi unuttun?",
+ "verify": "Doğrula",
+ "step1-start": "Hadi başlayalım",
+ "step1-privacy": "Hesap oluşturarak, Şartlarımızı ve Gizlilik Politikasını okuyup kabul etmiş olursunuz.",
+ "step1-submit": "Başla",
+ "step2-message": "Şu adrese bir doğrulama maili yolladık",
+ "step2-code-error": "Tüh. Kodun hatalı. Lütfen tekrar dene.",
+ "step2-resend-alert": "Kodu ulaşamadı mı?",
+ "step2-resend-submit": "Tekrar Yolla",
+ "step2-resend-progress": "Tekrar yollanıyor...",
+ "step2-spam-alert": "Spam kutunuzu kontrol ettiğinizden emin olun.",
+ "step3-message": "Çok az kaldı!",
+ "step4-message": "Acil Durum Kitinizi kayıt edin",
+ "step4-description1": "Eğer hesabınıza erişemezseniz, Acil Durum Kitiniz giriş yapmanın tek yoludur.",
+ "step4-description2": "Bunu indirmenizi ve güvenli bir ortamda saklamanızı öneriyoruz.",
+ "step4-description3": "Kaybetmeniz durumunda bizim dahi erişemeyeceğimiz veya kurtaramayacağımız Gizli Anahtarınızı barındırır.",
+ "step4-download": "PDF'yi indir",
+ "step5-send-invites": "Davetleri yolla",
+ "step5-invite-team": "Takımını davet et",
+ "step5-subtitle": "Infisical takım arkadaşlarınız ile kullanılmak üzere yapılmıştır. Birlikte test etmek için onları davet edin.",
+ "step5-skip": "Atla"
+ }
+}
diff --git a/frontend/src/components/basic/EventFilter.tsx b/frontend/src/components/basic/EventFilter.tsx
index 02a6705c61..7c3a9dc258 100644
--- a/frontend/src/components/basic/EventFilter.tsx
+++ b/frontend/src/components/basic/EventFilter.tsx
@@ -1,5 +1,5 @@
import React, { Fragment } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import {
faAngleDown,
faEye,
@@ -45,16 +45,16 @@ const EventFilter = ({ selected, select }: ListBoxProps): JSX.Element => {
const { t } = useTranslation();
return (
- <Listbox value={t(`activity:event.${selected}`)} onChange={select}>
+ <Listbox value={t(`activity.event.${selected}`)} onChange={select}>
<div className="relative">
- <Listbox.Button className="bg-mineshaft-800 hover:bg-mineshaft-700 duration-200 cursor-pointer rounded-md h-10 flex items-center justify-between pl-4 pr-2 w-52 text-bunker-200 text-sm">
+ <Listbox.Button className="flex h-10 w-52 cursor-pointer items-center justify-between rounded-md bg-mineshaft-800 pl-4 pr-2 text-sm text-bunker-200 duration-200 hover:bg-mineshaft-700">
{selected !== '' ? (
- <p className="select-none text-bunker-100">{t(`activity:event.${selected}`)}</p>
+ <p className="select-none text-bunker-100">{t(`activity.event.${selected}`)}</p>
) : (
- <p className="select-none">{String(t('common:select-event'))}</p>
+ <p className="select-none">{String(t('common.select-event'))}</p>
)}
{selected !== '' ? (
- <FontAwesomeIcon icon={faX} className="pl-2 w-2 p-2" onClick={() => select('')} />
+ <FontAwesomeIcon icon={faX} className="w-2 p-2 pl-2" onClick={() => select('')} />
) : (
<FontAwesomeIcon icon={faAngleDown} className="pl-4 pr-2" />
)}
@@ -65,12 +65,12 @@ const EventFilter = ({ selected, select }: ListBoxProps): JSX.Element => {
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
- <Listbox.Options className="border border-mineshaft-700 z-50 w-52 p-1 absolute mt-1 max-h-60 overflow-auto rounded-md bg-bunker text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
+ <Listbox.Options className="absolute z-50 mt-1 max-h-60 w-52 overflow-auto rounded-md border border-mineshaft-700 bg-bunker p-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
{eventOptions.map((event, id) => (
<Listbox.Option
key={`${event.name}.${id + 1}`}
- className={`px-4 h-10 flex items-center text-sm cursor-pointer hover:bg-mineshaft-700 text-bunker-200 rounded-md ${
- selected === t(`activity:event.${event.name}`) && 'bg-mineshaft-700'
+ className={`flex h-10 cursor-pointer items-center rounded-md px-4 text-sm text-bunker-200 hover:bg-mineshaft-700 ${
+ selected === t(`activity.event.${event.name}`) && 'bg-mineshaft-700'
}`}
value={event.name}
>
@@ -79,7 +79,7 @@ const EventFilter = ({ selected, select }: ListBoxProps): JSX.Element => {
className={`block truncate ${isSelected ? 'font-semibold' : 'font-normal'}`}
>
<FontAwesomeIcon icon={event.icon} className="pr-4" />{' '}
- {t(`activity:event.${event.name}`)}
+ {t(`activity.event.${event.name}`)}
</span>
)}
</Listbox.Option>
diff --git a/frontend/src/components/basic/Layout.tsx b/frontend/src/components/basic/Layout.tsx
index 4063df46ba..bc97c27cc4 100644
--- a/frontend/src/components/basic/Layout.tsx
+++ b/frontend/src/components/basic/Layout.tsx
@@ -4,9 +4,9 @@
import crypto from 'crypto';
import { useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Link from 'next/link';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import {
faBookOpen,
faFileLines,
@@ -147,17 +147,17 @@ const Layout = ({ children }: LayoutProps) => {
() => [
{
href: `/dashboard/${workspaceMapping[workspaceSelected as any]}`,
- title: t('nav:menu.secrets'),
+ title: t('nav.menu.secrets'),
emoji: <FontAwesomeIcon icon={faKey} />
},
{
href: `/users/${workspaceMapping[workspaceSelected as any]}`,
- title: t('nav:menu.members'),
+ title: t('nav.menu.members'),
emoji: <FontAwesomeIcon icon={faUser} />
},
{
href: `/integrations/${workspaceMapping[workspaceSelected as any]}`,
- title: t('nav:menu.integrations'),
+ title: t('nav.menu.integrations'),
emoji: <FontAwesomeIcon icon={faPlug} />
},
{
@@ -167,7 +167,7 @@ const Layout = ({ children }: LayoutProps) => {
},
{
href: `/settings/project/${workspaceMapping[workspaceSelected as any]}`,
- title: t('nav:menu.project-settings'),
+ title: t('nav.menu.project-settings'),
emoji: <FontAwesomeIcon icon={faGear} />
}
],
@@ -256,7 +256,7 @@ const Layout = ({ children }: LayoutProps) => {
<div>
<div className="mt-6 mb-6 flex h-20 w-full flex-col items-center justify-center bg-bunker-600 px-4">
<div className="ml-1 mb-1 self-start text-xs font-semibold tracking-wide text-gray-400">
- {t('nav:menu.project')}
+ {t('nav.menu.project')}
</div>
{Object.keys(workspaceMapping).length > 0 ? (
<Listbox
@@ -375,7 +375,7 @@ const Layout = ({ children }: LayoutProps) => {
<div className="flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 z-[200] md:hidden">
<FontAwesomeIcon icon={faMobile} className="mb-8 text-7xl text-gray-300" />
<p className="max-w-sm px-6 text-center text-lg text-gray-200">
- {` ${t('common:no-mobile')} `}
+ {` ${t('common.no-mobile')} `}
</p>
</div>
</>
diff --git a/frontend/src/components/basic/dialog/ActivateBotDialog.tsx b/frontend/src/components/basic/dialog/ActivateBotDialog.tsx
index 521053d92f..4f69f52968 100644
--- a/frontend/src/components/basic/dialog/ActivateBotDialog.tsx
+++ b/frontend/src/components/basic/dialog/ActivateBotDialog.tsx
@@ -1,5 +1,5 @@
import { Fragment } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { Dialog, Transition } from '@headlessui/react';
import Button from '../buttons/Button';
@@ -34,10 +34,9 @@ const ActivateBotDialog = ({
try {
// type check
if (!selectedIntegrationOption) return;
-
+
// start integration or probe for PAT
integrationOptionPress(selectedIntegrationOption);
-
} catch (err) {
console.log(err);
}
@@ -71,20 +70,20 @@ const ActivateBotDialog = ({
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
- <Dialog.Panel className="w-full max-w-md transform overflow-hidden rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all">
+ <Dialog.Panel className="w-full max-w-md transform overflow-hidden rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
<Dialog.Title as="h3" className="text-lg font-medium leading-6 text-gray-400">
- {t('integrations:grant-access-to-secrets')}
+ {t('integrations.grant-access-to-secrets')}
</Dialog.Title>
<div className="mt-2 mb-2">
<p className="text-sm text-gray-500">
- {t('integrations:why-infisical-needs-access')}
+ {t('integrations.why-infisical-needs-access')}
</p>
</div>
<div className="mt-6 max-w-max">
<Button
onButtonPressed={submit}
color="mineshaft"
- text={t('integrations:grant-access-button') as string}
+ text={t('integrations.grant-access-button') as string}
size="md"
/>
</div>
diff --git a/frontend/src/components/basic/dialog/AddApiKeyDialog.tsx b/frontend/src/components/basic/dialog/AddApiKeyDialog.tsx
index 67f0c1f1fa..5c2e262466 100644
--- a/frontend/src/components/basic/dialog/AddApiKeyDialog.tsx
+++ b/frontend/src/components/basic/dialog/AddApiKeyDialog.tsx
@@ -1,5 +1,5 @@
import { Fragment, useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faCheck, faCopy } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Dialog, Transition } from '@headlessui/react';
@@ -15,7 +15,7 @@ const expiryMapping = {
'7 days': 604800,
'1 month': 2592000,
'6 months': 15552000,
- '12 months': 31104000,
+ '12 months': 31104000
};
type Props = {
@@ -27,12 +27,7 @@ type Props = {
};
// TODO: convert to TS
-const AddApiKeyDialog = ({
- isOpen,
- closeModal,
- apiKeys,
- setApiKeys,
-}: Props) => {
+const AddApiKeyDialog = ({ isOpen, closeModal, apiKeys, setApiKeys }: Props) => {
const [apiKey, setApiKey] = useState('');
const [apiKeyName, setApiKeyName] = useState('');
const [apiKeyExpiresIn, setApiKeyExpiresIn] = useState('1 day');
@@ -42,7 +37,7 @@ const AddApiKeyDialog = ({
const generateAPIKey = async () => {
const newApiKey = await addAPIKey({
name: apiKeyName,
- expiresIn: expiryMapping[apiKeyExpiresIn as keyof typeof expiryMapping],
+ expiresIn: expiryMapping[apiKeyExpiresIn as keyof typeof expiryMapping]
});
setApiKeys([...apiKeys, newApiKey.apiKeyData]);
@@ -73,143 +68,130 @@ const AddApiKeyDialog = ({
};
return (
- <div className='z-50'>
+ <div className="z-50">
<Transition appear show={isOpen} as={Fragment}>
- <Dialog as='div' className='relative' onClose={closeModal}>
+ <Dialog as="div" className="relative" onClose={closeModal}>
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0'
- enterTo='opacity-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100'
- leaveTo='opacity-0'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0"
+ enterTo="opacity-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100"
+ leaveTo="opacity-0"
>
- <div className='fixed inset-0 bg-bunker-700 bg-opacity-80' />
+ <div className="fixed inset-0 bg-bunker-700 bg-opacity-80" />
</Transition.Child>
- <div className='fixed inset-0 overflow-y-auto'>
- <div className='flex min-h-full items-center justify-center p-4 text-center'>
+ <div className="fixed inset-0 overflow-y-auto">
+ <div className="flex min-h-full items-center justify-center p-4 text-center">
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0 scale-95'
- enterTo='opacity-100 scale-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100 scale-100'
- leaveTo='opacity-0 scale-95'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0 scale-95"
+ enterTo="opacity-100 scale-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100 scale-100"
+ leaveTo="opacity-0 scale-95"
>
{apiKey === '' ? (
- <Dialog.Panel className='w-full max-w-md transform rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all'>
+ <Dialog.Panel className="w-full max-w-md transform rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
<Dialog.Title
- as='h3'
- className='text-lg font-medium leading-6 text-gray-400 z-50'
+ as="h3"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-api-key:add-dialog.title')}
+ {t('section.api-key.add-dialog.title')}
</Dialog.Title>
- <div className='mt-2 mb-4'>
- <div className='flex flex-col'>
- <p className='text-sm text-gray-500'>
- {t('section-api-key:add-dialog.description')}
+ <div className="mt-2 mb-4">
+ <div className="flex flex-col">
+ <p className="text-sm text-gray-500">
+ {t('section.api-key.add-dialog.description')}
</p>
</div>
</div>
- <div className='max-h-28 mb-2'>
+ <div className="mb-2 max-h-28">
<InputField
- label={t('section-api-key:add-dialog.name')}
+ label={t('section.api-key.add-dialog.name')}
onChangeHandler={setApiKeyName}
- type='varName'
+ type="varName"
value={apiKeyName}
- placeholder=''
+ placeholder=""
isRequired
/>
</div>
- <div className='max-h-28'>
+ <div className="max-h-28">
<ListBox
isSelected={apiKeyExpiresIn}
onChange={setApiKeyExpiresIn}
- data={[
- '1 day',
- '7 days',
- '1 month',
- '6 months',
- '12 months',
- ]}
+ data={['1 day', '7 days', '1 month', '6 months', '12 months']}
isFull
- text={`${t('common:expired-in')}: `}
+ text={`${t('common.expired-in')}: `}
/>
</div>
- <div className='max-w-max'>
- <div className='mt-6 flex flex-col justify-start w-max'>
+ <div className="max-w-max">
+ <div className="mt-6 flex w-max flex-col justify-start">
<Button
onButtonPressed={() => generateAPIKey()}
- color='mineshaft'
- text={t('section-api-key:add-dialog.add') as string}
- textDisabled={
- t('section-api-key:add-dialog.add') as string
- }
- size='md'
+ color="mineshaft"
+ text={t('section.api-key.add-dialog.add') as string}
+ textDisabled={t('section.api-key.add-dialog.add') as string}
+ size="md"
active={apiKeyName !== ''}
/>
</div>
</div>
</Dialog.Panel>
) : (
- <Dialog.Panel className='w-full max-w-md transform rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all'>
+ <Dialog.Panel className="w-full max-w-md transform rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
<Dialog.Title
- as='h3'
- className='text-lg font-medium leading-6 text-gray-400 z-50'
+ as="h3"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-api-key:add-dialog.copy-service-token')}
+ {t('section.api-key.add-dialog.copy-service-token')}
</Dialog.Title>
- <div className='mt-2 mb-4'>
- <div className='flex flex-col'>
- <p className='text-sm text-gray-500'>
- {t(
- 'section-api-key:add-dialog.copy-service-token-description'
- )}
+ <div className="mt-2 mb-4">
+ <div className="flex flex-col">
+ <p className="text-sm text-gray-500">
+ {t('section.api-key.add-dialog.copy-service-token-description')}
</p>
</div>
</div>
- <div className='w-full'>
- <div className='flex justify-end items-center bg-white/[0.07] text-base mt-2 mr-2 rounded-md text-gray-400 w-full h-20'>
+ <div className="w-full">
+ <div className="mt-2 mr-2 flex h-20 w-full items-center justify-end rounded-md bg-white/[0.07] text-base text-gray-400">
<input
- type='text'
+ type="text"
value={apiKey}
disabled
- id='apiKey'
- className='invisible bg-white/0 text-gray-400 py-2 w-full px-2 min-w-full outline-none'
- />
- <div className='bg-white/0 max-w-md text-sm text-gray-400 py-2 w-full pl-14 pr-2 break-words outline-none'>
+ id="apiKey"
+ className="invisible w-full min-w-full bg-white/0 py-2 px-2 text-gray-400 outline-none"
+ />
+ <div className="w-full max-w-md break-words bg-white/0 py-2 pl-14 pr-2 text-sm text-gray-400 outline-none">
{apiKey}
</div>
- <div className='group font-normal h-full relative inline-block text-gray-400 underline hover:text-primary duration-200'>
+ <div className="group relative inline-block h-full font-normal text-gray-400 underline duration-200 hover:text-primary">
<button
type="button"
onClick={copyToClipboard}
- className='h-full pl-3.5 pr-4 border-l border-white/20 py-2 hover:bg-white/[0.12] duration-200'
+ className="h-full border-l border-white/20 py-2 pl-3.5 pr-4 duration-200 hover:bg-white/[0.12]"
>
{apiKeyCopied ? (
- <FontAwesomeIcon
- icon={faCheck}
- className='pr-0.5'
- />
+ <FontAwesomeIcon icon={faCheck} className="pr-0.5" />
) : (
<FontAwesomeIcon icon={faCopy} />
)}
</button>
- <span className='absolute hidden group-hover:flex group-hover:animate-popup duration-300 w-28 -left-8 -top-20 translate-y-full px-3 py-2 bg-chicago-900 rounded-md text-center text-gray-400 text-sm'>
- {t('common:click-to-copy')}
+ <span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-chicago-900 px-3 py-2 text-center text-sm text-gray-400 duration-300 group-hover:flex group-hover:animate-popup">
+ {t('common.click-to-copy')}
</span>
</div>
</div>
</div>
- <div className='mt-6 flex flex-col justify-start w-max'>
+ <div className="mt-6 flex w-max flex-col justify-start">
<Button
onButtonPressed={() => closeAddApiKeyModal()}
- color='mineshaft'
- text='Close'
- size='md'
+ color="mineshaft"
+ text="Close"
+ size="md"
/>
</div>
</Dialog.Panel>
diff --git a/frontend/src/components/basic/dialog/AddIncidentContactDialog.tsx b/frontend/src/components/basic/dialog/AddIncidentContactDialog.tsx
index dddcfa30f8..63535f2bef 100644
--- a/frontend/src/components/basic/dialog/AddIncidentContactDialog.tsx
+++ b/frontend/src/components/basic/dialog/AddIncidentContactDialog.tsx
@@ -1,5 +1,5 @@
import { Fragment, useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { Dialog, Transition } from '@headlessui/react';
import addIncidentContact from '@app/pages/api/organization/addIncidentContact';
@@ -18,7 +18,7 @@ const AddIncidentContactDialog = ({
isOpen,
closeModal,
incidentContacts,
- setIncidentContacts,
+ setIncidentContacts
}: Props) => {
const [incidentContactEmail, setIncidentContactEmail] = useState('');
const { t } = useTranslation();
@@ -29,69 +29,61 @@ const AddIncidentContactDialog = ({
? incidentContacts.concat([incidentContactEmail])
: [incidentContactEmail]
);
- addIncidentContact(
- localStorage.getItem('orgData.id') as string,
- incidentContactEmail
- );
+ addIncidentContact(localStorage.getItem('orgData.id') as string, incidentContactEmail);
closeModal();
};
return (
<div>
<Transition appear show={isOpen} as={Fragment}>
- <Dialog as='div' className='relative z-10' onClose={closeModal}>
+ <Dialog as="div" className="relative z-10" onClose={closeModal}>
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0'
- enterTo='opacity-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100'
- leaveTo='opacity-0'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0"
+ enterTo="opacity-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100"
+ leaveTo="opacity-0"
>
- <div className='fixed inset-0 bg-black bg-opacity-70' />
+ <div className="fixed inset-0 bg-black bg-opacity-70" />
</Transition.Child>
- <div className='fixed inset-0 overflow-y-auto'>
- <div className='flex min-h-full items-center justify-center p-4 text-center'>
+ <div className="fixed inset-0 overflow-y-auto">
+ <div className="flex min-h-full items-center justify-center p-4 text-center">
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0 scale-95'
- enterTo='opacity-100 scale-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100 scale-100'
- leaveTo='opacity-0 scale-95'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0 scale-95"
+ enterTo="opacity-100 scale-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100 scale-100"
+ leaveTo="opacity-0 scale-95"
>
- <Dialog.Panel className='w-full max-w-md transform overflow-hidden rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all'>
- <Dialog.Title
- as='h3'
- className='text-lg font-medium leading-6 text-gray-400'
- >
- {t('section-incident:add-dialog.title')}
+ <Dialog.Panel className="w-full max-w-md transform overflow-hidden rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
+ <Dialog.Title as="h3" className="text-lg font-medium leading-6 text-gray-400">
+ {t('section.incident.add-dialog.title')}
</Dialog.Title>
- <div className='mt-2 mb-2'>
- <p className='text-sm text-gray-500'>
- {t('section-incident:add-dialog.description')}
+ <div className="mt-2 mb-2">
+ <p className="text-sm text-gray-500">
+ {t('section.incident.add-dialog.description')}
</p>
</div>
- <div className='max-h-28'>
+ <div className="max-h-28">
<InputField
- label={t('common:email')}
+ label={t('common.email')}
onChangeHandler={setIncidentContactEmail}
- type='varName'
+ type="varName"
value={incidentContactEmail}
- placeholder=''
+ placeholder=""
isRequired
/>
</div>
- <div className='mt-6 max-w-max'>
+ <div className="mt-6 max-w-max">
<Button
onButtonPressed={submit}
- color='mineshaft'
- text={
- t('section-incident:add-dialog.add-incident') as string
- }
- size='md'
+ color="mineshaft"
+ text={t('section.incident.add-dialog.add-incident') as string}
+ size="md"
/>
</div>
</Dialog.Panel>
diff --git a/frontend/src/components/basic/dialog/AddProjectMemberDialog.tsx b/frontend/src/components/basic/dialog/AddProjectMemberDialog.tsx
index 43b55cd25e..ec3f1a9f52 100644
--- a/frontend/src/components/basic/dialog/AddProjectMemberDialog.tsx
+++ b/frontend/src/components/basic/dialog/AddProjectMemberDialog.tsx
@@ -1,6 +1,6 @@
import { Fragment } from 'react';
+import { Trans, useTranslation } from 'react-i18next';
import { useRouter } from 'next/router';
-import { Trans, useTranslation } from 'next-i18next';
import { Dialog, Transition } from '@headlessui/react';
import Button from '../buttons/Button';
@@ -21,7 +21,7 @@ const AddProjectMemberDialog = ({
submitModal,
data,
email,
- setEmail,
+ setEmail
}: Props) => {
const router = useRouter();
const { t } = useTranslation();
@@ -53,31 +53,31 @@ const AddProjectMemberDialog = ({
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
- <Dialog.Panel className="w-full max-w-md transform rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all">
+ <Dialog.Panel className="w-full max-w-md transform rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
{data?.length > 0 ? (
<Dialog.Title
as="h3"
- className="text-lg font-medium leading-6 text-gray-400 z-50"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-members:add-dialog.add-member-to-project')}
+ {t('section.members.add-dialog.add-member-to-project')}
</Dialog.Title>
) : (
<Dialog.Title
as="h3"
- className="text-lg font-medium leading-6 text-gray-400 z-50"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-members:add-dialog.already-all-invited')}
+ {t('section.members.add-dialog.already-all-invited')}
</Dialog.Title>
)}
<div className="mt-2 mb-4">
{data?.length > 0 ? (
<div className="flex flex-col">
<p className="text-sm text-gray-500">
- {t('section-members:add-dialog.user-will-email')}
+ {t('section.members.add-dialog.user-will-email')}
</p>
<div className="">
<Trans
- i18nKey="section-members:add-dialog.looking-add"
+ i18nKey="section.members.add-dialog.looking-add"
components={[
// eslint-disable-next-line react/jsx-key
<button
@@ -101,22 +101,27 @@ const AddProjectMemberDialog = ({
</div>
) : (
<p className="text-sm text-gray-500">
- {t('section-members:add-dialog.add-user-org-first')}
+ {t('section.members.add-dialog.add-user-org-first')}
</p>
)}
</div>
<div className="max-h-28">
{data?.length > 0 && (
- <ListBox isSelected={email || data[0]} onChange={setEmail} data={data} isFull />
+ <ListBox
+ isSelected={email || data[0]}
+ onChange={setEmail}
+ data={data}
+ isFull
+ />
)}
</div>
<div className="max-w-max">
{data?.length > 0 ? (
- <div className="mt-6 flex flex-col justify-start w-max">
+ <div className="mt-6 flex w-max flex-col justify-start">
<Button
onButtonPressed={submitModal}
color="mineshaft"
- text={t('section-members:add-member') as string}
+ text={t('section.members.add-member') as string}
size="md"
/>
</div>
@@ -124,7 +129,7 @@ const AddProjectMemberDialog = ({
<Button
onButtonPressed={() => router.push(`/settings/org/${router.query.id}`)}
color="mineshaft"
- text={t('section-members:add-dialog.add-user-to-org') as string}
+ text={t('section.members.add-dialog.add-user-to-org') as string}
size="md"
/>
)}
diff --git a/frontend/src/components/basic/dialog/AddServiceTokenDialog.tsx b/frontend/src/components/basic/dialog/AddServiceTokenDialog.tsx
index d2126b3e74..0adb066f96 100644
--- a/frontend/src/components/basic/dialog/AddServiceTokenDialog.tsx
+++ b/frontend/src/components/basic/dialog/AddServiceTokenDialog.tsx
@@ -1,7 +1,7 @@
import crypto from 'crypto';
import { Fragment, useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faCheck, faCopy } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Dialog, Transition } from '@headlessui/react';
@@ -9,10 +9,7 @@ import { Dialog, Transition } from '@headlessui/react';
import addServiceToken from '@app/pages/api/serviceToken/addServiceToken';
import getLatestFileKey from '@app/pages/api/workspace/getLatestFileKey';
-import {
- decryptAssymmetric,
- encryptSymmetric,
-} from '../../utilities/cryptography/crypto';
+import { decryptAssymmetric, encryptSymmetric } from '../../utilities/cryptography/crypto';
import Button from '../buttons/Button';
import InputField from '../InputField';
import ListBox from '../Listbox';
@@ -22,7 +19,7 @@ const expiryMapping = {
'7 days': 604800,
'1 month': 2592000,
'6 months': 15552000,
- '12 months': 31104000,
+ '12 months': 31104000
};
type Props = {
@@ -42,13 +39,11 @@ const AddServiceTokenDialog = ({
workspaceName,
serviceTokens,
environments,
- setServiceTokens,
+ setServiceTokens
}: Props) => {
const [serviceToken, setServiceToken] = useState('');
const [serviceTokenName, setServiceTokenName] = useState('');
- const [selectedServiceTokenEnv, setSelectedServiceTokenEnv] = useState(
- environments?.[0]
- );
+ const [selectedServiceTokenEnv, setSelectedServiceTokenEnv] = useState(environments?.[0]);
const [serviceTokenExpiresIn, setServiceTokenExpiresIn] = useState('1 day');
const [serviceTokenCopied, setServiceTokenCopied] = useState(false);
const { t } = useTranslation();
@@ -60,40 +55,40 @@ const AddServiceTokenDialog = ({
ciphertext: latestFileKey.latestKey.encryptedKey,
nonce: latestFileKey.latestKey.nonce,
publicKey: latestFileKey.latestKey.sender.publicKey,
- privateKey: localStorage.getItem('PRIVATE_KEY') as string,
+ privateKey: localStorage.getItem('PRIVATE_KEY') as string
});
const randomBytes = crypto.randomBytes(16).toString('hex');
const { ciphertext, iv, tag } = encryptSymmetric({
plaintext: key,
- key: randomBytes,
+ key: randomBytes
});
-
- console.log(1234, selectedServiceTokenEnv, environments, selectedServiceTokenEnv?.slug
- ? selectedServiceTokenEnv.slug
- : environments[0]?.slug)
+
+ console.log(
+ 1234,
+ selectedServiceTokenEnv,
+ environments,
+ selectedServiceTokenEnv?.slug ? selectedServiceTokenEnv.slug : environments[0]?.slug
+ );
const newServiceToken = await addServiceToken({
name: serviceTokenName,
workspaceId,
environment: selectedServiceTokenEnv?.slug
? selectedServiceTokenEnv.slug
: environments[0]?.slug,
- expiresIn:
- expiryMapping[serviceTokenExpiresIn as keyof typeof expiryMapping],
+ expiresIn: expiryMapping[serviceTokenExpiresIn as keyof typeof expiryMapping],
encryptedKey: ciphertext,
iv,
- tag,
+ tag
});
setServiceTokens(serviceTokens.concat([newServiceToken.serviceTokenData]));
- setServiceToken(`${newServiceToken.serviceToken }.${ randomBytes}`);
+ setServiceToken(`${newServiceToken.serviceToken}.${randomBytes}`);
};
function copyToClipboard() {
// Get the text field
- const copyText = document.getElementById(
- 'serviceToken'
- ) as HTMLInputElement;
+ const copyText = document.getElementById('serviceToken') as HTMLInputElement;
// Select the text field
copyText.select();
@@ -115,60 +110,60 @@ const AddServiceTokenDialog = ({
};
return (
- <div className='z-50'>
+ <div className="z-50">
<Transition appear show={isOpen} as={Fragment}>
- <Dialog as='div' className='relative' onClose={closeModal}>
+ <Dialog as="div" className="relative" onClose={closeModal}>
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0'
- enterTo='opacity-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100'
- leaveTo='opacity-0'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0"
+ enterTo="opacity-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100"
+ leaveTo="opacity-0"
>
- <div className='fixed inset-0 bg-bunker-700 bg-opacity-80' />
+ <div className="fixed inset-0 bg-bunker-700 bg-opacity-80" />
</Transition.Child>
- <div className='fixed inset-0 overflow-y-auto'>
- <div className='flex min-h-full items-center justify-center p-4 text-center'>
+ <div className="fixed inset-0 overflow-y-auto">
+ <div className="flex min-h-full items-center justify-center p-4 text-center">
<Transition.Child
as={Fragment}
- enter='ease-out duration-300'
- enterFrom='opacity-0 scale-95'
- enterTo='opacity-100 scale-100'
- leave='ease-in duration-200'
- leaveFrom='opacity-100 scale-100'
- leaveTo='opacity-0 scale-95'
+ enter="ease-out duration-300"
+ enterFrom="opacity-0 scale-95"
+ enterTo="opacity-100 scale-100"
+ leave="ease-in duration-200"
+ leaveFrom="opacity-100 scale-100"
+ leaveTo="opacity-0 scale-95"
>
{serviceToken === '' ? (
- <Dialog.Panel className='w-full max-w-md transform rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all'>
+ <Dialog.Panel className="w-full max-w-md transform rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
<Dialog.Title
- as='h3'
- className='text-lg font-medium leading-6 text-gray-400 z-50'
+ as="h3"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-token:add-dialog.title', {
- target: workspaceName,
+ {t('section.token.add-dialog.title', {
+ target: workspaceName
})}
</Dialog.Title>
- <div className='mt-2 mb-4'>
- <div className='flex flex-col'>
- <p className='text-sm text-gray-500'>
- {t('section-token:add-dialog.description')}
+ <div className="mt-2 mb-4">
+ <div className="flex flex-col">
+ <p className="text-sm text-gray-500">
+ {t('section.token.add-dialog.description')}
</p>
</div>
</div>
- <div className='max-h-28 mb-2'>
+ <div className="mb-2 max-h-28">
<InputField
- label={t('section-token:add-dialog.name')}
+ label={t('section.token.add-dialog.name')}
onChangeHandler={setServiceTokenName}
- type='varName'
+ type="varName"
value={serviceTokenName}
- placeholder=''
+ placeholder=""
isRequired
/>
</div>
- <div className='max-h-28 mb-2'>
+ <div className="mb-2 max-h-28">
<ListBox
isSelected={
selectedServiceTokenEnv?.name
@@ -178,103 +173,88 @@ const AddServiceTokenDialog = ({
data={environments.map(({ name }) => name)}
onChange={(envName) =>
setSelectedServiceTokenEnv(
- environments.find(
- ({ name }) => envName === name
- ) || {
+ environments.find(({ name }) => envName === name) || {
name: 'unknown',
- slug: 'unknown',
+ slug: 'unknown'
}
)
}
isFull
- text={`${t('common:environment')}: `}
+ text={`${t('common.environment')}: `}
/>
</div>
- <div className='max-h-28'>
+ <div className="max-h-28">
<ListBox
isSelected={serviceTokenExpiresIn}
onChange={setServiceTokenExpiresIn}
- data={[
- '1 day',
- '7 days',
- '1 month',
- '6 months',
- '12 months',
- ]}
+ data={['1 day', '7 days', '1 month', '6 months', '12 months']}
isFull
- text={`${t('common:expired-in')}: `}
+ text={`${t('common.expired-in')}: `}
/>
</div>
- <div className='max-w-max'>
- <div className='mt-6 flex flex-col justify-start w-max'>
+ <div className="max-w-max">
+ <div className="mt-6 flex w-max flex-col justify-start">
<Button
onButtonPressed={() => generateServiceToken()}
- color='mineshaft'
- text={t('section-token:add-dialog.add') as string}
- textDisabled={
- t('section-token:add-dialog.add') as string
- }
- size='md'
+ color="mineshaft"
+ text={t('section.token.add-dialog.add') as string}
+ textDisabled={t('section.token.add-dialog.add') as string}
+ size="md"
active={serviceTokenName !== ''}
/>
</div>
</div>
</Dialog.Panel>
) : (
- <Dialog.Panel className='w-full max-w-md transform rounded-md bg-bunker-800 border border-gray-700 p-6 text-left align-middle shadow-xl transition-all'>
+ <Dialog.Panel className="w-full max-w-md transform rounded-md border border-gray-700 bg-bunker-800 p-6 text-left align-middle shadow-xl transition-all">
<Dialog.Title
- as='h3'
- className='text-lg font-medium leading-6 text-gray-400 z-50'
+ as="h3"
+ className="z-50 text-lg font-medium leading-6 text-gray-400"
>
- {t('section-token:add-dialog.copy-service-token')}
+ {t('section.token.add-dialog.copy-service-token')}
</Dialog.Title>
- <div className='mt-2 mb-4'>
- <div className='flex flex-col'>
- <p className='text-sm text-gray-500'>
- {t(
- 'section-token:add-dialog.copy-service-token-description'
- )}
+ <div className="mt-2 mb-4">
+ <div className="flex flex-col">
+ <p className="text-sm text-gray-500">
+ {t('section.token.add-dialog.copy-service-token-description')}
</p>
</div>
</div>
- <div className='w-full'>
- <div className='flex justify-end items-center bg-white/[0.07] text-base mt-2 mr-2 rounded-md text-gray-400 w-full h-20'>
+ <div className="w-full">
+ <div className="mt-2 mr-2 flex h-20 w-full items-center justify-end rounded-md bg-white/[0.07] text-base text-gray-400">
<input
- type='text'
+ type="text"
value={serviceToken}
- id='serviceToken'
- className='invisible bg-white/0 text-gray-400 py-2 w-full px-2 min-w-full outline-none'
- />
- <div className='bg-white/0 max-w-md text-sm text-gray-400 py-2 w-full pl-14 pr-2 break-words outline-none'>
+ id="serviceToken"
+ className="invisible w-full min-w-full bg-white/0 py-2 px-2 text-gray-400 outline-none"
+ />
+ <div className="w-full max-w-md break-words bg-white/0 py-2 pl-14 pr-2 text-sm text-gray-400 outline-none">
{serviceToken}
</div>
- <div className='group font-normal h-full relative inline-block text-gray-400 underline hover:text-primary duration-200'>
+ <div className="group relative inline-block h-full font-normal text-gray-400 underline duration-200 hover:text-primary">
<button
onClick={copyToClipboard}
type="button"
- className='h-full pl-3.5 pr-4 border-l border-white/20 py-2 hover:bg-white/[0.12] duration-200'
+ className="h-full border-l border-white/20 py-2 pl-3.5 pr-4 duration-200 hover:bg-white/[0.12]"
>
{serviceTokenCopied ? (
- <FontAwesomeIcon
- icon={faCheck}
- className='pr-0.5'
- />
+ <FontAwesomeIcon icon={faCheck} className="pr-0.5" />
) : (
<FontAwesomeIcon icon={faCopy} />
)}
</button>
- <span className='absolute hidden group-hover:flex group-hover:animate-popup duration-300 w-28 -left-8 -top-20 translate-y-full px-3 py-2 bg-chicago-900 rounded-md text-center text-gray-400 text-sm'>
- {t('common:click-to-copy')}
+ <span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-chicago-900 px-3 py-2 text-center text-sm text-gray-400 duration-300 group-hover:flex group-hover:animate-popup">
+ {t('common.click-to-copy')}
</span>
</div>
</div>
</div>
- <div className='mt-6 flex flex-col justify-start w-max'>
+ <div className="mt-6 flex w-max flex-col justify-start">
<Button
onButtonPressed={() => closeAddServiceTokenModal()}
- color='mineshaft'
- text='Close'
- size='md'
+ color="mineshaft"
+ text="Close"
+ size="md"
/>
</div>
</Dialog.Panel>
diff --git a/frontend/src/components/dashboard/CommentField.tsx b/frontend/src/components/dashboard/CommentField.tsx
index 3308fdf1be..cd1ebc5ce7 100644
--- a/frontend/src/components/dashboard/CommentField.tsx
+++ b/frontend/src/components/dashboard/CommentField.tsx
@@ -1,4 +1,4 @@
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
/**
* This is the text field where people can add comments to particular secrets.
@@ -16,9 +16,9 @@ const CommentField = ({
return (
<div className="relative mt-4 px-4 pt-6">
- <p className="text-sm text-bunker-300 pl-0.5">{t('dashboard:sidebar.comments')}</p>
+ <p className="pl-0.5 text-sm text-bunker-300">{t('dashboard.sidebar.comments')}</p>
<textarea
- className="placeholder:text-bunker-400 dark:[color-scheme:dark] h-32 w-full bg-bunker-800 px-2 py-1.5 rounded-md border border-mineshaft-500 text-sm text-bunker-300 outline-none focus:ring-2 ring-primary-800 ring-opacity-70"
+ className="h-32 w-full rounded-md border border-mineshaft-500 bg-bunker-800 px-2 py-1.5 text-sm text-bunker-300 outline-none ring-primary-800 ring-opacity-70 placeholder:text-bunker-400 focus:ring-2 dark:[color-scheme:dark]"
value={comment}
onChange={(e) => modifyComment(e.target.value, id)}
placeholder="Leave any comments here..."
diff --git a/frontend/src/components/dashboard/DropZone.tsx b/frontend/src/components/dashboard/DropZone.tsx
index be13d28c0b..839e9c0bdb 100644
--- a/frontend/src/components/dashboard/DropZone.tsx
+++ b/frontend/src/components/dashboard/DropZone.tsx
@@ -1,7 +1,7 @@
/* eslint-disable no-nested-ternary */
import { type ChangeEvent, type DragEvent, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
-import { useTranslation } from 'next-i18next';
import { faUpload } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { parseDocument, Scalar, YAMLMap } from 'yaml';
@@ -148,7 +148,7 @@ const DropZone = ({
setData(newData);
setButtonReady(true);
} catch (error) {
- console.log("Error while dropping the file: ", error)
+ console.log('Error while dropping the file: ', error);
}
};
@@ -181,12 +181,12 @@ const DropZone = ({
};
return loading ? (
- <div className="flex items-center justify-center pt-16 mb-16">
+ <div className="mb-16 flex items-center justify-center pt-16">
<Image src="/images/loading/loading.gif" height={70} width={120} alt="google logo" />
</div>
) : keysExist ? (
<div
- className="opacity-60 hover:opacity-100 duration-200 relative bg-mineshaft-900 max-w-[calc(100%-1rem)] w-full outline-dashed outline-chicago-600 rounded-md outline-2 flex flex-col items-center justify-center mb-4 mx-auto mt-1 py-8 px-2"
+ className="relative mx-auto mb-4 mt-1 flex w-full max-w-[calc(100%-1rem)] flex-col items-center justify-center rounded-md bg-mineshaft-900 py-8 px-2 opacity-60 outline-dashed outline-2 outline-chicago-600 duration-200 hover:opacity-100"
onDragEnter={handleDragEnter}
onDragOver={handleDragOver}
onDragLeave={handleDragLeave}
@@ -195,14 +195,14 @@ const DropZone = ({
<input
id="fileSelect"
type="file"
- className="opacity-0 absolute w-full h-full"
+ className="absolute h-full w-full opacity-0"
accept=""
onChange={handleFileSelect}
/>
{errorDragAndDrop ? <div className="my-3 max-w-xl opacity-80" /> : <div className="" />}
<div className="flex flex-row">
- <FontAwesomeIcon icon={faUpload} className="text-bunker-300 text-3xl mr-6" />
- <p className="text-bunker-300 mt-1">{t('common:drop-zone-keys')}</p>
+ <FontAwesomeIcon icon={faUpload} className="mr-6 text-3xl text-bunker-300" />
+ <p className="mt-1 text-bunker-300">{t('common.drop-zone-keys')}</p>
</div>
{errorDragAndDrop && (
<div className="mt-8 max-w-xl opacity-80">
@@ -212,30 +212,30 @@ const DropZone = ({
</div>
) : (
<div
- className="opacity-80 hover:opacity-100 duration-200 relative bg-bunker 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"
+ className="relative mb-16 flex w-full max-w-2xl flex-col items-center justify-center rounded-md bg-bunker px-4 pt-16 opacity-80 outline-dashed outline-2 outline-gray-700 duration-200 hover:opacity-100"
onDragEnter={handleDragEnter}
onDragOver={handleDragOver}
onDragLeave={handleDragLeave}
onDrop={handleDrop}
>
- <FontAwesomeIcon icon={faUpload} className="text-7xl mb-8" />
- <p className="">{t('common:drop-zone')}</p>
+ <FontAwesomeIcon icon={faUpload} className="mb-8 text-7xl" />
+ <p className="">{t('common.drop-zone')}</p>
<input
id="fileSelect"
type="file"
- className="opacity-0 absolute w-full h-full"
+ className="absolute h-full w-full opacity-0"
accept=".txt,.env,.yml"
onChange={handleFileSelect}
/>
- <div className="flex flex-row w-full items-center justify-center mb-6 mt-5">
- <div className="border-t border-gray-700 w-1/5" />
- <p className="text-gray-400 text-xs mx-4">OR</p>
- <div className="border-t border-gray-700 w-1/5" />
+ <div className="mb-6 mt-5 flex w-full flex-row items-center justify-center">
+ <div className="w-1/5 border-t border-gray-700" />
+ <p className="mx-4 text-xs text-gray-400">OR</p>
+ <div className="w-1/5 border-t border-gray-700" />
</div>
<div className="z-10 mb-6">
<Button
color="mineshaft"
- text={String(t('dashboard:add-secret'))}
+ text={String(t('dashboard.add-secret'))}
onButtonPressed={createNewFile}
size="md"
/>
diff --git a/frontend/src/components/dashboard/GenerateSecretMenu.tsx b/frontend/src/components/dashboard/GenerateSecretMenu.tsx
index 07926ab4f7..fa8a0f4bfb 100644
--- a/frontend/src/components/dashboard/GenerateSecretMenu.tsx
+++ b/frontend/src/components/dashboard/GenerateSecretMenu.tsx
@@ -1,5 +1,5 @@
import { Fragment, useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faShuffle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Menu, Transition } from '@headlessui/react';
@@ -21,8 +21,8 @@ const GenerateSecretMenu = ({
return (
<Menu as="div" className="relative inline-block text-left">
<div>
- <Menu.Button className="inline-flex w-full justify-center text-sm font-medium text-gray-200 rounded-md hover:bg-white/10 duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75">
- <div className="py-1 px-2 rounded-md bg-bunker-800 hover:bg-bunker-500">
+ <Menu.Button className="inline-flex w-full justify-center rounded-md text-sm font-medium text-gray-200 duration-200 hover:bg-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75">
+ <div className="rounded-md bg-bunker-800 py-1 px-2 hover:bg-bunker-500">
<FontAwesomeIcon icon={faShuffle} className="text-bunker-300" />
</div>
</Menu.Button>
@@ -36,7 +36,7 @@ const GenerateSecretMenu = ({
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
- <Menu.Items className="absolute z-50 drop-shadow-xl right-0 mt-0.5 w-[20rem] origin-top-right rounded-md bg-bunker border border-mineshaft-500 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none px-1 py-1">
+ <Menu.Items className="absolute right-0 z-50 mt-0.5 w-[20rem] origin-top-right rounded-md border border-mineshaft-500 bg-bunker px-1 py-1 shadow-lg ring-1 ring-black ring-opacity-5 drop-shadow-xl focus:outline-none">
<div
onKeyDown={() => null}
role="button"
@@ -55,20 +55,20 @@ const GenerateSecretMenu = ({
);
}
}}
- className="relative flex flex-row 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"
+ className="relative flex w-full cursor-pointer select-none flex-row items-center justify-start rounded-md py-2 px-2 text-gray-400 duration-200 hover:bg-white/10 hover:text-gray-200"
>
- <FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faShuffle} />
- <div className="text-sm justify-between flex flex-row w-full">
- <p>{t('dashboard:sidebar.generate-random-hex')}</p>
- <p>{t('dashboard:sidebar.digits')}</p>
+ <FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faShuffle} />
+ <div className="flex w-full flex-row justify-between text-sm">
+ <p>{t('dashboard.sidebar.generate-random-hex')}</p>
+ <p>{t('dashboard.sidebar.digits')}</p>
</div>
</div>
- <div className="flex flex-row absolute bottom-[0.4rem] right-[3.3rem] w-16 bg-bunker-800 border border-chicago-700 rounded-md text-bunker-200 ">
+ <div className="absolute bottom-[0.4rem] right-[3.3rem] flex w-16 flex-row rounded-md border border-chicago-700 bg-bunker-800 text-bunker-200 ">
<div
onKeyDown={() => null}
role="button"
tabIndex={0}
- className="m-0.5 px-1 cursor-pointer rounded-md hover:bg-chicago-700"
+ className="m-0.5 cursor-pointer rounded-md px-1 hover:bg-chicago-700"
onClick={() => {
if (randomStringLength > 1) {
setRandomStringLength(randomStringLength - 1);
@@ -80,14 +80,14 @@ const GenerateSecretMenu = ({
<input
onChange={(e) => setRandomStringLength(parseInt(e.target.value, 10))}
value={randomStringLength}
- className="text-center z-20 peer text-sm bg-transparent w-full outline-none"
+ className="peer z-20 w-full bg-transparent text-center text-sm outline-none"
spellCheck="false"
/>
<div
onKeyDown={() => null}
role="button"
tabIndex={0}
- className="m-0.5 px-1 pb-0.5 cursor-pointer rounded-md hover:bg-chicago-700"
+ className="m-0.5 cursor-pointer rounded-md px-1 pb-0.5 hover:bg-chicago-700"
onClick={() => {
if (randomStringLength < 32) {
setRandomStringLength(randomStringLength + 1);
diff --git a/frontend/src/components/dashboard/SideBar.tsx b/frontend/src/components/dashboard/SideBar.tsx
index 6997bb0e03..e939363dd2 100644
--- a/frontend/src/components/dashboard/SideBar.tsx
+++ b/frontend/src/components/dashboard/SideBar.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unused-prop-types */
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
-import { useTranslation } from 'next-i18next';
import { faXmark } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -80,9 +80,9 @@ const SideBar = ({
const { t } = useTranslation();
return (
- <div className="absolute border-l border-mineshaft-500 bg-bunker h-full w-full min-w-sm max-w-sm sticky top-0 right-0 z-[70] shadow-xl flex flex-col justify-between">
+ <div className="min-w-sm absolute sticky top-0 right-0 z-[70] flex h-full w-full max-w-sm flex-col justify-between border-l border-mineshaft-500 bg-bunker shadow-xl">
{isLoading ? (
- <div className="flex items-center justify-center h-full w-full">
+ <div className="flex h-full w-full items-center justify-center">
<Image
src="/images/loading/loading.gif"
height={60}
@@ -91,9 +91,9 @@ const SideBar = ({
/>
</div>
) : (
- <div className="h-min overflow-y-auto w-full">
- <div className="flex flex-row px-4 py-3 border-b border-mineshaft-500 justify-between items-center">
- <p className="font-semibold text-lg text-bunker-200">{t('dashboard:sidebar.secret')}</p>
+ <div className="h-min w-full overflow-y-auto">
+ <div className="flex flex-row items-center justify-between border-b border-mineshaft-500 px-4 py-3">
+ <p className="text-lg font-semibold text-bunker-200">{t('dashboard.sidebar.secret')}</p>
<div
onKeyDown={() => null}
role="button"
@@ -101,12 +101,12 @@ const SideBar = ({
className="p-1"
onClick={() => toggleSidebar('None')}
>
- <FontAwesomeIcon icon={faXmark} className="w-4 h-4 text-bunker-300 cursor-pointer" />
+ <FontAwesomeIcon icon={faXmark} className="h-4 w-4 cursor-pointer text-bunker-300" />
</div>
</div>
- <div className="mt-4 px-4 pointer-events-none">
- <p className="text-sm text-bunker-300">{t('dashboard:sidebar.key')}</p>
- <div className='rounded-md border overflow-hidden border-mineshaft-600 bg-white/5'>
+ <div className="pointer-events-none mt-4 px-4">
+ <p className="text-sm text-bunker-300">{t('dashboard.sidebar.key')}</p>
+ <div className="overflow-hidden rounded-md border border-mineshaft-600 bg-white/5">
<DashboardInputField
onChangeHandler={modifyKey}
type="varName"
@@ -117,14 +117,14 @@ const SideBar = ({
/>
</div>
</div>
- {(data[0]?.value || data[0]?.value === "") ? (
+ {data[0]?.value || data[0]?.value === '' ? (
<div
className={`relative mt-2 px-4 ${
- overrideEnabled && 'opacity-40 pointer-events-none'
+ overrideEnabled && 'pointer-events-none opacity-40'
} duration-200`}
>
- <p className="text-sm text-bunker-300">{t('dashboard:sidebar.value')}</p>
- <div className='rounded-md border overflow-hidden border-mineshaft-600 bg-white/5'>
+ <p className="text-sm text-bunker-300">{t('dashboard.sidebar.value')}</p>
+ <div className="overflow-hidden rounded-md border border-mineshaft-600 bg-white/5">
<DashboardInputField
onChangeHandler={modifyValue}
type="value"
@@ -134,22 +134,22 @@ const SideBar = ({
blurred
/>
</div>
- <div className="absolute bg-bunker-800 right-[1.07rem] top-[1.6rem] z-50">
+ <div className="absolute right-[1.07rem] top-[1.6rem] z-50 bg-bunker-800">
<GenerateSecretMenu modifyValue={modifyValue} id={data[0]?.id} />
</div>
</div>
) : (
- <div className="px-4 text-sm text-bunker-300 pt-4">
- <span className="py-0.5 px-1 rounded-md bg-primary-200/10 mr-1">
- {t('common:note')}:
+ <div className="px-4 pt-4 text-sm text-bunker-300">
+ <span className="mr-1 rounded-md bg-primary-200/10 py-0.5 px-1">
+ {t('common.note')}:
</span>
- {t('dashboard:sidebar.personal-explanation')}
+ {t('dashboard.sidebar.personal-explanation')}
</div>
)}
<div className="mt-4 px-4">
- {(data[0]?.value || data[0]?.value === "") && (
- <div className="flex flex-row items-center justify-between my-2 pl-1 pr-2">
- <p className="text-sm text-bunker-300">{t('dashboard:sidebar.override')}</p>
+ {(data[0]?.value || data[0]?.value === '') && (
+ <div className="my-2 flex flex-row items-center justify-between pl-1 pr-2">
+ <p className="text-sm text-bunker-300">{t('dashboard.sidebar.override')}</p>
<Toggle
enabled={overrideEnabled}
setEnabled={setOverrideEnabled}
@@ -160,10 +160,10 @@ const SideBar = ({
)}
<div
className={`relative ${
- !overrideEnabled && 'opacity-40 pointer-events-none'
+ !overrideEnabled && 'pointer-events-none opacity-40'
} duration-200`}
>
- <div className='rounded-md border overflow-hidden border-mineshaft-600 bg-white/5'>
+ <div className="overflow-hidden rounded-md border border-mineshaft-600 bg-white/5">
<DashboardInputField
onChangeHandler={modifyValueOverride}
type="value"
@@ -179,14 +179,10 @@ const SideBar = ({
</div>
</div>
<SecretVersionList secretId={data[0]?.id} />
- <CommentField
- comment={data[0]?.comment}
- modifyComment={modifyComment}
- id={data[0]?.id}
- />
+ <CommentField comment={data[0]?.comment} modifyComment={modifyComment} id={data[0]?.id} />
</div>
)}
- <div className="mt-full w-96 mt-4 mb-4 flex max-w-sm flex-col justify-start space-y-2 px-4">
+ <div className="mt-full mt-4 mb-4 flex w-96 max-w-sm flex-col justify-start space-y-2 px-4">
<div>
<Button
text="Compare secret across environments"
@@ -205,7 +201,7 @@ const SideBar = ({
</div>
<div className="flex">
<Button
- text={String(t('common:save-changes'))}
+ text={String(t('common.save-changes'))}
onButtonPressed={savePush}
color="primary"
size="md"
diff --git a/frontend/src/components/integrations/CloudIntegrationSection.tsx b/frontend/src/components/integrations/CloudIntegrationSection.tsx
index aadae1308d..9ba9e052c8 100644
--- a/frontend/src/components/integrations/CloudIntegrationSection.tsx
+++ b/frontend/src/components/integrations/CloudIntegrationSection.tsx
@@ -1,4 +1,4 @@
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import CloudIntegration from './CloudIntegration';
@@ -40,17 +40,11 @@ const CloudIntegrationSection = ({
return (
<>
- <div
- className="flex flex-col justify-between items-start m-4 mt-7 text-xl max-w-5xl px-2"
- >
- <h1 className='font-semibold text-3xl'>
- {t('integrations:cloud-integrations')}
- </h1>
- <p className='text-base text-gray-400'>
- {t('integrations:click-to-start')}
- </p>
+ <div className="m-4 mt-7 flex max-w-5xl flex-col items-start justify-between px-2 text-xl">
+ <h1 className="text-3xl font-semibold">{t('integrations.cloud-integrations')}</h1>
+ <p className="text-base text-gray-400">{t('integrations.click-to-start')}</p>
</div>
- <div className='grid gap-4 grid-cols-4 grid-rows-2 mx-6 max-w-5xl'>
+ <div className="mx-6 grid max-w-5xl grid-cols-4 grid-rows-2 gap-4">
{cloudIntegrationOptions.map((cloudIntegrationOption) => (
<CloudIntegration
cloudIntegrationOption={cloudIntegrationOption}
diff --git a/frontend/src/components/integrations/FrameworkIntegrationSection.tsx b/frontend/src/components/integrations/FrameworkIntegrationSection.tsx
index 31bac00434..dbe4da768a 100644
--- a/frontend/src/components/integrations/FrameworkIntegrationSection.tsx
+++ b/frontend/src/components/integrations/FrameworkIntegrationSection.tsx
@@ -1,4 +1,4 @@
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import FrameworkIntegration from './FrameworkIntegration';
@@ -19,15 +19,11 @@ const FrameworkIntegrationSection = ({ frameworks }: Props) => {
return (
<>
- <div className='flex flex-col justify-between items-start mx-4 mt-12 mb-4 text-xl max-w-5xl px-2'>
- <h1 className='font-semibold text-3xl'>
- {t('integrations:framework-integrations')}
- </h1>
- <p className='text-base text-gray-400'>
- {t('integrations:click-to-setup')}
- </p>
+ <div className="mx-4 mt-12 mb-4 flex max-w-5xl flex-col items-start justify-between px-2 text-xl">
+ <h1 className="text-3xl font-semibold">{t('integrations.framework-integrations')}</h1>
+ <p className="text-base text-gray-400">{t('integrations.click-to-setup')}</p>
</div>
- <div className='grid gap-4 grid-cols-7 grid-rows-2 mx-6 mt-4 max-w-5xl'>
+ <div className="mx-6 mt-4 grid max-w-5xl grid-cols-7 grid-rows-2 gap-4">
{frameworks.map((framework) => (
<FrameworkIntegration
framework={framework}
diff --git a/frontend/src/components/login/LoginStep.tsx b/frontend/src/components/login/LoginStep.tsx
index b19bafdd9e..c28ec8fb3b 100644
--- a/frontend/src/components/login/LoginStep.tsx
+++ b/frontend/src/components/login/LoginStep.tsx
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Link from 'next/link';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faWarning } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -9,7 +9,6 @@ import Button from '@app/components/basic/buttons/Button';
import Error from '@app/components/basic/Error';
import InputField from '@app/components/basic/InputField';
import attemptLogin from '@app/components/utilities/attemptLogin';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
/**
* 1st step of login - user enters their username and password
@@ -21,127 +20,122 @@ import { getTranslatedStaticProps } from '@app/components/utilities/withTranslat
* @param {Function} obj.setStep - function to set the login flow step
* @returns
*/
-export default function LoginStep ({
- email,
- setEmail,
- password,
- setPassword,
- setStep
+export default function LoginStep({
+ email,
+ setEmail,
+ password,
+ setPassword,
+ setStep
}: {
- email: string;
- setEmail: (email: string) => void;
- password: string;
- setPassword: (password: string) => void;
- setStep: (step: number) => void;
+ email: string;
+ setEmail: (email: string) => void;
+ password: string;
+ setPassword: (password: string) => void;
+ setStep: (step: number) => void;
}) {
- const router = useRouter();
- const [isLoading, setIsLoading] = useState(false);
- const [loginError, setLoginError] = useState(false);
+ const router = useRouter();
+ const [isLoading, setIsLoading] = useState(false);
+ const [loginError, setLoginError] = useState(false);
- const { t } = useTranslation();
+ const { t } = useTranslation();
- const handleLogin = async () => {
- try {
- if (!email || !password) {
- return;
- }
-
- setIsLoading(true);
- const isLoginSuccessful = await attemptLogin(email, password);
- if (isLoginSuccessful && isLoginSuccessful.success) {
- // case: login was successful
+ const handleLogin = async () => {
+ try {
+ if (!email || !password) {
+ return;
+ }
- if (isLoginSuccessful.mfaEnabled) {
- // case: login requires MFA step
- setStep(2);
- setIsLoading(false);
- return;
- }
+ setIsLoading(true);
+ const isLoginSuccessful = await attemptLogin(email, password);
+ if (isLoginSuccessful && isLoginSuccessful.success) {
+ // case: login was successful
- // case: login does not require MFA step
- router.push(`/dashboard/${localStorage.getItem('projectData.id')}`);
- }
-
- } catch (err) {
- setLoginError(true);
+ if (isLoginSuccessful.mfaEnabled) {
+ // case: login requires MFA step
+ setStep(2);
+ setIsLoading(false);
+ return;
}
-
- setIsLoading(false);
+
+ // case: login does not require MFA step
+ router.push(`/dashboard/${localStorage.getItem('projectData.id')}`);
+ }
+ } catch (err) {
+ setLoginError(true);
}
- return (
- <form onSubmit={(e) => e.preventDefault()}>
- <div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-4 pt-8 px-6 rounded-xl drop-shadow-xl">
- <p className="text-3xl w-max mx-auto flex justify-center font-semibold text-bunker-100 mb-6">
- {t('login:login')}
- </p>
- <div className="flex items-center justify-center w-full md:p-2 rounded-lg mt-4 md:mt-0 max-h-24 md:max-h-28">
- <InputField
- label={t('common:email')}
- onChangeHandler={setEmail}
- type="email"
- value={email}
- placeholder=""
- isRequired
- autoComplete="username"
- />
- </div>
- <div className="relative flex items-center justify-center w-full md:p-2 rounded-lg md:mt-2 mt-6 max-h-24 md:max-h-28">
- <InputField
- label={t('common:password')}
- onChangeHandler={setPassword}
- type="password"
- value={password}
- placeholder=""
- isRequired
- autoComplete="current-password"
- id="current-password"
- />
- <div className="absolute top-2 right-3 text-primary-700 hover:text-primary duration-200 cursor-pointer text-sm">
- <Link href="/verify-email">
- <button
- type="button"
- className="text-primary-700 hover:text-primary duration-200 font-normal text-sm underline-offset-4 ml-1.5"
- >
- {t('login:forgot-password')}
- </button>
- </Link>
- </div>
- </div>
- {!isLoading && loginError && <Error text={t('login:error-login') ?? ''} />}
- <div className="flex flex-col items-center justify-center w-full md:p-2 max-h-20 max-w-md mt-4 mx-auto text-sm">
- <div className="text-l mt-6 m-8 px-8 py-3 text-lg">
- <Button
- type="submit"
- text={t('login:login') ?? ''}
- onButtonPressed={async () => handleLogin()}
- loading={isLoading}
- size="lg"
- />
- </div>
- </div>
- </div>
- {false && (
- <div className="w-full p-2 flex flex-row items-center bg-white/10 text-gray-300 rounded-md max-w-md mx-auto mt-4">
- <FontAwesomeIcon icon={faWarning} className="ml-2 mr-6 text-6xl" />
- {t('common:maintenance-alert')}
- </div>
- )}
- <div className="flex flex-row items-center justify-center md:pb-4 mt-4">
- <p className="text-sm flex justify-center text-gray-400 w-max">
- {t('login:need-account')}
- </p>
- <Link href="/signup">
- <button
+ setIsLoading(false);
+ };
+
+ return (
+ <form onSubmit={(e) => e.preventDefault()}>
+ <div className="h-7/12 mx-auto w-full max-w-md rounded-xl bg-bunker py-4 px-6 pt-8 drop-shadow-xl">
+ <p className="mx-auto mb-6 flex w-max justify-center text-3xl font-semibold text-bunker-100">
+ {t('login.login')}
+ </p>
+ <div className="mt-4 flex max-h-24 w-full items-center justify-center rounded-lg md:mt-0 md:max-h-28 md:p-2">
+ <InputField
+ label={t('common.email')}
+ onChangeHandler={setEmail}
+ type="email"
+ value={email}
+ placeholder=""
+ isRequired
+ autoComplete="username"
+ />
+ </div>
+ <div className="relative mt-6 flex max-h-24 w-full items-center justify-center rounded-lg md:mt-2 md:max-h-28 md:p-2">
+ <InputField
+ label={t('common.password')}
+ onChangeHandler={setPassword}
+ type="password"
+ value={password}
+ placeholder=""
+ isRequired
+ autoComplete="current-password"
+ id="current-password"
+ />
+ <div className="absolute top-2 right-3 cursor-pointer text-sm text-primary-700 duration-200 hover:text-primary">
+ <Link href="/verify-email">
+ <button
type="button"
- className="text-primary-700 hover:text-primary duration-200 font-normal text-sm underline-offset-4 ml-1.5"
- >
- {t('login:create-account')}
- </button>
+ className="ml-1.5 text-sm font-normal text-primary-700 underline-offset-4 duration-200 hover:text-primary"
+ >
+ {t('login.forgot-password')}
+ </button>
</Link>
- </div>
- </form>
- );
+ </div>
+ </div>
+ {!isLoading && loginError && <Error text={t('login.error-login') ?? ''} />}
+ <div className="mx-auto mt-4 flex max-h-20 w-full max-w-md flex-col items-center justify-center text-sm md:p-2">
+ <div className="text-l m-8 mt-6 px-8 py-3 text-lg">
+ <Button
+ type="submit"
+ text={t('login.login') ?? ''}
+ onButtonPressed={async () => handleLogin()}
+ loading={isLoading}
+ size="lg"
+ />
+ </div>
+ </div>
+ </div>
+ {false && (
+ <div className="mx-auto mt-4 flex w-full max-w-md flex-row items-center rounded-md bg-white/10 p-2 text-gray-300">
+ <FontAwesomeIcon icon={faWarning} className="ml-2 mr-6 text-6xl" />
+ {t('common.maintenance-alert')}
+ </div>
+ )}
+ <div className="mt-4 flex flex-row items-center justify-center md:pb-4">
+ <p className="flex w-max justify-center text-sm text-gray-400">{t('login.need-account')}</p>
+ <Link href="/signup">
+ <button
+ type="button"
+ className="ml-1.5 text-sm font-normal text-primary-700 underline-offset-4 duration-200 hover:text-primary"
+ >
+ {t('login.create-account')}
+ </button>
+ </Link>
+ </div>
+ </form>
+ );
}
-
-export const getStaticProps = getTranslatedStaticProps(['auth', 'login']);
\ No newline at end of file
diff --git a/frontend/src/components/login/MFAStep.tsx b/frontend/src/components/login/MFAStep.tsx
index 5628b1a87f..ef1f9d7542 100644
--- a/frontend/src/components/login/MFAStep.tsx
+++ b/frontend/src/components/login/MFAStep.tsx
@@ -1,11 +1,10 @@
/* eslint-disable react/jsx-props-no-spreading */
import React, { useState } from 'react';
import ReactCodeInput from 'react-code-input';
+import { useTranslation } from 'react-i18next';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import attemptLoginMfa from '@app/components/utilities/attemptLoginMfa';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { useSendMfaToken } from '@app/hooks/api/auth';
import Button from '../basic/buttons/Button';
@@ -37,10 +36,10 @@ interface VerifyMfaTokenError {
context: {
code: string;
triesLeft: number;
- }
- },
+ };
+ };
status: number;
- }
+ };
}
/**
@@ -73,7 +72,7 @@ export default function MFAStep({
if (mfaCode.length !== 6) {
return;
}
-
+
setIsLoading(true);
const isLoginSuccessful = await attemptLoginMfa({
email,
@@ -85,10 +84,9 @@ export default function MFAStep({
setIsLoading(false);
router.push(`/dashboard/${localStorage.getItem('projectData.id')}`);
}
-
} catch (err) {
const error = err as VerifyMfaTokenError;
-
+
if (error?.response?.status === 500) {
window.location.reload();
} else if (error?.response?.data?.context?.triesLeft) {
@@ -100,8 +98,8 @@ export default function MFAStep({
setIsLoading(false);
}
- }
-
+ };
+
const handleResendMfaCode = async () => {
try {
setIsLoadingResend(true);
@@ -111,12 +109,12 @@ export default function MFAStep({
console.error(err);
setIsLoadingResend(false);
}
- }
+ };
return (
- <form 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">
- <p className="text-l flex justify-center text-bunker-300">{t('mfa:step2-message')}</p>
- <p className="text-l flex justify-center font-semibold my-2 text-bunker-300">{email} </p>
+ <form className="h-7/12 mx-auto mb-64 w-max rounded-xl bg-bunker px-8 pt-10 pb-4 drop-shadow-xl md:mb-16">
+ <p className="text-l flex justify-center text-bunker-300">{t('mfa.step2-message')}</p>
+ <p className="text-l my-2 flex justify-center font-semibold text-bunker-300">{email} </p>
<div className="hidden md:block">
<ReactCodeInput
name=""
@@ -128,35 +126,29 @@ export default function MFAStep({
className="mt-6 mb-2"
/>
</div>
- {typeof triesLeft === 'number' && <Error text={`${t('mfa:step2-code-error')} ${triesLeft}`} />}
- <div className="flex max-w-max min-w-28 flex-col items-center justify-center md:p-2 max-h-24 mx-auto text-lg px-4 mt-4 mb-2">
- <Button
- text={t('mfa:verify') ?? ''}
- onButtonPressed={() => handleLoginMfa()}
- size="lg"
- />
+ {typeof triesLeft === 'number' && (
+ <Error text={`${t('mfa.step2-code-error')} ${triesLeft}`} />
+ )}
+ <div className="min-w-28 mx-auto mt-4 mb-2 flex max-h-24 max-w-max flex-col items-center justify-center px-4 text-lg md:p-2">
+ <Button text={t('mfa.verify') ?? ''} onButtonPressed={() => handleLoginMfa()} size="lg" />
</div>
- <div className="flex flex-col items-center justify-center w-full max-h-24 max-w-md mx-auto pt-2">
+ <div className="mx-auto flex max-h-24 w-full max-w-md flex-col items-center justify-center pt-2">
<div className="flex flex-row items-baseline gap-1 text-sm">
- <span className="text-bunker-400">{t('mfa:step2-resend-alert')}</span>
+ <span className="text-bunker-400">{t('mfa.step2-resend-alert')}</span>
<u
className={`font-normal ${
isLoadingResend
? 'text-bunker-400'
- : 'text-primary-700 hover:text-primary duration-200'
+ : 'text-primary-700 duration-200 hover:text-primary'
}`}
>
<button disabled={isLoading} onClick={() => handleResendMfaCode()} type="button">
- {isLoadingResend
- ? t('mfa:step2-resend-progress')
- : t('mfa:step2-resend-submit')}
+ {isLoadingResend ? t('mfa.step2-resend-progress') : t('mfa.step2-resend-submit')}
</button>
</u>
</div>
- <p className="text-sm text-bunker-400 pb-2">{t('mfa:step2-spam-alert')}</p>
+ <p className="pb-2 text-sm text-bunker-400">{t('mfa.step2-spam-alert')}</p>
</div>
</form>
);
}
-
-export const getStaticProps = getTranslatedStaticProps(['auth', 'mfa']);
\ No newline at end of file
diff --git a/frontend/src/components/navigation/NavBarDashboard.tsx b/frontend/src/components/navigation/NavBarDashboard.tsx
index f14e00be56..d1fca64608 100644
--- a/frontend/src/components/navigation/NavBarDashboard.tsx
+++ b/frontend/src/components/navigation/NavBarDashboard.tsx
@@ -1,9 +1,9 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable react/jsx-key */
import { Fragment, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { TFunction, useTranslation } from 'next-i18next';
import { faGithub, faSlack } from '@fortawesome/free-brands-svg-icons';
import { faCircleQuestion } from '@fortawesome/free-regular-svg-icons';
import {
@@ -17,6 +17,7 @@ import {
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Menu, Transition } from '@headlessui/react';
+import {TFunction} from 'i18next'
import logout from '@app/pages/api/auth/Logout';
@@ -28,22 +29,22 @@ import guidGenerator from '../utilities/randomId';
const supportOptions = (t: TFunction) => [
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faSlack} />,
- t('nav:support.slack'),
+ 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} />,
- t('nav:support.docs'),
+ t('nav.support.docs'),
'https://infisical.com/docs/documentation/getting-started/introduction'
],
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faGithub} />,
- t('nav:support.issue'),
+ t('nav.support.issue'),
'https://github.com/Infisical/infisical-cli/issues'
],
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faEnvelope} />,
- t('nav:support.email'),
+ t('nav.support.email'),
]
];
@@ -168,7 +169,7 @@ export default function Navbar() {
<Menu.Items className="absolute right-0 mt-0.5 w-64 origin-top-right divide-y divide-gray-700 rounded-md bg-bunker border border-mineshaft-700 shadow-lg ring-1 ring-black z-[999] ring-opacity-5 focus:outline-none">
<div className="px-1 py-1 z-[100]">
<div className="text-gray-400 self-start ml-2 mt-2 text-xs font-semibold tracking-wide">
- {t('nav:user.signed-in-as')}
+ {t('nav.user.signed-in-as')}
</div>
<div
onKeyDown={() => null}
@@ -197,7 +198,7 @@ export default function Navbar() {
</div>
<div className="px-2 pt-2">
<div className="text-gray-400 self-start ml-2 mt-2 text-xs font-semibold tracking-wide">
- {t('nav:user.current-organization')}
+ {t('nav.user.current-organization')}
</div>
<div
onKeyDown={() => null}
@@ -230,7 +231,7 @@ export default function Navbar() {
className="mt-1 relative flex justify-start cursor-pointer select-none py-2 px-2 rounded-md text-gray-400 hover:bg-white/5 duration-200 hover:text-gray-200"
>
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faCoins} />
- <div className="text-sm">{t('nav:user.usage-billing')}</div>
+ <div className="text-sm">{t('nav.user.usage-billing')}</div>
</div>
</button>
<button
@@ -248,14 +249,14 @@ export default function Navbar() {
<span className="rounded-lg absolute inset-y-0 left-0 flex items-center pl-3 pr-4">
<FontAwesomeIcon icon={faPlus} className="ml-1" />
</span>
- <div className="text-sm ml-1">{t('nav:user.invite')}</div>
+ <div className="text-sm ml-1">{t('nav.user.invite')}</div>
</div>
</button>
</div>
{orgs?.length > 1 && (
<div className="px-1 pt-1">
<div className="text-gray-400 self-start ml-2 mt-2 text-xs font-semibold tracking-wide">
- {t('nav:user.other-organizations')}
+ {t('nav.user.other-organizations')}
</div>
<div className="flex flex-col items-start px-1 mt-3 mb-2">
{orgs
@@ -300,7 +301,7 @@ export default function Navbar() {
className="text-lg ml-1.5 mr-3"
icon={faRightFromBracket}
/>
- {t('common:logout')}
+ {t('common.logout')}
</div>
</button>
)}
diff --git a/frontend/src/components/signup/CodeInputStep.tsx b/frontend/src/components/signup/CodeInputStep.tsx
index 67b4e530c7..4d02df7490 100644
--- a/frontend/src/components/signup/CodeInputStep.tsx
+++ b/frontend/src/components/signup/CodeInputStep.tsx
@@ -1,7 +1,7 @@
/* eslint-disable react/jsx-props-no-spreading */
import React, { useState } from 'react';
import ReactCodeInput from 'react-code-input';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import sendVerificationEmail from '@app/pages/api/auth/SendVerificationEmail';
@@ -83,9 +83,9 @@ export default function CodeInputStep({
};
return (
- <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">
- <p className="text-l flex justify-center text-bunker-300">{t('signup:step2-message')}</p>
- <p className="text-l flex justify-center font-semibold my-2 text-bunker-300">{email} </p>
+ <div className="h-7/12 mx-auto mb-64 w-max rounded-xl bg-bunker px-8 pt-10 pb-4 drop-shadow-xl md:mb-16">
+ <p className="text-l flex justify-center text-bunker-300">{t('signup.step2-message')}</p>
+ <p className="text-l my-2 flex justify-center font-semibold text-bunker-300">{email} </p>
<div className="hidden md:block">
<ReactCodeInput
name=""
@@ -108,28 +108,28 @@ export default function CodeInputStep({
className="mt-2 mb-6"
/>
</div>
- {codeError && <Error text={t('signup:step2-code-error')} />}
- <div className="flex max-w-max min-w-28 flex-col items-center justify-center md:p-2 max-h-24 mx-auto text-lg px-4 mt-4 mb-2">
- <Button text={t('signup:verify') ?? ''} onButtonPressed={incrementStep} size="lg" />
+ {codeError && <Error text={t('signup.step2-code-error')} />}
+ <div className="min-w-28 mx-auto mt-4 mb-2 flex max-h-24 max-w-max flex-col items-center justify-center px-4 text-lg md:p-2">
+ <Button 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">
+ <div className="mx-auto flex max-h-24 w-full max-w-md flex-col items-center justify-center pt-2">
<div className="flex flex-row items-baseline gap-1 text-sm">
- <span className="text-bunker-400">{t('signup:step2-resend-alert')}</span>
+ <span className="text-bunker-400">{t('signup.step2-resend-alert')}</span>
<u
className={`font-normal ${
isResendingVerificationEmail
? 'text-bunker-400'
- : 'text-primary-700 hover:text-primary duration-200'
+ : 'text-primary-700 duration-200 hover:text-primary'
}`}
>
<button disabled={isLoading} onClick={resendVerificationEmail} type="button">
{isResendingVerificationEmail
- ? t('signup:step2-resend-progress')
- : t('signup:step2-resend-submit')}
+ ? t('signup.step2-resend-progress')
+ : t('signup.step2-resend-submit')}
</button>
</u>
</div>
- <p className="text-sm text-bunker-400 pb-2">{t('signup:step2-spam-alert')}</p>
+ <p className="pb-2 text-sm text-bunker-400">{t('signup.step2-spam-alert')}</p>
</div>
</div>
);
diff --git a/frontend/src/components/signup/DonwloadBackupPDFStep.tsx b/frontend/src/components/signup/DonwloadBackupPDFStep.tsx
index 240d6468a9..23da080b5f 100644
--- a/frontend/src/components/signup/DonwloadBackupPDFStep.tsx
+++ b/frontend/src/components/signup/DonwloadBackupPDFStep.tsx
@@ -1,4 +1,4 @@
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faWarning } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -30,19 +30,19 @@ export default function DonwloadBackupPDFStep({
const { t } = useTranslation();
return (
- <div className="bg-bunker flex flex-col items-center w-full max-w-xs md:max-w-lg 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-primary">
- {t('signup:step4-message')}
+ <div className="h-7/12 mx-1 mb-36 flex w-full max-w-xs flex-col items-center rounded-xl bg-bunker py-8 px-4 drop-shadow-xl md:mb-16 md:max-w-lg md:px-6">
+ <p className="flex justify-center text-center text-4xl font-semibold text-primary">
+ {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('signup:step4-description1')}</div>
- <div className="mt-3">{t('signup:step4-description2')}</div>
+ <div className="text-md mt-4 flex w-full max-w-md flex-col items-center justify-center rounded-md px-2 text-gray-400 md:mt-8">
+ <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">
+ <div className="mx-auto mt-4 flex w-full max-w-xs flex-row items-center rounded-md bg-white/10 p-2 text-gray-400 md:max-w-md">
<FontAwesomeIcon icon={faWarning} className="ml-2 mr-4 text-4xl" />
- {t('signup:step4-description3')}
+ {t('signup.step4-description3')}
</div>
- <div className="flex flex-col items-center justify-center md:px-4 md:py-5 mt-4 px-2 py-3 max-h-24 max-w-max mx-auto text-lg">
+ <div className="mx-auto mt-4 flex max-h-24 max-w-max flex-col items-center justify-center px-2 py-3 text-lg md:px-4 md:py-5">
<Button
text="Download PDF"
onButtonPressed={async () => {
diff --git a/frontend/src/components/signup/EnterEmailStep.tsx b/frontend/src/components/signup/EnterEmailStep.tsx
index d7114946ec..e708d94dc1 100644
--- a/frontend/src/components/signup/EnterEmailStep.tsx
+++ b/frontend/src/components/signup/EnterEmailStep.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Link from 'next/link';
-import { useTranslation } from 'next-i18next';
import sendVerificationEmail from '@app/pages/api/auth/SendVerificationEmail';
@@ -56,13 +56,13 @@ export default function EnterEmailStep({
return (
<div>
- <div className="bg-bunker w-full max-w-md h-7/12 py-8 md:px-6 mx-1 rounded-xl drop-shadow-xl">
- <p className="text-4xl font-semibold flex justify-center text-primary">
- {t('signup:step1-start')}
+ <div className="h-7/12 mx-1 w-full max-w-md rounded-xl bg-bunker py-8 drop-shadow-xl md:px-6">
+ <p className="flex justify-center text-4xl font-semibold text-primary">
+ {t('signup.step1-start')}
</p>
- <div className="flex items-center justify-center w-5/6 md:w-full m-auto md:p-2 rounded-lg max-h-24 mt-4">
+ <div className="m-auto mt-4 flex max-h-24 w-5/6 items-center justify-center rounded-lg md:w-full md:p-2">
<InputField
- label={t('common:email') ?? ''}
+ label={t('common.email') ?? ''}
onChangeHandler={setEmail}
type="email"
value={email}
@@ -73,11 +73,11 @@ export default function EnterEmailStep({
autoComplete="username"
/>
</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">{t('signup:step1-privacy')}</p>
- <div className="text-l mt-6 m-2 md:m-8 px-8 py-1 text-lg">
+ <div className="mx-auto mt-4 flex max-h-28 w-5/6 max-w-xs flex-col items-center justify-center text-center text-sm md:mt-4 md:w-full md:max-w-md md:p-2 md:text-left">
+ <p className="mt-2 text-gray-400 md:mx-0.5">{t('signup.step1-privacy')}</p>
+ <div className="text-l m-2 mt-6 px-8 py-1 text-lg md:m-8">
<Button
- text={t('signup:step1-submit') ?? ''}
+ text={t('signup.step1-submit') ?? ''}
type="submit"
onButtonPressed={emailCheck}
size="lg"
@@ -85,11 +85,11 @@ export default function EnterEmailStep({
</div>
</div>
</div>
- <div className="flex flex-col items-center justify-center w-full md:pb-2 max-w-md mx-auto pt-2 mb-48 md:mb-16 mt-2">
+ <div className="mx-auto mb-48 mt-2 flex w-full max-w-md flex-col items-center justify-center pt-2 md:mb-16 md:pb-2">
<Link href="/login">
- <button type="button" className="w-max pb-3 hover:opacity-90 duration-200">
- <u className="font-normal text-sm text-primary-500">
- {t('signup:already-have-account')}
+ <button type="button" className="w-max pb-3 duration-200 hover:opacity-90">
+ <u className="text-sm font-normal text-primary-500">
+ {t('signup.already-have-account')}
</u>
</button>
</Link>
diff --git a/frontend/src/components/signup/TeamInviteStep.tsx b/frontend/src/components/signup/TeamInviteStep.tsx
index 12d558606f..90bbd91fb1 100644
--- a/frontend/src/components/signup/TeamInviteStep.tsx
+++ b/frontend/src/components/signup/TeamInviteStep.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { useFetchServerStatus } from '@app/hooks/api/serverDetails';
import { usePopUp } from '@app/hooks/usePopUp';
@@ -17,10 +17,8 @@ export default function TeamInviteStep(): JSX.Element {
const [emails, setEmails] = useState('');
const { t } = useTranslation();
const router = useRouter();
- const {data: serverDetails } = useFetchServerStatus()
- const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp([
- 'setUpEmail'
- ] as const);
+ const { data: serverDetails } = useFetchServerStatus();
+ const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp(['setUpEmail'] as const);
// Redirect user to the getting started page
const redirectToHome = async () => {
@@ -39,40 +37,40 @@ export default function TeamInviteStep(): JSX.Element {
};
return (
- <div className="bg-bunker w-max mx-auto h-7/12 pt-6 pb-4 px-8 rounded-xl drop-shadow-xl mb-64 md:mb-32">
- <p className="text-4xl font-semibold flex justify-center text-primary">
- {t('signup:step5-invite-team')}
+ <div className="h-7/12 mx-auto mb-64 w-max rounded-xl bg-bunker px-8 pt-6 pb-4 drop-shadow-xl md:mb-32">
+ <p className="flex justify-center text-4xl font-semibold text-primary">
+ {t('signup.step5-invite-team')}
</p>
- <p className="text-center flex justify-center text-bunker-300 max-w-xs md:max-w-sm md:mx-8 mb-6 mt-4">
- {t('signup:step5-subtitle')}
+ <p className="mb-6 mt-4 flex max-w-xs justify-center text-center text-bunker-300 md:mx-8 md:max-w-sm">
+ {t('signup.step5-subtitle')}
</p>
<div>
<div className="overflow-auto bg-bunker-800">
<div className="whitespace-pre-wrap break-words bg-transparent" />
</div>
<textarea
- className="bg-bunker-800 h-20 w-full placeholder:text-bunker-400 py-1 px-2 rounded-md border border-mineshaft-500 text-sm text-bunker-300 outline-none focus:ring-2 ring-primary-800 ring-opacity-70"
+ className="h-20 w-full rounded-md border border-mineshaft-500 bg-bunker-800 py-1 px-2 text-sm text-bunker-300 outline-none ring-primary-800 ring-opacity-70 placeholder:text-bunker-400 focus:ring-2"
value={emails}
onChange={(e) => setEmails(e.target.value)}
/>
</div>
- <div className="flex flex-row max-w-max min-w-28 items-center justify-center md:p-2 max-h-24 mx-auto text-lg px-4 mt-4 mb-2">
+ <div className="min-w-28 mx-auto mt-4 mb-2 flex max-h-24 max-w-max flex-row items-center justify-center px-4 text-lg md:p-2">
<div
onKeyDown={() => null}
role="button"
tabIndex={0}
- className="text-md md:text-sm mx-3 text-bunker-300 bg-mineshaft-700 py-3 md:py-3.5 px-5 rounded-md cursor-pointer hover:bg-mineshaft-500 duration-200"
+ className="text-md mx-3 cursor-pointer rounded-md bg-mineshaft-700 py-3 px-5 text-bunker-300 duration-200 hover:bg-mineshaft-500 md:py-3.5 md:text-sm"
onClick={redirectToHome}
>
- {t('signup:step5-skip')}
+ {t('signup.step5-skip')}
</div>
<Button
- text={t('signup:step5-send-invites') ?? ''}
+ text={t('signup.step5-send-invites') ?? ''}
onButtonPressed={() => {
- if(serverDetails?.emailConfigured){
- inviteUsers({ emails })
- }else{
+ if (serverDetails?.emailConfigured) {
+ inviteUsers({ emails });
+ } else {
handlePopUpOpen('setUpEmail');
}
}}
diff --git a/frontend/src/components/signup/UserInfoStep.tsx b/frontend/src/components/signup/UserInfoStep.tsx
index 32504cb2cd..9e6135ed96 100644
--- a/frontend/src/components/signup/UserInfoStep.tsx
+++ b/frontend/src/components/signup/UserInfoStep.tsx
@@ -1,7 +1,7 @@
import crypto from 'crypto';
import React, { useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faCheck, faX } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import jsrp from 'jsrp';
@@ -108,7 +108,6 @@ export default function UserInfoStep({
async () => {
client.createVerifier(async (err: any, result: { salt: string; verifier: string }) => {
try {
-
// TODO: moduralize into KeyService
const derivedKey = await deriveArgonKey({
password,
@@ -118,11 +117,11 @@ export default function UserInfoStep({
parallelism: 1,
hashLen: 32
});
-
+
if (!derivedKey) throw new Error('Failed to derive key from password');
const key = crypto.randomBytes(32);
-
+
// create encrypted private key by encrypting the private
// key with the symmetric key [key]
const {
@@ -133,7 +132,7 @@ export default function UserInfoStep({
text: privateKey,
secret: key
});
-
+
// create the protected key by encrypting the symmetric key
// [key] with the derived key
const {
@@ -144,7 +143,7 @@ export default function UserInfoStep({
text: key.toString('hex'),
secret: Buffer.from(derivedKey.hash)
});
-
+
const response = await completeAccountInformationSignup({
email,
firstName,
@@ -160,7 +159,7 @@ export default function UserInfoStep({
verifier: result.verifier,
organizationName: `${firstName}'s organization`
});
-
+
// unset signup JWT token and set JWT token
SecurityClient.setSignupToken('');
SecurityClient.setToken(response.token);
@@ -184,7 +183,6 @@ export default function UserInfoStep({
localStorage.setItem('projectData.id', project._id);
incrementStep();
-
} catch (error) {
setIsLoading(false);
console.error(error);
@@ -198,45 +196,45 @@ export default function UserInfoStep({
};
return (
- <div className="bg-bunker w-max mx-auto h-7/12 py-10 px-8 rounded-xl drop-shadow-xl mb-36 md:mb-16">
- <p className="text-4xl font-bold flex justify-center mb-6 mx-8 md:mx-16 text-primary">
- {t('signup:step3-message')}
+ <div className="h-7/12 mx-auto mb-36 w-max rounded-xl bg-bunker py-10 px-8 drop-shadow-xl md:mb-16">
+ <p className="mx-8 mb-6 flex justify-center text-4xl font-bold text-primary md:mx-16">
+ {t('signup.step3-message')}
</p>
- <div className="relative z-0 flex items-center justify-end w-full md:p-2 rounded-lg max-h-24">
+ <div className="relative z-0 flex max-h-24 w-full items-center justify-end rounded-lg md:p-2">
<InputField
- label={t('common:first-name')}
+ label={t('common.first-name')}
onChangeHandler={setFirstName}
type="name"
value={firstName}
isRequired
errorText={
- t('common:validate-required', {
- name: t('common:first-name')
+ 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">
+ <div className="mt-2 flex max-h-24 w-full items-center justify-center rounded-lg md:p-2">
<InputField
- label={t('common:last-name')}
+ label={t('common.last-name')}
onChangeHandler={setLastName}
type="name"
value={lastName}
isRequired
errorText={
- t('common:validate-required', {
- name: t('common:last-name')
+ 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">
+ <div className="mt-2 flex max-h-60 w-full flex-col items-center justify-center rounded-lg md:p-2">
<InputField
- label={t('section-password:password')}
+ label={t('section.password.password')}
onChangeHandler={(pass: string) => {
setPassword(pass);
passwordCheck({
@@ -255,38 +253,38 @@ export default function UserInfoStep({
id="new-password"
/>
{passwordErrorLength || passwordErrorLowerCase || passwordErrorNumber ? (
- <div className="w-full mt-4 bg-white/5 px-2 flex flex-col items-start py-2 rounded-md">
- <div className="text-gray-400 text-sm mb-1">{t('section-password:validate-base')}</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-2 py-2">
+ <div className="mb-1 text-sm text-gray-400">{t('section.password.validate-base')}</div>
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLength ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div className={`${passwordErrorLength ? 'text-gray-400' : 'text-gray-600'} text-sm`}>
- {t('section-password:validate-length')}
+ {t('section.password.validate-length')}
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLowerCase ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div
className={`${passwordErrorLowerCase ? 'text-gray-400' : 'text-gray-600'} text-sm`}
>
- {t('section-password:validate-case')}
+ {t('section.password.validate-case')}
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorNumber ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div className={`${passwordErrorNumber ? 'text-gray-400' : 'text-gray-600'} text-sm`}>
- {t('section-password:validate-number')}
+ {t('section.password.validate-number')}
</div>
</div>
</div>
@@ -294,9 +292,9 @@ export default function UserInfoStep({
<div className="py-2" />
)}
</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">
+ <div className="mx-auto flex max-h-48 max-w-max flex-col items-center justify-center px-2 py-3 text-lg md:p-2">
<Button
- text={t('signup:signup') ?? ''}
+ text={t('signup.signup') ?? ''}
loading={isLoading}
onButtonPressed={signupErrorCheck}
size="lg"
@@ -304,4 +302,4 @@ export default function UserInfoStep({
</div>
</div>
);
-}
\ No newline at end of file
+}
diff --git a/frontend/src/components/utilities/withTranslateProps.ts b/frontend/src/components/utilities/withTranslateProps.ts
deleted file mode 100644
index 6dc9abd108..0000000000
--- a/frontend/src/components/utilities/withTranslateProps.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { GetServerSideProps, GetStaticProps } from "next";
-import { serverSideTranslations } from "next-i18next/serverSideTranslations";
-
-const DefaultNamespaces = ["common", "nav"];
-
-type GetTranslatedStaticProps = (
- namespaces: string[],
- getStaticProps?: GetStaticProps<any>
-) => GetStaticProps;
-
-type GetTranslatedServerSideProps = (
- namespaces: string[],
- getStaticProps?: GetServerSideProps<any>
-) => GetServerSideProps;
-
-export const getTranslatedStaticProps: GetTranslatedStaticProps =
- (namespaces, getStaticProps) =>
- async ({ locale, ...context }) => {
- let staticProps = { props: {} };
- if (typeof getStaticProps === "function") {
- staticProps = (await getStaticProps(context)) as any;
- }
- return {
- ...staticProps,
- props: {
- ...(await serverSideTranslations(locale ?? "en", [
- ...DefaultNamespaces,
- ...namespaces,
- ])),
- ...staticProps.props,
- },
- };
- };
-
-export const getTranslatedServerSideProps: GetTranslatedServerSideProps =
- (namespaces, getServerSideProps) =>
- async ({ locale, ...context }) => {
- let staticProps = { props: {} };
- if (typeof getServerSideProps === "function") {
- staticProps = (await getServerSideProps(context)) as any;
- }
- return {
- ...staticProps,
- props: {
- ...(await serverSideTranslations(locale ?? "en", [
- ...DefaultNamespaces,
- ...namespaces,
- ])),
- ...staticProps.props,
- },
- };
- };
diff --git a/frontend/src/ee/components/ActivitySideBar.tsx b/frontend/src/ee/components/ActivitySideBar.tsx
index 775d08cf75..b56b0f35ad 100644
--- a/frontend/src/ee/components/ActivitySideBar.tsx
+++ b/frontend/src/ee/components/ActivitySideBar.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faXmark } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -129,10 +129,10 @@ const ActivitySideBar = ({ toggleSidebar, currentAction }: SideBarProps) => {
<div
className={`absolute border-l border-mineshaft-500 ${
isLoading ? 'bg-bunker-800' : 'bg-bunker'
- } fixed h-[calc(100vh-56px)] w-96 top-14 right-0 z-40 shadow-xl flex flex-col justify-between`}
+ } fixed top-14 right-0 z-40 flex h-[calc(100vh-56px)] w-96 flex-col justify-between shadow-xl`}
>
{isLoading ? (
- <div className="flex items-center justify-center h-full mb-8">
+ <div className="mb-8 flex h-full items-center justify-center">
<Image
src="/images/loading/loading.gif"
height={60}
@@ -142,9 +142,9 @@ const ActivitySideBar = ({ toggleSidebar, currentAction }: SideBarProps) => {
</div>
) : (
<div className="h-min">
- <div className="flex flex-row px-4 py-3 border-b border-mineshaft-500 justify-between items-center">
- <p className="font-semibold text-lg text-bunker-200">
- {t(`activity:event.${actionMetaData?.name}`)}
+ <div className="flex flex-row items-center justify-between border-b border-mineshaft-500 px-4 py-3">
+ <p className="text-lg font-semibold text-bunker-200">
+ {t(`activity.event.${actionMetaData?.name}`)}
</p>
<div
className="p-1"
@@ -153,31 +153,35 @@ const ActivitySideBar = ({ toggleSidebar, currentAction }: SideBarProps) => {
tabIndex={0}
onClick={() => toggleSidebar('')}
>
- <FontAwesomeIcon icon={faXmark} className="w-4 h-4 text-bunker-300 cursor-pointer" />
+ <FontAwesomeIcon icon={faXmark} className="h-4 w-4 cursor-pointer text-bunker-300" />
</div>
</div>
- <div className="flex flex-col px-4 overflow-y-auto h-[calc(100vh-120px)] overflow-y-autp">
+ <div className="overflow-y-autp flex h-[calc(100vh-120px)] flex-col overflow-y-auto px-4">
{(actionMetaData?.name === 'readSecrets' ||
actionMetaData?.name === 'addSecrets' ||
actionMetaData?.name === 'deleteSecrets') &&
actionData?.map((item, id) => (
<div key={`secret.${id + 1}`}>
- <div className="text-xs text-bunker-200 mt-4 pl-1 ph-no-capture">
+ <div className="ph-no-capture mt-4 pl-1 text-xs text-bunker-200">
{item.newSecretVersion.key}
</div>
- <div className='w-full font-mono text-sm break-all bg-mineshaft-600 px-2 py-0.5 rounded-md border border-mineshaft-500 text-bunker-200'>
- {item.newSecretVersion.value ? <span> {item.newSecretVersion.value} </span> : <span className='text-bunker-400'> EMPTY </span>}
+ <div className="w-full break-all rounded-md border border-mineshaft-500 bg-mineshaft-600 px-2 py-0.5 font-mono text-sm text-bunker-200">
+ {item.newSecretVersion.value ? (
+ <span> {item.newSecretVersion.value} </span>
+ ) : (
+ <span className="text-bunker-400"> EMPTY </span>
+ )}
</div>
</div>
))}
{actionMetaData?.name === 'updateSecrets' &&
actionData?.map((item, id) => (
<>
- <div className="text-xs text-bunker-200 mt-4 pl-1">
+ <div className="mt-4 pl-1 text-xs text-bunker-200">
{item.newSecretVersion.key}
</div>
- <div className="break-all text-bunker-200 font-mono rounded-md overflow-hidden border border-mineshaft-500">
- <div className="bg-red/40 px-2 ph-no-capture">
+ <div className="overflow-hidden break-all rounded-md border border-mineshaft-500 font-mono text-bunker-200">
+ <div className="ph-no-capture bg-red/40 px-2">
-{' '}
{patienceDiff(
item.oldSecretVersion.value.split(''),
@@ -188,14 +192,16 @@ const ActivitySideBar = ({ toggleSidebar, currentAction }: SideBarProps) => {
character.bIndex !== -1 && (
<span
key={`actionData.${id + 1}.line.${lineId + 1}`}
- className={`${character.aIndex === -1 && 'text-bunker-100 bg-red-700/80'}`}
+ className={`${
+ character.aIndex === -1 && 'bg-red-700/80 text-bunker-100'
+ }`}
>
{character.line}
</span>
)
)}
</div>
- <div className="break-all bg-green-500/40 px-2 ph-no-capture">
+ <div className="ph-no-capture break-all bg-green-500/40 px-2">
+{' '}
{patienceDiff(
item.oldSecretVersion.value.split(''),
@@ -206,7 +212,9 @@ const ActivitySideBar = ({ toggleSidebar, currentAction }: SideBarProps) => {
character.aIndex !== -1 && (
<span
key={`actionData.${id + 1}.linev2.${lineId + 1}`}
- className={`${character.bIndex === -1 && 'text-bunker-100 bg-green-700/80'}`}
+ className={`${
+ character.bIndex === -1 && 'bg-green-700/80 text-bunker-100'
+ }`}
>
{character.line}
</span>
diff --git a/frontend/src/ee/components/ActivityTable.tsx b/frontend/src/ee/components/ActivityTable.tsx
index eec8a21fc9..61217de8e9 100644
--- a/frontend/src/ee/components/ActivityTable.tsx
+++ b/frontend/src/ee/components/ActivityTable.tsx
@@ -1,7 +1,7 @@
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import React, { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
-import { useTranslation } from 'next-i18next';
import { faAngleDown, faAngleRight, faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -51,43 +51,42 @@ const ActivityLogsRow = ({
if (row?.user) return `User: ${row.user}`;
if (row?.serviceAccount) return `Service Account: ${row.serviceAccount.name}`;
if (row?.serviceTokenData.name) return `Service Token: ${row.serviceTokenData.name}`;
-
- return '';
- }
+ return '';
+ };
return (
<>
- <tr key={guidGenerator()} className="bg-bunker-800 duration-100 w-full text-sm">
+ <tr key={guidGenerator()} className="w-full bg-bunker-800 text-sm duration-100">
<td
onKeyDown={() => null}
onClick={() => setPayloadOpened(!payloadOpened)}
- className="border-mineshaft-700 border-t text-gray-300 flex items-center cursor-pointer"
+ className="flex cursor-pointer items-center border-t border-mineshaft-700 text-gray-300"
>
<FontAwesomeIcon
icon={payloadOpened ? faAngleDown : faAngleRight}
className={`mt-2.5 ml-6 text-bunker-100 hover:bg-mineshaft-700 ${
payloadOpened && 'bg-mineshaft-500'
- } p-1 duration-100 h-4 w-4 rounded-md`}
+ } h-4 w-4 rounded-md p-1 duration-100`}
/>
</td>
- <td className="py-3 border-mineshaft-700 border-t text-gray-300">
+ <td className="border-t border-mineshaft-700 py-3 text-gray-300">
{row.payload
?.map(
(action) =>
- `${String(action.secretVersions.length)} ${t(`activity:event.${action.name}`)}`
+ `${String(action.secretVersions.length)} ${t(`activity.event.${action.name}`)}`
)
.join(' and ')}
</td>
- <td className="pl-6 py-3 border-mineshaft-700 border-t text-gray-300">{renderUser()}</td>
- <td className="pl-6 py-3 border-mineshaft-700 border-t text-gray-300">{row.channel}</td>
- <td className="pl-6 py-3 border-mineshaft-700 border-t text-gray-300">
+ <td className="border-t border-mineshaft-700 py-3 pl-6 text-gray-300">{renderUser()}</td>
+ <td className="border-t border-mineshaft-700 py-3 pl-6 text-gray-300">{row.channel}</td>
+ <td className="border-t border-mineshaft-700 py-3 pl-6 text-gray-300">
{timeSince(new Date(row.createdAt))}
</td>
</tr>
{payloadOpened && (
- <tr className="h-9 text-bunker-200 border-mineshaft-700 border-t text-sm">
+ <tr className="h-9 border-t border-mineshaft-700 text-sm text-bunker-200">
<td />
- <td>{String(t('common:timestamp'))}</td>
+ <td>{String(t('common.timestamp'))}</td>
<td>{row.createdAt}</td>
</tr>
)}
@@ -97,29 +96,29 @@ const ActivityLogsRow = ({
action.secretVersions.length > 0 && (
<tr
key={action._id}
- className="h-9 text-bunker-200 border-mineshaft-700 border-t text-sm"
+ className="h-9 border-t border-mineshaft-700 text-sm text-bunker-200"
>
<td />
- <td className="">{t(`activity:event.${action.name}`)}</td>
+ <td className="">{t(`activity.event.${action.name}`)}</td>
<td
onKeyDown={() => null}
- className="text-primary-300 cursor-pointer hover:text-primary duration-200"
+ className="cursor-pointer text-primary-300 duration-200 hover:text-primary"
onClick={() => toggleSidebar(action._id)}
>
{action.secretVersions.length +
(action.secretVersions.length !== 1 ? ' secrets' : ' secret')}
<FontAwesomeIcon
icon={faUpRightFromSquare}
- className="ml-2 mb-0.5 font-light w-3 h-3"
+ className="ml-2 mb-0.5 h-3 w-3 font-light"
/>
</td>
</tr>
)
)}
{payloadOpened && (
- <tr className="h-9 text-bunker-200 border-mineshaft-700 border-t text-sm">
+ <tr className="h-9 border-t border-mineshaft-700 text-sm text-bunker-200">
<td />
- <td>{String(t('activity:ip-address'))}</td>
+ <td>{String(t('activity.ip-address'))}</td>
<td>{row.ipAddress}</td>
</tr>
)}
@@ -147,24 +146,24 @@ const ActivityTable = ({
const { t } = useTranslation();
return (
- <div className="w-full px-6 mt-8">
- <div className="table-container w-full bg-bunker rounded-md mb-6 border border-mineshaft-700 relative">
- <div className="absolute rounded-t-md w-full h-[3rem] bg-white/5" />
- <table className="w-full my-1">
+ <div className="mt-8 w-full px-6">
+ <div className="table-container relative mb-6 w-full rounded-md border border-mineshaft-700 bg-bunker">
+ <div className="absolute h-[3rem] w-full rounded-t-md bg-white/5" />
+ <table className="my-1 w-full">
<thead className="text-bunker-300">
<tr className="text-sm">
- <th aria-label="actions" className="text-left pl-6 pt-2.5 pb-3" />
- <th className="text-left font-semibold pt-2.5 pb-3">
- {String(t('common:event')).toUpperCase()}
+ <th aria-label="actions" className="pl-6 pt-2.5 pb-3 text-left" />
+ <th className="pt-2.5 pb-3 text-left font-semibold">
+ {String(t('common.event')).toUpperCase()}
</th>
- <th className="text-left font-semibold pl-6 pt-2.5 pb-3">
- {String(t('common:user')).toUpperCase()}
+ <th className="pl-6 pt-2.5 pb-3 text-left font-semibold">
+ {String(t('common.user')).toUpperCase()}
</th>
- <th className="text-left font-semibold pl-6 pt-2.5 pb-3">
- {String(t('common:source')).toUpperCase()}
+ <th className="pl-6 pt-2.5 pb-3 text-left font-semibold">
+ {String(t('common.source')).toUpperCase()}
</th>
- <th className="text-left font-semibold pl-6 pt-2.5 pb-3">
- {String(t('common:time')).toUpperCase()}
+ <th className="pl-6 pt-2.5 pb-3 text-left font-semibold">
+ {String(t('common.time')).toUpperCase()}
</th>
<th aria-label="action" />
</tr>
@@ -181,7 +180,7 @@ const ActivityTable = ({
</table>
</div>
{isLoading && (
- <div className="w-full flex justify-center mb-8 mt-4">
+ <div className="mb-8 mt-4 flex w-full justify-center">
<Image
src="/images/loading/loading.gif"
height={60}
diff --git a/frontend/src/ee/components/PITRecoverySidebar.tsx b/frontend/src/ee/components/PITRecoverySidebar.tsx
index e72f05cc91..f101a76899 100644
--- a/frontend/src/ee/components/PITRecoverySidebar.tsx
+++ b/frontend/src/ee/components/PITRecoverySidebar.tsx
@@ -2,7 +2,6 @@
import { useEffect, useState } from 'react';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faXmark } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Tag } from 'public/data/frequentInterfaces';
@@ -60,7 +59,6 @@ interface EncrypetedSecretVersionListProps {
* @returns the sidebar with the options for point-in-time recovery (commits)
*/
const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }: SideBarProps) => {
- const { t } = useTranslation();
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [secretSnapshotsMetadata, setSecretSnapshotsMetadata] = useState<SnaphotProps[]>([]);
@@ -102,10 +100,12 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
});
}
- const decryptedSecretVersions = secretSnapshotData.secretVersions.filter(
- (sv: EncrypetedSecretVersionListProps) => (sv.type !== undefined && sv.environment !== undefined)
- ).map(
- (encryptedSecretVersion: EncrypetedSecretVersionListProps, pos: number) => ({
+ const decryptedSecretVersions = secretSnapshotData.secretVersions
+ .filter(
+ (sv: EncrypetedSecretVersionListProps) =>
+ sv.type !== undefined && sv.environment !== undefined
+ )
+ .map((encryptedSecretVersion: EncrypetedSecretVersionListProps, pos: number) => ({
id: encryptedSecretVersion._id,
pos,
type: encryptedSecretVersion.type,
@@ -123,53 +123,59 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
tag: encryptedSecretVersion.secretValueTag,
key: decryptedLatestKey
})
- })
- );
+ }));
const secretKeys = [
- ...new Set(decryptedSecretVersions.filter((dsv: any) => dsv.type !== undefined || dsv.environemnt !== undefined)
- .map((secret: SecretDataProps) => secret.key))
+ ...new Set(
+ decryptedSecretVersions
+ .filter((dsv: any) => dsv.type !== undefined || dsv.environemnt !== undefined)
+ .map((secret: SecretDataProps) => secret.key)
+ )
];
- const result = secretKeys.map((key, index) => (decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0]?.id ? {
- id: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0].id,
- pos: index,
- key,
- environment: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0].environment,
- tags: decryptedSecretVersions.filter(
+ const result = secretKeys.map((key, index) =>
+ decryptedSecretVersions.filter(
(secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0].tags,
- value: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0]?.value,
- valueOverride: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
- )[0]?.value
- } : {
- id: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
- )[0].id,
- pos: index,
- key,
- environment: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
- )[0].environment,
- tags: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
- )[0].tags,
- value: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
- )[0]?.value,
- valueOverride: decryptedSecretVersions.filter(
- (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
- )[0]?.value
- }));
+ )[0]?.id
+ ? {
+ id: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
+ )[0].id,
+ pos: index,
+ key,
+ environment: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
+ )[0].environment,
+ tags: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
+ )[0].tags,
+ value: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
+ )[0]?.value,
+ valueOverride: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
+ )[0]?.value
+ }
+ : {
+ id: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
+ )[0].id,
+ pos: index,
+ key,
+ environment: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
+ )[0].environment,
+ tags: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
+ )[0].tags,
+ value: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'shared'
+ )[0]?.value,
+ valueOverride: decryptedSecretVersions.filter(
+ (secret: SecretDataProps) => secret.key === key && secret.type === 'personal'
+ )[0]?.value
+ }
+ );
setSnapshotData({
id: secretSnapshotData._id,
@@ -182,12 +188,12 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
return (
<div
- className={`absolute border-l border-mineshaft-500 w-full min-w-sm max-w-sm ${
+ className={`min-w-sm absolute w-full max-w-sm border-l border-mineshaft-500 ${
isLoading ? 'bg-bunker-800' : 'bg-bunker'
- } fixed h-full right-0 z-[40] shadow-xl flex flex-col justify-between sticky top-0`}
+ } fixed sticky right-0 top-0 z-[40] flex h-full flex-col justify-between shadow-xl`}
>
{isLoading ? (
- <div className="flex items-center justify-center h-full mb-8">
+ <div className="mb-8 flex h-full items-center justify-center">
<Image
src="/images/loading/loading.gif"
height={60}
@@ -197,8 +203,8 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
</div>
) : (
<div className="h-min">
- <div className="flex flex-row px-4 py-3 border-b border-mineshaft-500 justify-between items-center">
- <p className="font-semibold text-lg text-bunker-200">{t('Point-in-time Recovery')}</p>
+ <div className="flex flex-row items-center justify-between border-b border-mineshaft-500 px-4 py-3">
+ <p className="text-lg font-semibold text-bunker-200">Point In Recovery</p>
<div
onKeyDown={() => null}
role="button"
@@ -206,11 +212,13 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
className="p-1"
onClick={() => toggleSidebar(false)}
>
- <FontAwesomeIcon icon={faXmark} className="w-4 h-4 text-bunker-300 cursor-pointer" />
+ <FontAwesomeIcon icon={faXmark} className="h-4 w-4 cursor-pointer text-bunker-300" />
</div>
</div>
- <div className="flex flex-col w-96 px-2 py-2 overflow-y-auto bg-bunker border-l border-mineshaft-600 h-[calc(100vh-115px)]">
- <span className='px-2 text-bunker-200 pb-2 text-sm'>Note: This will recover secrets for all enviroments in this project.</span>
+ <div className="flex h-[calc(100vh-115px)] w-96 flex-col overflow-y-auto border-l border-mineshaft-600 bg-bunker px-2 py-2">
+ <span className="px-2 pb-2 text-sm text-bunker-200">
+ Note: This will recover secrets for all enviroments in this project.
+ </span>
{secretSnapshotsMetadata?.map((snapshot: SnaphotProps, id: number) => (
<div
onKeyDown={() => null}
@@ -220,9 +228,9 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
onClick={() => exploreSnapshot({ snapshotId: snapshot._id })}
className={`${
chosenSnapshot === snapshot._id || (id === 0 && chosenSnapshot === '')
- ? 'bg-primary text-black pointer-events-none'
- : 'bg-mineshaft-700 hover:bg-mineshaft-500 duration-200 cursor-pointer'
- } py-3 px-4 mb-2 rounded-md flex flex-row justify-between items-center`}
+ ? 'pointer-events-none bg-primary text-black'
+ : 'cursor-pointer bg-mineshaft-700 duration-200 hover:bg-mineshaft-500'
+ } mb-2 flex flex-row items-center justify-between rounded-md py-3 px-4`}
>
<div className="flex flex-row items-start">
<div
@@ -230,7 +238,7 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
chosenSnapshot === snapshot._id || (id === 0 && chosenSnapshot === '')
? 'text-bunker-800'
: 'text-bunker-200'
- } text-sm mr-1.5`}
+ } mr-1.5 text-sm`}
>
{timeSince(new Date(snapshot.createdAt))}
</div>
@@ -245,8 +253,8 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
<div
className={`${
chosenSnapshot === snapshot._id || (id === 0 && chosenSnapshot === '')
- ? 'text-bunker-800 pointer-events-none'
- : 'text-bunker-200 hover:text-primary duration-200 cursor-pointer'
+ ? 'pointer-events-none text-bunker-800'
+ : 'cursor-pointer text-bunker-200 duration-200 hover:text-primary'
} text-sm`}
>
{id === 0
@@ -257,8 +265,8 @@ const PITRecoverySidebar = ({ toggleSidebar, setSnapshotData, chosenSnapshot }:
</div>
</div>
))}
- <div className="flex justify-center w-full mb-14">
- <div className="items-center w-40">
+ <div className="mb-14 flex w-full justify-center">
+ <div className="w-40 items-center">
<Button
text="View More"
textDisabled="End of History"
diff --git a/frontend/src/ee/components/SecretVersionList.tsx b/frontend/src/ee/components/SecretVersionList.tsx
index dbf7c5bf25..6e217be5a2 100644
--- a/frontend/src/ee/components/SecretVersionList.tsx
+++ b/frontend/src/ee/components/SecretVersionList.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faCircle, faDotCircle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -76,11 +76,11 @@ const SecretVersionList = ({ secretId }: { secretId: string }) => {
}, [secretId]);
return (
- <div className="w-full min-w-40 h-[12.4rem] px-4 mt-4 text-sm text-bunker-300 overflow-x-none dark">
- <p className="">{t('dashboard:sidebar.version-history')}</p>
- <div className="pl-1 py-0.5 rounded-md bg-bunker-800 border border-mineshaft-500 overflow-x-none h-full">
+ <div className="min-w-40 overflow-x-none dark mt-4 h-[12.4rem] w-full px-4 text-sm text-bunker-300">
+ <p className="">{t('dashboard.sidebar.version-history')}</p>
+ <div className="overflow-x-none h-full rounded-md border border-mineshaft-500 bg-bunker-800 py-0.5 pl-1">
{isLoading ? (
- <div className="flex items-center justify-center h-full">
+ <div className="flex h-full items-center justify-center">
<Image
src="/images/loading/loading.gif"
height={60}
@@ -89,19 +89,19 @@ const SecretVersionList = ({ secretId }: { secretId: string }) => {
/>
</div>
) : (
- <div className="h-48 overflow-y-auto overflow-x-none dark:[color-scheme:dark]">
+ <div className="overflow-x-none h-48 overflow-y-auto dark:[color-scheme:dark]">
{secretVersions ? (
secretVersions
?.sort((a, b) => b.createdAt.localeCompare(a.createdAt))
.map((version: DecryptedSecretVersionListProps, index: number) => (
<div key={`${version.createdAt}.${index + 1}`} className="flex flex-row">
- <div className="pr-1 flex flex-col items-center">
+ <div className="flex flex-col items-center pr-1">
<div className="p-1">
<FontAwesomeIcon icon={index === 0 ? faDotCircle : faCircle} />
</div>
- <div className="w-0 h-full border-l border-bunker-300 mt-1" />
+ <div className="mt-1 h-full w-0 border-l border-bunker-300" />
</div>
- <div className="flex flex-col w-full max-w-[calc(100%-2.3rem)]">
+ <div className="flex w-full max-w-[calc(100%-2.3rem)] flex-col">
<div className="pr-2 text-bunker-300/90">
{new Date(version.createdAt).toLocaleDateString('en-US', {
year: 'numeric',
@@ -113,18 +113,18 @@ const SecretVersionList = ({ secretId }: { secretId: string }) => {
})}
</div>
<div className="">
- <p className="break-words ph-no-capture">
- <span className="py-0.5 px-1 rounded-sm bg-primary-500/30 mr-1.5">
+ <p className="ph-no-capture break-words">
+ <span className="mr-1.5 rounded-sm bg-primary-500/30 py-0.5 px-1">
Value:
</span>
- <span className='font-mono'>{version.value}</span>
+ <span className="font-mono">{version.value}</span>
</p>
</div>
</div>
</div>
))
) : (
- <div className="w-full h-full flex items-center justify-center text-bunker-400">
+ <div className="flex h-full w-full items-center justify-center text-bunker-400">
No version history yet.
</div>
)}
diff --git a/frontend/src/i18n.ts b/frontend/src/i18n.ts
new file mode 100644
index 0000000000..128f629246
--- /dev/null
+++ b/frontend/src/i18n.ts
@@ -0,0 +1,37 @@
+import { initReactI18next } from 'react-i18next';
+import i18n from 'i18next';
+import LanguageDetector from 'i18next-browser-languagedetector';
+import Backend from 'i18next-http-backend';
+// don't want to use this?
+// have a look at the Quick start guide
+// for passing in lng and translations on init
+
+i18n
+ // load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales)
+ // learn more: https://github.com/i18next/i18next-http-backend
+ // want your translations to be loaded from a professional CDN? => https://github.com/locize/react-tutorial#step-2---use-the-locize-cdn
+ .use(Backend)
+ // detect user language
+ // learn more: https://github.com/i18next/i18next-browser-languageDetector
+ .use(LanguageDetector)
+ // pass the i18n instance to react-i18next.
+ .use(initReactI18next)
+ // init i18next
+ // for all options read: https://www.i18next.com/overview/configuration-options
+ .init({
+ fallbackLng: 'en',
+ supportedLngs: ['en', 'ko', 'fr', 'pt-BR', 'pt-PT', 'es'],
+ debug: process.env.NODE_ENV === 'development',
+ detection: {
+ lookupLocalStorage: 'lang'
+ },
+ ns: ['translations'],
+ interpolation: {
+ escapeValue: false // not needed for react as it escapes by default
+ },
+ react: {
+ useSuspense: false
+ }
+ });
+
+export default i18n;
diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx
index 4c1f15ebdf..2ff25d5b14 100644
--- a/frontend/src/layouts/AppLayout/AppLayout.tsx
+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx
@@ -5,9 +5,9 @@ import crypto from 'crypto';
import { useEffect, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
+import { useTranslation } from 'react-i18next';
import Link from 'next/link';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faBookOpen, faMobile, faPlus } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { yupResolver } from '@hookform/resolvers/yup';
@@ -54,9 +54,8 @@ export const AppLayout = ({ children }: LayoutProps) => {
const { createNotification } = useNotificationContext();
// eslint-disable-next-line prefer-const
- let { workspaces, currentWorkspace } = useWorkspace();
+ const { workspaces, currentWorkspace } = useWorkspace();
const { currentOrg } = useOrganization();
- workspaces = workspaces.filter((ws) => ws.organization === currentOrg?._id);
const { user } = useUser();
const createWs = useCreateWorkspace();
@@ -257,15 +256,17 @@ export const AppLayout = ({ children }: LayoutProps) => {
position="popper"
dropdownContainerClassName="text-bunker-200 bg-mineshaft-800 border border-mineshaft-600 z-50"
>
- {workspaces.map(({ _id, name }) => (
- <SelectItem
- key={`ws-layout-list-${_id}`}
- value={_id}
- className={`${currentWorkspace?._id === _id && 'bg-mineshaft-600'}`}
- >
- {name}
- </SelectItem>
- ))}
+ {workspaces
+ .filter((ws) => ws.organization === currentOrg?._id)
+ .map(({ _id, name }) => (
+ <SelectItem
+ key={`ws-layout-list-${_id}`}
+ value={_id}
+ className={`${currentWorkspace?._id === _id && 'bg-mineshaft-600'}`}
+ >
+ {name}
+ </SelectItem>
+ ))}
{/* <hr className="mt-1 mb-1 h-px border-0 bg-gray-700" /> */}
<div className="w-full">
<Button
@@ -302,7 +303,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
isSelected={router.asPath.includes(`/dashboard/${currentWorkspace?._id}`)}
icon="system-outline-90-lock-closed"
>
- {t('nav:menu.secrets')}
+ {t('nav.menu.secrets')}
</MenuItem>
</a>
</Link>
@@ -312,7 +313,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
isSelected={router.asPath === `/users/${currentWorkspace?._id}`}
icon="system-outline-96-groups"
>
- {t('nav:menu.members')}
+ {t('nav.menu.members')}
</MenuItem>
</a>
</Link>
@@ -322,7 +323,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
isSelected={router.asPath === `/integrations/${currentWorkspace?._id}`}
icon="system-outline-82-extension"
>
- {t('nav:menu.integrations')}
+ {t('nav.menu.integrations')}
</MenuItem>
</a>
</Link>
@@ -343,7 +344,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
}
icon="system-outline-109-slider-toggle-settings"
>
- {t('nav:menu.project-settings')}
+ {t('nav.menu.project-settings')}
</MenuItem>
</a>
</Link>
@@ -471,7 +472,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
<div className="z-[200] flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
<FontAwesomeIcon icon={faMobile} className="mb-8 text-7xl text-gray-300" />
<p className="max-w-sm px-6 text-center text-lg text-gray-200">
- {` ${t('common:no-mobile')} `}
+ {` ${t('common.no-mobile')} `}
</p>
</div>
</>
diff --git a/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx b/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx
index dce6f66988..f1cee1cb36 100644
--- a/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx
+++ b/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx
@@ -1,9 +1,9 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable react/jsx-key */
import { Fragment, useMemo } from 'react';
+import { useTranslation } from 'react-i18next';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { TFunction, useTranslation } from 'next-i18next';
import { faGithub, faSlack } from '@fortawesome/free-brands-svg-icons';
import { faCircleQuestion } from '@fortawesome/free-regular-svg-icons';
import {
@@ -17,6 +17,7 @@ import {
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Menu, Transition } from '@headlessui/react';
+import {TFunction} from 'i18next';
import guidGenerator from '@app/components/utilities/randomId';
import { useOrganization, useUser } from '@app/context';
@@ -25,22 +26,22 @@ import { useLogoutUser } from '@app/hooks/api';
const supportOptions = (t: TFunction) => [
[
<FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faSlack} />,
- t('nav:support.slack'),
+ t('nav.support.slack'),
'https://infisical.com/slack'
],
[
<FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faBook} />,
- t('nav:support.docs'),
+ t('nav.support.docs'),
'https://infisical.com/docs/documentation/getting-started/introduction'
],
[
<FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faGithub} />,
- t('nav:support.issue'),
+ t('nav.support.issue'),
'https://github.com/Infisical/infisical-cli/issues'
],
[
<FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faEnvelope} />,
- t('nav:support.email'),
+ t('nav.support.email'),
]
];
@@ -170,7 +171,7 @@ export const Navbar = () => {
<Menu.Items className="absolute right-0 z-[125] mt-0.5 w-68 origin-top-right divide-y divide-mineshaft-700 drop-shadow-2xl rounded-md border border-mineshaft-700 bg-mineshaft-900 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
<div className="px-1 py-1">
<div className="ml-2 mt-2 self-start text-xs font-semibold tracking-wide text-gray-400">
- {t('nav:user.signed-in-as')}
+ {t('nav.user.signed-in-as')}
</div>
<div
onKeyDown={() => null}
@@ -199,7 +200,7 @@ export const Navbar = () => {
</div>
<div className="px-2 pt-2">
<div className="ml-2 mt-2 self-start text-xs font-semibold tracking-wide text-gray-400">
- {t('nav:user.current-organization')}
+ {t('nav.user.current-organization')}
</div>
<div
onKeyDown={() => null}
@@ -232,7 +233,7 @@ export const Navbar = () => {
className="relative mt-1 flex cursor-pointer select-none justify-start rounded-md py-2 px-2 text-gray-400 duration-200 hover:bg-white/5 hover:text-gray-200"
>
<FontAwesomeIcon className="pl-1.5 pr-3 text-lg" icon={faCoins} />
- <div className="text-sm">{t('nav:user.usage-billing')}</div>
+ <div className="text-sm">{t('nav.user.usage-billing')}</div>
</div>
</button>
<button
@@ -250,14 +251,14 @@ export const Navbar = () => {
<span className="absolute inset-y-0 left-0 flex items-center rounded-lg pl-3 pr-4">
<FontAwesomeIcon icon={faPlus} className="ml-1" />
</span>
- <div className="ml-1 text-sm">{t('nav:user.invite')}</div>
+ <div className="ml-1 text-sm">{t('nav.user.invite')}</div>
</div>
</button>
</div>
{orgs && orgs?.length > 1 && (
<div className="px-1 pt-1">
<div className="ml-2 mt-2 self-start text-xs font-semibold tracking-wide text-gray-400">
- {t('nav:user.other-organizations')}
+ {t('nav.user.other-organizations')}
</div>
<div className="mt-3 mb-2 flex flex-col items-start px-1">
{orgs
@@ -300,7 +301,7 @@ export const Navbar = () => {
className="ml-1.5 mr-3 text-lg"
icon={faRightFromBracket}
/>
- {t('common:logout')}
+ {t('common.logout')}
</div>
</button>
)}
diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx
index 30d2623b55..81379cbba5 100644
--- a/frontend/src/pages/_app.tsx
+++ b/frontend/src/pages/_app.tsx
@@ -2,7 +2,6 @@
import { useEffect } from 'react';
import { AppProps } from 'next/app';
import { useRouter } from 'next/router';
-import { appWithTranslation } from 'next-i18next';
import { config } from '@fortawesome/fontawesome-svg-core';
import { QueryClientProvider } from '@tanstack/react-query';
@@ -23,6 +22,8 @@ import { queryClient } from '@app/reactQuery';
import '@fortawesome/fontawesome-svg-core/styles.css';
import '../styles/globals.css';
+import '@app/i18n';
+
config.autoAddCss = false;
type NextAppProp = AppProps & {
@@ -32,15 +33,6 @@ type NextAppProp = AppProps & {
const App = ({ Component, pageProps, ...appProps }: NextAppProp): JSX.Element => {
const router = useRouter();
- useEffect(() => {
- const storedLang = localStorage.getItem('lang');
- if (router.locale ?? storedLang !== 'en' ?? 'en') {
- router.push(router.asPath, router.asPath, {
- locale: storedLang ?? 'en'
- });
- }
- }, [router.locale, router.pathname]);
-
useEffect(() => {
// Init for auto capturing
const telemetry = new Telemetry().getInstance();
@@ -95,7 +87,7 @@ const App = ({ Component, pageProps, ...appProps }: NextAppProp): JSX.Element =>
);
};
-export default appWithTranslation(App);
+export default App;
/* <Script
src="https://www.googletagmanager.com/gtag/js?id=G-DQ1XLJJGG1"
diff --git a/frontend/src/pages/activity/[id].tsx b/frontend/src/pages/activity/[id].tsx
index c43a6745db..8f2694713b 100644
--- a/frontend/src/pages/activity/[id].tsx
+++ b/frontend/src/pages/activity/[id].tsx
@@ -1,12 +1,11 @@
import React, { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import Button from '@app/components/basic/buttons/Button';
import EventFilter from '@app/components/basic/EventFilter';
import NavHeader from '@app/components/navigation/NavHeader';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import ActivitySideBar from '@app/ee/components/ActivitySideBar';
import getProjectLogs from '../../ee/api/secrets/GetProjectLogs';
@@ -154,9 +153,9 @@ export default function Activity() {
)}
<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 text-bunker-100">{t('activity:title')}</p>
+ <p className="font-semibold mr-4 text-bunker-100">{t('activity.title')}</p>
</div>
- <p className="mr-4 text-base text-gray-400">{t('activity:subtitle')}</p>
+ <p className="mr-4 text-base text-gray-400">{t('activity.subtitle')}</p>
</div>
<div className="px-6 h-8 mt-2">
<EventFilter selected={eventChosen} select={setEventChosen} />
@@ -165,8 +164,8 @@ export default function Activity() {
<div className="flex justify-center w-full mb-6">
<div className="items-center w-60">
<Button
- text={String(t('common:view-more'))}
- textDisabled={String(t('common:end-of-history'))}
+ text={String(t('common.view-more'))}
+ textDisabled={String(t('common.end-of-history'))}
active={logsData.length % 10 === 0}
onButtonPressed={loadMoreLogs}
size="md"
@@ -180,4 +179,3 @@ export default function Activity() {
Activity.requireAuth = true;
-export const getServerSideProps = getTranslatedServerSideProps(['activity', 'common']);
diff --git a/frontend/src/pages/dashboard/[id].tsx b/frontend/src/pages/dashboard/[id].tsx
index 979dc3b649..8d31b42917 100644
--- a/frontend/src/pages/dashboard/[id].tsx
+++ b/frontend/src/pages/dashboard/[id].tsx
@@ -2,7 +2,6 @@ import { useTranslation } from 'react-i18next';
import Head from 'next/head';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import { DashboardPage } from '@app/views/DashboardPage';
import { DashboardEnvOverview } from '@app/views/DashboardPage/DashboardEnvOverview';
@@ -23,11 +22,11 @@ const Dashboard = () => {
return (
<>
<Head>
- <title>{t('common:head-title', { title: t('dashboard:title') })}</title>
+ <title>{t('common.head-title', { title: t('dashboard.title') })}</title>
<link rel="icon" href="/infisical.ico" />
<meta property="og:image" content="/images/message.png" />
- <meta property="og:title" content={String(t('dashboard:og-title'))} />
- <meta name="og:description" content={String(t('dashboard:og-description'))} />
+ <meta property="og:title" content={String(t('dashboard.og-title'))} />
+ <meta name="og:description" content={String(t('dashboard.og-description'))} />
</Head>
<div className="h-full">
{isOverviewMode ? (
@@ -43,5 +42,3 @@ const Dashboard = () => {
export default Dashboard;
Dashboard.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['dashboard']);
diff --git a/frontend/src/pages/home/[id].tsx b/frontend/src/pages/home/[id].tsx
index 8eb253e7e4..e100eab4b0 100644
--- a/frontend/src/pages/home/[id].tsx
+++ b/frontend/src/pages/home/[id].tsx
@@ -16,7 +16,6 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import onboardingCheck from '@app/components/utilities/checks/OnboardingCheck';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import { TabsObject } from '@app/components/v2/Tabs';
import registerUserAction from '../api/userActions/registerUserAction';
@@ -45,7 +44,7 @@ const learningItem = ({
<a
target={`${link.includes('https') ? '_blank' : '_self'}`}
rel="noopener noreferrer"
- className={`w-full ${complete && 'opacity-30 hover:opacity-100 duration-200'}`}
+ className={`w-full ${complete && 'opacity-30 duration-200 hover:opacity-100'}`}
href={link}
>
<div
@@ -59,22 +58,22 @@ const learningItem = ({
});
}
}}
- className="relative group bg-bunker-500 hover:bg-mineshaft-700 shadow-xl duration-200 rounded-md border border-mineshaft-600 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden mb-3 cursor-pointer"
+ className="group relative mb-3 flex h-[5.5rem] w-full cursor-pointer items-center justify-between overflow-hidden rounded-md border border-mineshaft-600 bg-bunker-500 py-2 pl-2 pr-6 shadow-xl duration-200 hover:bg-mineshaft-700"
>
- <div className="flex flex-row items-center mr-4">
- <FontAwesomeIcon icon={icon} className="text-4xl mx-2 w-16" />
+ <div className="mr-4 flex flex-row items-center">
+ <FontAwesomeIcon icon={icon} className="mx-2 w-16 text-4xl" />
{complete && (
- <div className="bg-bunker-500 group-hover:bg-mineshaft-700 w-7 h-7 rounded-full absolute left-12 top-10 p-2 flex items-center justify-center">
- <FontAwesomeIcon icon={faCheckCircle} className="text-4xl w-5 h-5 text-primary" />
+ <div className="absolute left-12 top-10 flex h-7 w-7 items-center justify-center rounded-full bg-bunker-500 p-2 group-hover:bg-mineshaft-700">
+ <FontAwesomeIcon icon={faCheckCircle} className="h-5 w-5 text-4xl text-primary" />
</div>
)}
<div className="flex flex-col items-start">
- <div className="text-xl font-semibold mt-0.5">{text}</div>
+ <div className="mt-0.5 text-xl font-semibold">{text}</div>
<div className="text-sm font-normal">{subText}</div>
</div>
</div>
<div
- className={`pr-4 font-semibold text-sm w-28 text-right ${complete && 'text-primary'}`}
+ className={`w-28 pr-4 text-right text-sm font-semibold ${complete && 'text-primary'}`}
>
{complete ? 'Complete!' : `About ${time}`}
</div>
@@ -95,24 +94,24 @@ const learningItem = ({
});
}
}}
- className="relative bg-bunker-700 hover:bg-bunker-500 shadow-xl duration-200 rounded-md border border-dashed border-bunker-400 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden my-1.5 cursor-pointer"
+ className="relative my-1.5 flex h-[5.5rem] w-full cursor-pointer items-center justify-between overflow-hidden rounded-md border border-dashed border-bunker-400 bg-bunker-700 py-2 pl-2 pr-6 shadow-xl duration-200 hover:bg-bunker-500"
>
- <div className="flex flex-row items-center mr-4">
- <FontAwesomeIcon icon={icon} className="text-4xl mx-2 w-16" />
+ <div className="mr-4 flex flex-row items-center">
+ <FontAwesomeIcon icon={icon} className="mx-2 w-16 text-4xl" />
{complete && (
- <div className="bg-bunker-700 w-7 h-7 rounded-full absolute left-11 top-10">
+ <div className="absolute left-11 top-10 h-7 w-7 rounded-full bg-bunker-700">
<FontAwesomeIcon
icon={faCheckCircle}
- className="absolute text-4xl left-12 top-16 w-5 h-5 text-primary"
+ className="absolute left-12 top-16 h-5 w-5 text-4xl text-primary"
/>
</div>
)}
<div className="flex flex-col items-start">
- <div className="text-xl font-semibold mt-0.5">{text}</div>
- <div className="text-sm font-normal mt-0.5">{subText}</div>
+ <div className="mt-0.5 text-xl font-semibold">{text}</div>
+ <div className="mt-0.5 text-sm font-normal">{subText}</div>
</div>
</div>
- <div className={`pr-4 font-semibold text-sm w-28 text-right ${complete && 'text-primary'}`}>
+ <div className={`w-28 pr-4 text-right text-sm font-semibold ${complete && 'text-primary'}`}>
{complete ? 'Complete!' : `About ${time}`}
</div>
{complete && <div className="absolute bottom-0 left-0 h-1 w-full bg-primary" />}
@@ -144,17 +143,24 @@ export default function Home() {
}, []);
return (
- <div className="mx-6 lg:mx-0 w-full pt-4">
+ <div className="mx-6 w-full pt-4 lg:mx-0">
<Head>
<title>Infisical Guide</title>
<link rel="icon" href="/infisical.ico" />
</Head>
- <div className="flex relative flex-col items-center text-gray-300 text-lg mx-auto px-6 max-w-3xl lg:max-w-4xl xl:max-w-5xl py-6">
- <div className="text-5xl font-bold text-left w-full mt-12">Your quick start guide</div>
- <div className="text-lg text-left w-full pt-2 pb-4 mb-14 text-bunker-300">
+ <div className="relative mx-auto flex max-w-3xl flex-col items-center px-6 py-6 text-lg text-gray-300 lg:max-w-4xl xl:max-w-5xl">
+ <div className="mt-12 w-full text-left text-5xl font-bold">Your quick start guide</div>
+ <div className="mb-14 w-full pt-2 pb-4 text-left text-lg text-bunker-300">
Click on the items below and follow the instructions.
</div>
- <div className='absolute h-min top-0 right-0 hidden lg:block'><Image src="/images/dragon-book.svg" height={250} width={400} alt="start guise dragon illustration" /></div>
+ <div className="absolute top-0 right-0 hidden h-min lg:block">
+ <Image
+ src="/images/dragon-book.svg"
+ height={250}
+ width={400}
+ alt="start guise dragon illustration"
+ />
+ </div>
{learningItem({
text: 'Get to know Infisical',
subText: '',
@@ -173,27 +179,27 @@ export default function Home() {
userAction: 'first_time_secrets_pushed',
link: `/dashboard/${router.query.id}`
})}
- <div className="relative group bg-bunker-500 shadow-xl duration-200 rounded-md border border-mineshaft-600 pl-2 pr-2 pt-4 pb-2 h-full w-full flex flex-col items-center justify-between overflow-hidden mb-3 cursor-default">
- <div className='w-full flex flex-row items-center mb-4 pr-4'>
- <div className="flex flex-row items-center mr-4 w-full">
- <FontAwesomeIcon icon={faNetworkWired} className="text-4xl mx-2 w-16" />
+ <div className="group relative mb-3 flex h-full w-full cursor-default flex-col items-center justify-between overflow-hidden rounded-md border border-mineshaft-600 bg-bunker-500 pl-2 pr-2 pt-4 pb-2 shadow-xl duration-200">
+ <div className="mb-4 flex w-full flex-row items-center pr-4">
+ <div className="mr-4 flex w-full flex-row items-center">
+ <FontAwesomeIcon icon={faNetworkWired} className="mx-2 w-16 text-4xl" />
{false && (
- <div className="bg-bunker-500 group-hover:bg-mineshaft-700 w-7 h-7 rounded-full absolute left-12 top-10 p-2 flex items-center justify-center">
- <FontAwesomeIcon icon={faCheckCircle} className="text-4xl w-5 h-5 text-green" />
+ <div className="absolute left-12 top-10 flex h-7 w-7 items-center justify-center rounded-full bg-bunker-500 p-2 group-hover:bg-mineshaft-700">
+ <FontAwesomeIcon icon={faCheckCircle} className="h-5 w-5 text-4xl text-green" />
</div>
)}
- <div className="flex pl-0.5 flex-col items-start">
- <div className="text-xl font-semibold mt-0.5">Inject secrets locally</div>
- <div className="text-sm font-normal">Replace .env files with a more secure and efficient alternative.</div>
+ <div className="flex flex-col items-start pl-0.5">
+ <div className="mt-0.5 text-xl font-semibold">Inject secrets locally</div>
+ <div className="text-sm font-normal">
+ Replace .env files with a more secure and efficient alternative.
+ </div>
</div>
</div>
- <div
- className={`pr-4 font-semibold text-sm w-28 text-right ${false && 'text-green'}`}
- >
+ <div className={`w-28 pr-4 text-right text-sm font-semibold ${false && 'text-green'}`}>
About 2 min
</div>
</div>
- <TabsObject/>
+ <TabsObject />
{false && <div className="absolute bottom-0 left-0 h-1 w-full bg-green" />}
</div>
{learningItem({
@@ -236,5 +242,3 @@ export default function Home() {
}
Home.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['home']);
diff --git a/frontend/src/pages/integrations/[id].tsx b/frontend/src/pages/integrations/[id].tsx
index 46870805dc..189e23bdd3 100644
--- a/frontend/src/pages/integrations/[id].tsx
+++ b/frontend/src/pages/integrations/[id].tsx
@@ -1,9 +1,9 @@
import crypto from 'crypto';
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import frameworkIntegrationOptions from 'public/json/frameworkIntegrations.json';
import ActivateBotDialog from '@app/components/basic/dialog/ActivateBotDialog';
@@ -11,7 +11,6 @@ import CloudIntegrationSection from '@app/components/integrations/CloudIntegrati
import FrameworkIntegrationSection from '@app/components/integrations/FrameworkIntegrationSection';
import IntegrationSection from '@app/components/integrations/IntegrationSection';
import NavHeader from '@app/components/navigation/NavHeader';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import {
decryptAssymmetric,
@@ -73,7 +72,8 @@ export default function Integrations() {
// TODO: These will have its type when migratiing towards react-query
const [bot, setBot] = useState<any>(null);
const [isActivateBotDialogOpen, setIsActivateBotDialogOpen] = useState(false);
- const [selectedIntegrationOption, setSelectedIntegrationOption] = useState<IntegrationOption | null>(null);
+ const [selectedIntegrationOption, setSelectedIntegrationOption] =
+ useState<IntegrationOption | null>(null);
const router = useRouter();
const workspaceId = router.query.id as string;
@@ -162,7 +162,7 @@ export default function Integrations() {
console.error(err);
}
};
-
+
const handleUnauthorizedIntegrationOptionPress = (integrationOption: IntegrationOption) => {
try {
// generate CSRF token for OAuth2 code-token exchange integrations
@@ -223,8 +223,8 @@ export default function Integrations() {
} catch (err) {
console.error(err);
}
- }
-
+ };
+
const handleAuthorizedIntegrationOptionPress = (integrationAuth: IntegrationAuth) => {
try {
let link = '';
@@ -281,8 +281,8 @@ export default function Integrations() {
} catch (err) {
console.error(err);
}
- }
-
+ };
+
/**
* Open dialog to activate bot if bot is not active.
* Otherwise, start integration [integrationOption]
@@ -294,12 +294,14 @@ export default function Integrations() {
*/
const integrationOptionPress = async (integrationOption: IntegrationOption) => {
try {
- const integrationAuthX = integrationAuths.find((integrationAuth) => integrationAuth.integration === integrationOption.slug);
-
+ const integrationAuthX = integrationAuths.find(
+ (integrationAuth) => integrationAuth.integration === integrationOption.slug
+ );
+
if (!bot.isActive) {
await handleBotActivate();
}
-
+
if (!integrationAuthX) {
// case: integration has not been authorized
handleUnauthorizedIntegrationOptionPress(integrationOption);
@@ -311,35 +313,45 @@ export default function Integrations() {
console.error(err);
}
};
-
+
/**
* Handle deleting integration authorization [integrationAuth] and corresponding integrations from state where applicable
* @param {Object} obj
* @param {IntegrationAuth} obj.integrationAuth - integrationAuth to delete
*/
- const handleDeleteIntegrationAuth = async ({ integrationAuth: deletedIntegrationAuth }: { integrationAuth: IntegrationAuth }) => {
+ const handleDeleteIntegrationAuth = async ({
+ integrationAuth: deletedIntegrationAuth
+ }: {
+ integrationAuth: IntegrationAuth;
+ }) => {
try {
- const newIntegrations = integrations.filter((integration) => integration.integrationAuth !== deletedIntegrationAuth._id);
- setIntegrationAuths(integrationAuths.filter((integrationAuth) => integrationAuth._id !== deletedIntegrationAuth._id));
+ const newIntegrations = integrations.filter(
+ (integration) => integration.integrationAuth !== deletedIntegrationAuth._id
+ );
+ setIntegrationAuths(
+ integrationAuths.filter(
+ (integrationAuth) => integrationAuth._id !== deletedIntegrationAuth._id
+ )
+ );
setIntegrations(newIntegrations);
-
+
// handle updating bot
if (newIntegrations.length < 1) {
// case: no integrations left
setBot(
- (
- await setBotActiveStatus({
- botId: bot._id,
- isActive: false
- })
- ).bot
- );
+ (
+ await setBotActiveStatus({
+ botId: bot._id,
+ isActive: false
+ })
+ ).bot
+ );
}
} catch (err) {
console.error(err);
}
- }
-
+ };
+
/**
* Handle deleting integration [integration]
* @param {Object} obj
@@ -350,7 +362,7 @@ export default function Integrations() {
const deletedIntegration = await deleteIntegration({
integrationId: integration._id
});
-
+
const newIntegrations = integrations.filter((i) => i._id !== deletedIntegration._id);
setIntegrations(newIntegrations);
@@ -358,42 +370,42 @@ export default function Integrations() {
if (newIntegrations.length < 1) {
// case: no integrations left
setBot(
- (
- await setBotActiveStatus({
- botId: bot._id,
- isActive: false
- })
- ).bot
- );
+ (
+ await setBotActiveStatus({
+ botId: bot._id,
+ isActive: false
+ })
+ ).bot
+ );
}
} catch (err) {
console.error(err);
}
- }
+ };
return (
- <div className="bg-bunker-800 max-h-screen flex flex-col justify-between text-white">
+ <div className="flex max-h-screen flex-col justify-between bg-bunker-800 text-white">
<Head>
- <title>{t('common:head-title', { title: t('integrations:title') })}</title>
+ <title>{t('common.head-title', { title: t('integrations.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={t('integrations:description') as string} />
+ <meta name="og:description" content={t('integrations.description') as string} />
</Head>
- <div className="w-full pb-2 h-screen max-h-[calc(100vh-10px)] overflow-y-scroll no-scrollbar no-scrollbar::-webkit-scrollbar">
- <NavHeader pageName={t('integrations:title')} isProjectRelated />
+ <div className="no-scrollbar::-webkit-scrollbar h-screen max-h-[calc(100vh-10px)] w-full overflow-y-scroll pb-2 no-scrollbar">
+ <NavHeader pageName={t('integrations.title')} isProjectRelated />
<ActivateBotDialog
isOpen={isActivateBotDialogOpen}
closeModal={() => setIsActivateBotDialogOpen(false)}
selectedIntegrationOption={selectedIntegrationOption}
integrationOptionPress={integrationOptionPress}
/>
- <IntegrationSection
- integrations={integrations}
+ <IntegrationSection
+ integrations={integrations}
setIntegrations={setIntegrations}
bot={bot}
setBot={setBot}
- environments={environments}
+ environments={environments}
handleDeleteIntegration={handleDeleteIntegration}
/>
{cloudIntegrationOptions.length > 0 && bot ? (
@@ -401,12 +413,12 @@ export default function Integrations() {
cloudIntegrationOptions={cloudIntegrationOptions}
setSelectedIntegrationOption={setSelectedIntegrationOption as any}
integrationOptionPress={(integrationOption: IntegrationOption) => {
- if (!bot.isActive) {
+ if (!bot.isActive) {
// case: bot is not active -> open modal to activate bot
setIsActivateBotDialogOpen(true);
return;
- }
- integrationOptionPress(integrationOption)
+ }
+ integrationOptionPress(integrationOption);
}}
integrationAuths={integrationAuths}
handleDeleteIntegrationAuth={handleDeleteIntegrationAuth}
@@ -421,5 +433,3 @@ export default function Integrations() {
}
Integrations.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
diff --git a/frontend/src/pages/integrations/aws-parameter-store/authorize.tsx b/frontend/src/pages/integrations/aws-parameter-store/authorize.tsx
index b2a94aad22..9fc1e4a71c 100644
--- a/frontend/src/pages/integrations/aws-parameter-store/authorize.tsx
+++ b/frontend/src/pages/integrations/aws-parameter-store/authorize.tsx
@@ -1,75 +1,64 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function AWSParameterStoreAuthorizeIntegrationPage() {
- const router = useRouter();
- const [isLoading, setIsLoading] = useState(false);
-
- const [accessKey, setAccessKey] = useState('');
- const [accessKeyErrorText, setAccessKeyErrorText] = useState('');
- const [accessSecretKey, setAccessSecretKey] = useState('');
- const [accessSecretKeyErrorText, setAccessSecretKeyErrorText] = useState('');
-
- const handleButtonClick = async () => {
- try {
- setAccessKeyErrorText('');
- setAccessSecretKeyErrorText('');
+ const router = useRouter();
+ const [isLoading, setIsLoading] = useState(false);
- if (accessKey.length === 0) {
- setAccessKeyErrorText('Access key cannot be blank');
- return;
- }
+ const [accessKey, setAccessKey] = useState('');
+ const [accessKeyErrorText, setAccessKeyErrorText] = useState('');
+ const [accessSecretKey, setAccessSecretKey] = useState('');
+ const [accessSecretKeyErrorText, setAccessSecretKeyErrorText] = useState('');
- if (accessSecretKey.length === 0) {
- setAccessSecretKeyErrorText('Secret access key cannot be blank');
- return;
- }
+ const handleButtonClick = async () => {
+ try {
+ setAccessKeyErrorText('');
+ setAccessSecretKeyErrorText('');
- setIsLoading(true);
-
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'aws-parameter-store',
- accessId: accessKey,
- accessToken: accessSecretKey
- });
-
- setAccessKey('');
- setAccessSecretKey('');
- setIsLoading(false);
-
- router.push(
- `/integrations/aws-parameter-store/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ if (accessKey.length === 0) {
+ setAccessKeyErrorText('Access key cannot be blank');
+ return;
+ }
+
+ if (accessSecretKey.length === 0) {
+ setAccessSecretKeyErrorText('Secret access key cannot be blank');
+ return;
+ }
+
+ setIsLoading(true);
+
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'aws-parameter-store',
+ accessId: accessKey,
+ accessToken: accessSecretKey
+ });
+
+ setAccessKey('');
+ setAccessSecretKey('');
+ setIsLoading(false);
+
+ router.push(
+ `/integrations/aws-parameter-store/create?integrationAuthId=${integrationAuth._id}`
+ );
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center mb-4'>AWS Parameter Store Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="mb-4 text-center">AWS Parameter Store Integration</CardTitle>
+ <FormControl
label="Access Key ID"
errorText={accessKeyErrorText}
isError={accessKeyErrorText !== '' ?? false}
>
- <Input
- placeholder=''
- value={accessKey}
- onChange={(e) => setAccessKey(e.target.value)}
- />
+ <Input placeholder="" value={accessKey} onChange={(e) => setAccessKey(e.target.value)} />
</FormControl>
<FormControl
label="Secret Access Key"
@@ -77,24 +66,22 @@ export default function AWSParameterStoreAuthorizeIntegrationPage() {
isError={accessSecretKeyErrorText !== '' ?? false}
>
<Input
- placeholder=''
+ placeholder=""
value={accessSecretKey}
onChange={(e) => setAccessSecretKey(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to AWS Parameter Store
+ Connect to AWS Parameter Store
</Button>
</Card>
</div>
- )
+ );
}
AWSParameterStoreAuthorizeIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/aws-parameter-store/create.tsx b/frontend/src/pages/integrations/aws-parameter-store/create.tsx
index 2006289212..d06ac0061e 100644
--- a/frontend/src/pages/integrations/aws-parameter-store/create.tsx
+++ b/frontend/src/pages/integrations/aws-parameter-store/create.tsx
@@ -2,148 +2,142 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
- Select,
- SelectItem
+ Button,
+ Card,
+ CardTitle,
+ FormControl,
+ Input,
+ Select,
+ SelectItem
} from '../../../components/v2';
import { useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
const awsRegions = [
- { name: 'US East (Ohio)', slug: 'us-east-2' },
- { name: 'US East (N. Virginia)', slug: 'us-east-1' },
- { name: 'US West (N. California)', slug: 'us-west-1' },
- { name: 'US West (Oregon)', slug: 'us-west-2' },
- { name: 'Africa (Cape Town)', slug: 'af-south-1' },
- { name: 'Asia Pacific (Hong Kong)', slug: 'ap-east-1' },
- { name: 'Asia Pacific (Hyderabad)', slug: 'ap-south-2' },
- { name: 'Asia Pacific (Jakarta)', slug: 'ap-southeast-3' },
- { name: 'Asia Pacific (Melbourne)', slug: 'ap-southeast-4' },
- { name: 'Asia Pacific (Mumbai)', slug: 'ap-south-1' },
- { name: 'Asia Pacific (Osaka)', slug: 'ap-northeast-3' },
- { name: 'Asia Pacific (Seoul)', slug: 'ap-northeast-2' },
- { name: 'Asia Pacific (Singapore)', slug: 'ap-southeast-1' },
- { name: 'Asia Pacific (Sydney)', slug: 'ap-southeast-2' },
- { name: 'Asia Pacific (Tokyo)', slug: 'ap-northeast-1' },
- { name: 'Canada (Central)', slug: 'ca-central-1' },
- { name: 'Europe (Frankfurt)', slug: 'eu-central-1' },
- { name: 'Europe (Ireland)', slug: 'eu-west-1' },
- { name: 'Europe (London)', slug: 'eu-west-2' },
- { name: 'Europe (Milan)', slug: 'eu-south-1' },
- { name: 'Europe (Paris)', slug: 'eu-west-3' },
- { name: 'Europe (Spain)', slug: 'eu-south-2' },
- { name: 'Europe (Stockholm)', slug: 'eu-north-1' },
- { name: 'Europe (Zurich)', slug: 'eu-central-2' },
- { name: 'Middle East (Bahrain)', slug: 'me-south-1' },
- { name: 'Middle East (UAE)', slug: 'me-central-1' },
- { name: 'South America (Sao Paulo)', slug: 'sa-east-1' },
- { name: 'AWS GovCloud (US-East)', slug: 'us-gov-east-1' },
- { name: 'AWS GovCloud (US-West)', slug: 'us-gov-west-1' },
-]
+ { name: 'US East (Ohio)', slug: 'us-east-2' },
+ { name: 'US East (N. Virginia)', slug: 'us-east-1' },
+ { name: 'US West (N. California)', slug: 'us-west-1' },
+ { name: 'US West (Oregon)', slug: 'us-west-2' },
+ { name: 'Africa (Cape Town)', slug: 'af-south-1' },
+ { name: 'Asia Pacific (Hong Kong)', slug: 'ap-east-1' },
+ { name: 'Asia Pacific (Hyderabad)', slug: 'ap-south-2' },
+ { name: 'Asia Pacific (Jakarta)', slug: 'ap-southeast-3' },
+ { name: 'Asia Pacific (Melbourne)', slug: 'ap-southeast-4' },
+ { name: 'Asia Pacific (Mumbai)', slug: 'ap-south-1' },
+ { name: 'Asia Pacific (Osaka)', slug: 'ap-northeast-3' },
+ { name: 'Asia Pacific (Seoul)', slug: 'ap-northeast-2' },
+ { name: 'Asia Pacific (Singapore)', slug: 'ap-southeast-1' },
+ { name: 'Asia Pacific (Sydney)', slug: 'ap-southeast-2' },
+ { name: 'Asia Pacific (Tokyo)', slug: 'ap-northeast-1' },
+ { name: 'Canada (Central)', slug: 'ca-central-1' },
+ { name: 'Europe (Frankfurt)', slug: 'eu-central-1' },
+ { name: 'Europe (Ireland)', slug: 'eu-west-1' },
+ { name: 'Europe (London)', slug: 'eu-west-2' },
+ { name: 'Europe (Milan)', slug: 'eu-south-1' },
+ { name: 'Europe (Paris)', slug: 'eu-west-3' },
+ { name: 'Europe (Spain)', slug: 'eu-south-2' },
+ { name: 'Europe (Stockholm)', slug: 'eu-north-1' },
+ { name: 'Europe (Zurich)', slug: 'eu-central-2' },
+ { name: 'Middle East (Bahrain)', slug: 'me-south-1' },
+ { name: 'Middle East (UAE)', slug: 'me-central-1' },
+ { name: 'South America (Sao Paulo)', slug: 'sa-east-1' },
+ { name: 'AWS GovCloud (US-East)', slug: 'us-gov-east-1' },
+ { name: 'AWS GovCloud (US-West)', slug: 'us-gov-west-1' }
+];
export default function AWSParameterStoreCreateIntegrationPage() {
- const router = useRouter();
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
-
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [selectedAWSRegion, setSelectedAWSRegion] = useState('');
- const [path, setPath] = useState('');
- const [pathErrorText, setPathErrorText] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- setSelectedAWSRegion(awsRegions[0].slug);
- }
- }, [workspace]);
-
- const isValidAWSParameterStorePath = (secretPath: string) => {
- const pattern = /^\/([\w-]+\/)*[\w-]+\/$/;
- return pattern.test(secretPath) && secretPath.length <= 2048;
+ const router = useRouter();
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [selectedAWSRegion, setSelectedAWSRegion] = useState('');
+ const [path, setPath] = useState('');
+ const [pathErrorText, setPathErrorText] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ setSelectedAWSRegion(awsRegions[0].slug);
}
-
- const handleButtonClick = async () => {
- try {
-
- if (path !== '') {
- // case: path is not empty
- if (!isValidAWSParameterStorePath(path)) {
- // case: path is not valid for aws parameter store
- setPathErrorText('Path must be a valid path for SSM like /project/env/');
- return;
- }
- }
-
- if (!integrationAuth?._id) return;
-
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: null,
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path,
- region: selectedAWSRegion
- });
-
- setIsLoading(false);
- setPathErrorText('');
-
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
+ }, [workspace]);
+
+ const isValidAWSParameterStorePath = (secretPath: string) => {
+ const pattern = /^\/([\w-]+\/)*[\w-]+\/$/;
+ return pattern.test(secretPath) && secretPath.length <= 2048;
+ };
+
+ const handleButtonClick = async () => {
+ try {
+ if (path !== '') {
+ // case: path is not empty
+ if (!isValidAWSParameterStorePath(path)) {
+ // case: path is not valid for aws parameter store
+ setPathErrorText('Path must be a valid path for SSM like /project/env/');
+ return;
}
+ }
+
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: null,
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path,
+ region: selectedAWSRegion
+ });
+
+ setIsLoading(false);
+ setPathErrorText('');
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>AWS Parameter Store Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ };
+
+ return integrationAuth && workspace && selectedSourceEnvironment ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">AWS Parameter Store Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`flyio-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`flyio-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="AWS Region"
- >
+ <FormControl label="AWS Region">
<Select
value={selectedAWSRegion}
onValueChange={(val) => setSelectedAWSRegion(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{awsRegions.map((awsRegion) => (
<SelectItem value={awsRegion.slug} key={`flyio-environment-${awsRegion.slug}`}>
@@ -152,30 +146,28 @@ export default function AWSParameterStoreCreateIntegrationPage() {
))}
</Select>
</FormControl>
- <FormControl
- label="Path"
- errorText={pathErrorText}
- isError={pathErrorText !== '' ?? false}
- >
+ <FormControl label="Path" errorText={pathErrorText} isError={pathErrorText !== '' ?? false}>
<Input
- placeholder={`/${workspace.name.toLowerCase().replace(/ /g, "-")}/${selectedSourceEnvironment}/`}
+ placeholder={`/${workspace.name
+ .toLowerCase()
+ .replace(/ /g, '-')}/${selectedSourceEnvironment}/`}
value={path}
onChange={(e) => setPath(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
AWSParameterStoreCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/aws-secret-manager/authorize.tsx b/frontend/src/pages/integrations/aws-secret-manager/authorize.tsx
index 7f1bc909b3..3dc0b0bdfc 100644
--- a/frontend/src/pages/integrations/aws-secret-manager/authorize.tsx
+++ b/frontend/src/pages/integrations/aws-secret-manager/authorize.tsx
@@ -1,75 +1,64 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function AWSSecretManagerCreateIntegrationPage() {
- const router = useRouter();
- const [isLoading, setIsLoading] = useState(false);
-
- const [accessKey, setAccessKey] = useState('');
- const [accessKeyErrorText, setAccessKeyErrorText] = useState('');
- const [accessSecretKey, setAccessSecretKey] = useState('');
- const [accessSecretKeyErrorText, setAccessSecretKeyErrorText] = useState('');
-
- const handleButtonClick = async () => {
- try {
- setAccessKeyErrorText('');
- setAccessSecretKeyErrorText('');
+ const router = useRouter();
+ const [isLoading, setIsLoading] = useState(false);
- if (accessKey.length === 0) {
- setAccessKeyErrorText('Access key cannot be blank');
- return;
- }
+ const [accessKey, setAccessKey] = useState('');
+ const [accessKeyErrorText, setAccessKeyErrorText] = useState('');
+ const [accessSecretKey, setAccessSecretKey] = useState('');
+ const [accessSecretKeyErrorText, setAccessSecretKeyErrorText] = useState('');
- if (accessSecretKey.length === 0) {
- setAccessSecretKeyErrorText('Secret access key cannot be blank');
- return;
- }
+ const handleButtonClick = async () => {
+ try {
+ setAccessKeyErrorText('');
+ setAccessSecretKeyErrorText('');
- setIsLoading(true);
-
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'aws-secret-manager',
- accessId: accessKey,
- accessToken: accessSecretKey
- });
-
- setAccessKey('');
- setAccessSecretKey('');
- setIsLoading(false);
-
- router.push(
- `/integrations/aws-secret-manager/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ if (accessKey.length === 0) {
+ setAccessKeyErrorText('Access key cannot be blank');
+ return;
+ }
+
+ if (accessSecretKey.length === 0) {
+ setAccessSecretKeyErrorText('Secret access key cannot be blank');
+ return;
+ }
+
+ setIsLoading(true);
+
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'aws-secret-manager',
+ accessId: accessKey,
+ accessToken: accessSecretKey
+ });
+
+ setAccessKey('');
+ setAccessSecretKey('');
+ setIsLoading(false);
+
+ router.push(
+ `/integrations/aws-secret-manager/create?integrationAuthId=${integrationAuth._id}`
+ );
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center mb-4'>AWS Secret Manager Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="mb-4 text-center">AWS Secret Manager Integration</CardTitle>
+ <FormControl
label="Access Key ID"
errorText={accessKeyErrorText}
isError={accessKeyErrorText !== '' ?? false}
>
- <Input
- placeholder=''
- value={accessKey}
- onChange={(e) => setAccessKey(e.target.value)}
- />
+ <Input placeholder="" value={accessKey} onChange={(e) => setAccessKey(e.target.value)} />
</FormControl>
<FormControl
label="Secret Access Key"
@@ -77,18 +66,18 @@ export default function AWSSecretManagerCreateIntegrationPage() {
isError={accessSecretKeyErrorText !== '' ?? false}
>
<Input
- placeholder=''
+ placeholder=""
value={accessSecretKey}
onChange={(e) => setAccessSecretKey(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to AWS Secret Manager
+ Connect to AWS Secret Manager
</Button>
</Card>
</div>
@@ -96,5 +85,3 @@ export default function AWSSecretManagerCreateIntegrationPage() {
}
AWSSecretManagerCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/aws-secret-manager/create.tsx b/frontend/src/pages/integrations/aws-secret-manager/create.tsx
index 7f253e1192..4eb6ca489d 100644
--- a/frontend/src/pages/integrations/aws-secret-manager/create.tsx
+++ b/frontend/src/pages/integrations/aws-secret-manager/create.tsx
@@ -2,147 +2,141 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
- Select,
- SelectItem
+ Button,
+ Card,
+ CardTitle,
+ FormControl,
+ Input,
+ Select,
+ SelectItem
} from '../../../components/v2';
import { useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
const awsRegions = [
- { name: 'US East (Ohio)', slug: 'us-east-2' },
- { name: 'US East (N. Virginia)', slug: 'us-east-1' },
- { name: 'US West (N. California)', slug: 'us-west-1' },
- { name: 'US West (Oregon)', slug: 'us-west-2' },
- { name: 'Africa (Cape Town)', slug: 'af-south-1' },
- { name: 'Asia Pacific (Hong Kong)', slug: 'ap-east-1' },
- { name: 'Asia Pacific (Hyderabad)', slug: 'ap-south-2' },
- { name: 'Asia Pacific (Jakarta)', slug: 'ap-southeast-3' },
- { name: 'Asia Pacific (Melbourne)', slug: 'ap-southeast-4' },
- { name: 'Asia Pacific (Mumbai)', slug: 'ap-south-1' },
- { name: 'Asia Pacific (Osaka)', slug: 'ap-northeast-3' },
- { name: 'Asia Pacific (Seoul)', slug: 'ap-northeast-2' },
- { name: 'Asia Pacific (Singapore)', slug: 'ap-southeast-1' },
- { name: 'Asia Pacific (Sydney)', slug: 'ap-southeast-2' },
- { name: 'Asia Pacific (Tokyo)', slug: 'ap-northeast-1' },
- { name: 'Canada (Central)', slug: 'ca-central-1' },
- { name: 'Europe (Frankfurt)', slug: 'eu-central-1' },
- { name: 'Europe (Ireland)', slug: 'eu-west-1' },
- { name: 'Europe (London)', slug: 'eu-west-2' },
- { name: 'Europe (Milan)', slug: 'eu-south-1' },
- { name: 'Europe (Paris)', slug: 'eu-west-3' },
- { name: 'Europe (Spain)', slug: 'eu-south-2' },
- { name: 'Europe (Stockholm)', slug: 'eu-north-1' },
- { name: 'Europe (Zurich)', slug: 'eu-central-2' },
- { name: 'Middle East (Bahrain)', slug: 'me-south-1' },
- { name: 'Middle East (UAE)', slug: 'me-central-1' },
- { name: 'South America (Sao Paulo)', slug: 'sa-east-1' },
- { name: 'AWS GovCloud (US-East)', slug: 'us-gov-east-1' },
- { name: 'AWS GovCloud (US-West)', slug: 'us-gov-west-1' },
-]
+ { name: 'US East (Ohio)', slug: 'us-east-2' },
+ { name: 'US East (N. Virginia)', slug: 'us-east-1' },
+ { name: 'US West (N. California)', slug: 'us-west-1' },
+ { name: 'US West (Oregon)', slug: 'us-west-2' },
+ { name: 'Africa (Cape Town)', slug: 'af-south-1' },
+ { name: 'Asia Pacific (Hong Kong)', slug: 'ap-east-1' },
+ { name: 'Asia Pacific (Hyderabad)', slug: 'ap-south-2' },
+ { name: 'Asia Pacific (Jakarta)', slug: 'ap-southeast-3' },
+ { name: 'Asia Pacific (Melbourne)', slug: 'ap-southeast-4' },
+ { name: 'Asia Pacific (Mumbai)', slug: 'ap-south-1' },
+ { name: 'Asia Pacific (Osaka)', slug: 'ap-northeast-3' },
+ { name: 'Asia Pacific (Seoul)', slug: 'ap-northeast-2' },
+ { name: 'Asia Pacific (Singapore)', slug: 'ap-southeast-1' },
+ { name: 'Asia Pacific (Sydney)', slug: 'ap-southeast-2' },
+ { name: 'Asia Pacific (Tokyo)', slug: 'ap-northeast-1' },
+ { name: 'Canada (Central)', slug: 'ca-central-1' },
+ { name: 'Europe (Frankfurt)', slug: 'eu-central-1' },
+ { name: 'Europe (Ireland)', slug: 'eu-west-1' },
+ { name: 'Europe (London)', slug: 'eu-west-2' },
+ { name: 'Europe (Milan)', slug: 'eu-south-1' },
+ { name: 'Europe (Paris)', slug: 'eu-west-3' },
+ { name: 'Europe (Spain)', slug: 'eu-south-2' },
+ { name: 'Europe (Stockholm)', slug: 'eu-north-1' },
+ { name: 'Europe (Zurich)', slug: 'eu-central-2' },
+ { name: 'Middle East (Bahrain)', slug: 'me-south-1' },
+ { name: 'Middle East (UAE)', slug: 'me-central-1' },
+ { name: 'South America (Sao Paulo)', slug: 'sa-east-1' },
+ { name: 'AWS GovCloud (US-East)', slug: 'us-gov-east-1' },
+ { name: 'AWS GovCloud (US-West)', slug: 'us-gov-west-1' }
+];
export default function AWSSecretManagerCreateIntegrationPage() {
- const router = useRouter();
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
-
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [selectedAWSRegion, setSelectedAWSRegion] = useState('');
- const [targetSecretName, setTargetSecretName] = useState('');
- const [targetSecretNameErrorText, setTargetSecretNameErrorText] = useState('');
-
- // const [path, setPath] = useState('');
- // const [pathErrorText, setPathErrorText] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- setSelectedAWSRegion(awsRegions[0].slug);
- }
- }, [workspace]);
-
-// const isValidAWSPath = (path: string) => {
-// const pattern = /^\/[\w./]+\/$/;
-// return pattern.test(path) && path.length <= 2048;
-// }
-
- const handleButtonClick = async () => {
- try {
-
- if (targetSecretName.trim() === '') {
- setTargetSecretName('Secret name cannot be blank');
- return;
- }
-
- if (!integrationAuth?._id) return;
-
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetSecretName.trim(),
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: selectedAWSRegion
- });
-
- setIsLoading(false);
- setTargetSecretNameErrorText('');
-
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const router = useRouter();
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [selectedAWSRegion, setSelectedAWSRegion] = useState('');
+ const [targetSecretName, setTargetSecretName] = useState('');
+ const [targetSecretNameErrorText, setTargetSecretNameErrorText] = useState('');
+
+ // const [path, setPath] = useState('');
+ // const [pathErrorText, setPathErrorText] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ setSelectedAWSRegion(awsRegions[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>AWS Secret Manager Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ // const isValidAWSPath = (path: string) => {
+ // const pattern = /^\/[\w./]+\/$/;
+ // return pattern.test(path) && path.length <= 2048;
+ // }
+
+ const handleButtonClick = async () => {
+ try {
+ if (targetSecretName.trim() === '') {
+ setTargetSecretName('Secret name cannot be blank');
+ return;
+ }
+
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetSecretName.trim(),
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: selectedAWSRegion
+ });
+
+ setIsLoading(false);
+ setTargetSecretNameErrorText('');
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth && workspace && selectedSourceEnvironment ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">AWS Secret Manager Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`flyio-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`flyio-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="AWS Region"
- >
+ <FormControl label="AWS Region">
<Select
value={selectedAWSRegion}
onValueChange={(val) => setSelectedAWSRegion(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{awsRegions.map((awsRegion) => (
<SelectItem value={awsRegion.slug} key={`flyio-environment-${awsRegion.slug}`}>
@@ -157,24 +151,26 @@ export default function AWSSecretManagerCreateIntegrationPage() {
isError={targetSecretNameErrorText !== '' ?? false}
>
<Input
- placeholder={`${workspace.name.toLowerCase().replace(/ /g, "-")}/${selectedSourceEnvironment}`}
+ placeholder={`${workspace.name
+ .toLowerCase()
+ .replace(/ /g, '-')}/${selectedSourceEnvironment}`}
value={targetSecretName}
onChange={(e) => setTargetSecretName(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
AWSSecretManagerCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/azure-key-vault/create.tsx b/frontend/src/pages/integrations/azure-key-vault/create.tsx
index 8f506b6d44..dfef540bad 100644
--- a/frontend/src/pages/integrations/azure-key-vault/create.tsx
+++ b/frontend/src/pages/integrations/azure-key-vault/create.tsx
@@ -2,99 +2,92 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
- Select,
- SelectItem
+ Button,
+ Card,
+ CardTitle,
+ FormControl,
+ Input,
+ Select,
+ SelectItem
} from '../../../components/v2';
import { useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function AzureKeyVaultCreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
-
- const [vaultBaseUrl, setVaultBaseUrl] = useState('');
- const [vaultBaseUrlErrorText, setVaultBaseUrlErrorText] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- const handleButtonClick = async () => {
- try {
- if (vaultBaseUrl.length === 0) {
- setVaultBaseUrlErrorText('Vault URI cannot be blank');
- return;
- }
-
- if (
- !vaultBaseUrl.startsWith('https://')
- || !vaultBaseUrl.endsWith('vault.azure.net')
- ) {
- setVaultBaseUrlErrorText('Vault URI must be like https://<vault_name>.vault.azure.net');
- return;
- }
-
- if (!integrationAuth?._id) return;
-
- setIsLoading(true);
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: vaultBaseUrl,
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
- setIsLoading(false);
-
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
-
- } catch (err) {
- console.error(err);
- }
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+
+ const [vaultBaseUrl, setVaultBaseUrl] = useState('');
+ const [vaultBaseUrlErrorText, setVaultBaseUrlErrorText] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Azure Key Vault Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (vaultBaseUrl.length === 0) {
+ setVaultBaseUrlErrorText('Vault URI cannot be blank');
+ return;
+ }
+
+ if (!vaultBaseUrl.startsWith('https://') || !vaultBaseUrl.endsWith('vault.azure.net')) {
+ setVaultBaseUrlErrorText('Vault URI must be like https://<vault_name>.vault.azure.net');
+ return;
+ }
+
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: vaultBaseUrl,
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth && workspace && selectedSourceEnvironment ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Azure Key Vault Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`azure-key-vault-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`azure-key-vault-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
@@ -106,24 +99,24 @@ export default function AzureKeyVaultCreateIntegrationPage() {
isError={vaultBaseUrlErrorText !== '' ?? false}
>
<Input
- placeholder='https://example.vault.azure.net'
+ placeholder="https://example.vault.azure.net"
value={vaultBaseUrl}
onChange={(e) => setVaultBaseUrl(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
- >
- Create Integration
- </Button>
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
+ >
+ Create Integration
+ </Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
AzureKeyVaultCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/azure-key-vault/oauth2/callback.tsx b/frontend/src/pages/integrations/azure-key-vault/oauth2/callback.tsx
index 14d92d9c23..976dc356ac 100644
--- a/frontend/src/pages/integrations/azure-key-vault/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/azure-key-vault/oauth2/callback.tsx
@@ -2,40 +2,36 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function AzureKeyVaultOAuth2CallbackPage() {
- const router = useRouter();
-
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
-
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
-
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'azure-key-vault'
- });
-
- router.push(
- `/integrations/azure-key-vault/create?integrationAuthId=${integrationAuth._id}`
- );
-
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ const router = useRouter();
+
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
+
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
+
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'azure-key-vault'
+ });
+
+ router.push(
+ `/integrations/azure-key-vault/create?integrationAuthId=${integrationAuth._id}`
+ );
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
AzureKeyVaultOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/circleci/authorize.tsx b/frontend/src/pages/integrations/circleci/authorize.tsx
index 1c0e1de069..2c8ed322d1 100644
--- a/frontend/src/pages/integrations/circleci/authorize.tsx
+++ b/frontend/src/pages/integrations/circleci/authorize.tsx
@@ -1,77 +1,62 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function CircleCICreateIntegrationPage() {
- const router = useRouter();
- const [apiKey, setApiKey] = useState('');
- const [apiKeyErrorText, setApiKeyErrorText] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const handleButtonClick = async () => {
- try {
- setApiKeyErrorText('');
- if (apiKey.length === 0) {
- setApiKeyErrorText('API Key cannot be blank');
- return;
- }
+ const router = useRouter();
+ const [apiKey, setApiKey] = useState('');
+ const [apiKeyErrorText, setApiKeyErrorText] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
- setIsLoading(true);
+ const handleButtonClick = async () => {
+ try {
+ setApiKeyErrorText('');
+ if (apiKey.length === 0) {
+ setApiKeyErrorText('API Key cannot be blank');
+ return;
+ }
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'circleci',
- accessToken: apiKey,
- accessId: null,
- });
+ setIsLoading(true);
- setIsLoading(false);
-
- router.push(
- `/integrations/circleci/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'circleci',
+ accessToken: apiKey,
+ accessId: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/circleci/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>CircleCI Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">CircleCI Integration</CardTitle>
+ <FormControl
label="CircleCI API Token"
errorText={apiKeyErrorText}
isError={apiKeyErrorText !== '' ?? false}
>
- <Input
- placeholder=''
- value={apiKey}
- onChange={(e) => setApiKey(e.target.value)}
- />
+ <Input placeholder="" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to CircleCI
+ Connect to CircleCI
</Button>
</Card>
</div>
- )
+ );
}
CircleCICreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/circleci/create.tsx b/frontend/src/pages/integrations/circleci/create.tsx
index 05a53e6096..cc96286a3d 100644
--- a/frontend/src/pages/integrations/circleci/create.tsx
+++ b/frontend/src/pages/integrations/circleci/create.tsx
@@ -2,115 +2,114 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function CircleCICreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0 ) {
- setTargetApp(integrationAuthApps[0]?.name);
- } else {
- setTargetApp('none');
- }
- }
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- if (!integrationAuth?._id) return;
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp))?.appId ?? null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null,
- });
-
- setIsLoading(false);
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>CircleCI Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0]?.name);
+ } else {
+ setTargetApp('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId:
+ integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp)
+ ?.appId ?? null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">CircleCI Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="CircleCI Project"
- className='mt-4'
- >
+ <FormControl label="CircleCI Project" className="mt-4">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-app-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-app-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -121,20 +120,20 @@ export default function CircleCICreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
CircleCICreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/flyio/authorize.tsx b/frontend/src/pages/integrations/flyio/authorize.tsx
index 37bbbc8ad0..d6e5b0aed1 100644
--- a/frontend/src/pages/integrations/flyio/authorize.tsx
+++ b/frontend/src/pages/integrations/flyio/authorize.tsx
@@ -1,77 +1,66 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function FlyioCreateIntegrationPage() {
- const router = useRouter();
- const [accessToken, setAccessToken] = useState('');
- const [accessTokenErrorText, setAccessTokenErrorText] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const handleButtonClick = async () => {
- try {
- setAccessTokenErrorText('');
- if (accessToken.length === 0) {
- setAccessTokenErrorText('Access token cannot be blank');
- return;
- }
+ const router = useRouter();
+ const [accessToken, setAccessToken] = useState('');
+ const [accessTokenErrorText, setAccessTokenErrorText] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
- setIsLoading(true);
+ const handleButtonClick = async () => {
+ try {
+ setAccessTokenErrorText('');
+ if (accessToken.length === 0) {
+ setAccessTokenErrorText('Access token cannot be blank');
+ return;
+ }
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'flyio',
- accessId: null,
- accessToken
- });
+ setIsLoading(true);
- setIsLoading(false);
-
- router.push(
- `/integrations/flyio/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'flyio',
+ accessId: null,
+ accessToken
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/flyio/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Fly.io Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Fly.io Integration</CardTitle>
+ <FormControl
label="Fly.io Access Token"
errorText={accessTokenErrorText}
isError={accessTokenErrorText !== '' ?? false}
>
<Input
- placeholder=''
+ placeholder=""
value={accessToken}
onChange={(e) => setAccessToken(e.target.value)}
/>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to Fly.io
+ Connect to Fly.io
</Button>
</Card>
</div>
- )
+ );
}
FlyioCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/flyio/create.tsx b/frontend/src/pages/integrations/flyio/create.tsx
index 13dbc05d18..6c8e923e8a 100644
--- a/frontend/src/pages/integrations/flyio/create.tsx
+++ b/frontend/src/pages/integrations/flyio/create.tsx
@@ -2,116 +2,113 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function FlyioCreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- // TODO: handle case where apps can be empty
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetApp(integrationAuthApps[0].name);
- } else {
- setTargetApp('none');
- }
- }
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- if (!integrationAuth?._id) return;
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Fly.io Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ useEffect(() => {
+ // TODO: handle case where apps can be empty
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0].name);
+ } else {
+ setTargetApp('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Fly.io Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Fly.io App"
- className='mt-4'
- >
+ <FormControl label="Fly.io App" className="mt-4">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-app-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-app-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -122,20 +119,20 @@ export default function FlyioCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
- isDisabled={integrationAuthApps.length === 0}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
+ isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
FlyioCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/github/create.tsx b/frontend/src/pages/integrations/github/create.tsx
index eee9f8a710..86ee2e1f08 100644
--- a/frontend/src/pages/integrations/github/create.tsx
+++ b/frontend/src/pages/integrations/github/create.tsx
@@ -2,118 +2,117 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function GitHubCreateIntegrationPage() {
- const router = useRouter();
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
-
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetAppId, setTargetAppId] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetAppId(integrationAuthApps[0].appId as string);
- } else {
- setTargetAppId('none');
- }
- }
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- setIsLoading(true);
-
- if (!integrationAuth?._id) return;
-
- const targetApp = integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.appId === targetAppId);
-
- if (!targetApp || !targetApp.owner) return;
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp.name,
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: targetApp.owner,
- path: null,
- region: null
- });
-
- setIsLoading(false);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const router = useRouter();
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetAppId, setTargetAppId] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetAppId) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>GitHub Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetAppId(integrationAuthApps[0].appId as string);
+ } else {
+ setTargetAppId('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ setIsLoading(true);
+
+ if (!integrationAuth?._id) return;
+
+ const targetApp = integrationAuthApps?.find(
+ (integrationAuthApp) => integrationAuthApp.appId === targetAppId
+ );
+
+ if (!targetApp || !targetApp.owner) return;
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp.name,
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: targetApp.owner,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetAppId ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">GitHub Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`azure-key-vault-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`azure-key-vault-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="GitHub Repo"
- className='mt-4'
- >
+ <FormControl label="GitHub Repo" className="mt-4">
<Select
value={targetAppId}
onValueChange={(val) => setTargetAppId(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.appId as string} key={`github-repo-${integrationAuthApp.appId}`}>
+ <SelectItem
+ value={integrationAuthApp.appId as string}
+ key={`github-repo-${integrationAuthApp.appId}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -124,10 +123,10 @@ export default function GitHubCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
@@ -135,9 +134,9 @@ export default function GitHubCreateIntegrationPage() {
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
GitHubCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/github/oauth2/callback.tsx b/frontend/src/pages/integrations/github/oauth2/callback.tsx
index a3fd7e84c0..393e9bdd85 100644
--- a/frontend/src/pages/integrations/github/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/github/oauth2/callback.tsx
@@ -2,39 +2,33 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function GitHubOAuth2CallbackPage() {
- const router = useRouter();
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
-
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
-
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'github'
- });
+ const router = useRouter();
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
- router.push(
- `/integrations/github/create?integrationAuthId=${integrationAuth._id}`
- );
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'github'
+ });
+
+ router.push(`/integrations/github/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
GitHubOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/gitlab/create.tsx b/frontend/src/pages/integrations/gitlab/create.tsx
index c8a25e78b0..53d0603f52 100644
--- a/frontend/src/pages/integrations/gitlab/create.tsx
+++ b/frontend/src/pages/integrations/gitlab/create.tsx
@@ -2,136 +2,136 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
useGetIntegrationAuthApps,
- useGetIntegrationAuthById,
- useGetIntegrationAuthTeams} from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthById,
+ useGetIntegrationAuthTeams
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
const gitLabEntities = [
{ name: 'Individual', value: 'individual' },
{ name: 'Group', value: 'group' }
-]
+];
export default function GitLabCreateIntegrationPage() {
- const router = useRouter();
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
-
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
-
- const [targetTeamId, setTargetTeamId] = useState<string | null>(null);
-
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? '',
- ...(targetTeamId ? { teamId: targetTeamId } : {})
- });
- const { data: integrationAuthTeams } = useGetIntegrationAuthTeams(integrationAuthId as string ?? '');
-
- const [targetEntity, setTargetEntity] = useState(gitLabEntities[0].value);
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetAppId, setTargetAppId] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
+ const router = useRouter();
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+
+ const [targetTeamId, setTargetTeamId] = useState<string | null>(null);
+
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? '',
+ ...(targetTeamId ? { teamId: targetTeamId } : {})
+ });
+ const { data: integrationAuthTeams } = useGetIntegrationAuthTeams(
+ (integrationAuthId as string) ?? ''
+ );
+
+ const [targetEntity, setTargetEntity] = useState(gitLabEntities[0].value);
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetAppId, setTargetAppId] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ }
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetAppId(integrationAuthApps[0].appId as string);
+ } else {
+ setTargetAppId('none');
}
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetAppId(integrationAuthApps[0].appId as string);
+ }
+ }, [integrationAuthApps]);
+
+ useEffect(() => {
+ if (targetEntity === 'group' && integrationAuthTeams && integrationAuthTeams.length > 0) {
+ if (integrationAuthTeams) {
+ if (integrationAuthTeams.length > 0) {
+ // case: user is part of at least 1 group in GitLab
+ setTargetTeamId(integrationAuthTeams[0].teamId);
} else {
- setTargetAppId('none');
+ // case: user is not part of any groups in GitLab
+ setTargetTeamId('none');
}
}
- }, [integrationAuthApps]);
-
- useEffect(() => {
- if (targetEntity === 'group' && integrationAuthTeams && integrationAuthTeams.length > 0) {
- if (integrationAuthTeams) {
- if (integrationAuthTeams.length > 0) {
- // case: user is part of at least 1 group in GitLab
- setTargetTeamId(integrationAuthTeams[0].teamId);
- } else {
- // case: user is not part of any groups in GitLab
- setTargetTeamId('none');
- }
- }
- } else if (targetEntity === 'individual') {
- setTargetTeamId(null);
- }
- }, [targetEntity, integrationAuthTeams]);
-
- const handleButtonClick = async () => {
- try {
- setIsLoading(true);
- if (!integrationAuth?._id) return;
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.appId === targetAppId))?.name ?? null,
- appId: targetAppId,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ } else if (targetEntity === 'individual') {
+ setTargetTeamId(null);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && integrationAuthTeams && targetAppId) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>GitLab Integration</CardTitle>
- <FormControl
- label="Project Environment"
- >
+ }, [targetEntity, integrationAuthTeams]);
+
+ const handleButtonClick = async () => {
+ try {
+ setIsLoading(true);
+ if (!integrationAuth?._id) return;
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app:
+ integrationAuthApps?.find(
+ (integrationAuthApp) => integrationAuthApp.appId === targetAppId
+ )?.name ?? null,
+ appId: targetAppId,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ integrationAuthTeams &&
+ targetAppId ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">GitLab Integration</CardTitle>
+ <FormControl label="Project Environment">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="GitLab Integration Type"
- >
+ <FormControl label="GitLab Integration Type">
<Select
value={targetEntity}
onValueChange={(val) => setTargetEntity(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{gitLabEntities.map((entity) => {
return (
@@ -143,17 +143,18 @@ export default function GitLabCreateIntegrationPage() {
</Select>
</FormControl>
{targetEntity === 'group' && targetTeamId && (
- <FormControl
- label="GitLab Group"
- >
+ <FormControl label="GitLab Group">
<Select
value={targetTeamId}
onValueChange={(val) => setTargetTeamId(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{integrationAuthTeams.length > 0 ? (
integrationAuthTeams.map((integrationAuthTeam) => (
- <SelectItem value={integrationAuthTeam.teamId} key={`target-team-${integrationAuthTeam.teamId}`}>
+ <SelectItem
+ value={integrationAuthTeam.teamId}
+ key={`target-team-${integrationAuthTeam.teamId}`}
+ >
{integrationAuthTeam.name}
</SelectItem>
))
@@ -165,18 +166,19 @@ export default function GitLabCreateIntegrationPage() {
</Select>
</FormControl>
)}
- <FormControl
- label="GitLab Project"
- >
+ <FormControl label="GitLab Project">
<Select
value={targetAppId}
onValueChange={(val) => setTargetAppId(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.appId as string} key={`target-app-${integrationAuthApp.appId}`}>
+ <SelectItem
+ value={integrationAuthApp.appId as string}
+ key={`target-app-${integrationAuthApp.appId}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -187,20 +189,20 @@ export default function GitLabCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
GitLabCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/gitlab/oauth2/callback.tsx b/frontend/src/pages/integrations/gitlab/oauth2/callback.tsx
index 0612ee82e3..4119d3fcd9 100644
--- a/frontend/src/pages/integrations/gitlab/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/gitlab/oauth2/callback.tsx
@@ -2,38 +2,32 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function GitLabOAuth2CallbackPage() {
- const router = useRouter();
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
-
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'gitlab'
- });
+ const router = useRouter();
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
- router.push(
- `/integrations/gitlab/create?integrationAuthId=${integrationAuth._id}`
- );
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'gitlab'
+ });
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ router.push(`/integrations/gitlab/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
GitLabOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/heroku/create.tsx b/frontend/src/pages/integrations/heroku/create.tsx
index beb52c4d44..53f9b36668 100644
--- a/frontend/src/pages/integrations/heroku/create.tsx
+++ b/frontend/src/pages/integrations/heroku/create.tsx
@@ -2,114 +2,111 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function HerokuCreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetApp(integrationAuthApps[0].name);
- } else {
- setTargetApp('none');
- }
- }
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- setIsLoading(true);
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
- if (!integrationAuth?._id) return;
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Heroku Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0].name);
+ } else {
+ setTargetApp('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ setIsLoading(true);
+
+ if (!integrationAuth?._id) return;
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId: null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Heroku Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Heroku App"
- className='mt-4'
- >
+ <FormControl label="Heroku App" className="mt-4">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-app-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-app-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -120,20 +117,20 @@ export default function HerokuCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
HerokuCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/heroku/oauth2/callback.tsx b/frontend/src/pages/integrations/heroku/oauth2/callback.tsx
index 321255c9f2..e716b53360 100644
--- a/frontend/src/pages/integrations/heroku/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/heroku/oauth2/callback.tsx
@@ -2,39 +2,33 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function HerokuOAuth2CallbackPage() {
- const router = useRouter();
+ const router = useRouter();
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
-
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'heroku'
- });
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
- router.push(
- `/integrations/heroku/create?integrationAuthId=${integrationAuth._id}`
- );
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'heroku'
+ });
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ router.push(`/integrations/heroku/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
HerokuOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/netlify/create.tsx b/frontend/src/pages/integrations/netlify/create.tsx
index cf3a230386..43ae3bc43d 100644
--- a/frontend/src/pages/integrations/netlify/create.tsx
+++ b/frontend/src/pages/integrations/netlify/create.tsx
@@ -2,121 +2,123 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
const netlifyEnvironments = [
- { name: 'Local development', slug: 'dev' },
- { name: 'Branch deploys', slug: 'branch-deploy' },
- { name: 'Deploy previews', slug: 'deploy-preview' },
- { name: 'Production', slug: 'production' }
-]
+ { name: 'Local development', slug: 'dev' },
+ { name: 'Branch deploys', slug: 'branch-deploy' },
+ { name: 'Deploy previews', slug: 'deploy-preview' },
+ { name: 'Production', slug: 'production' }
+];
export default function NetlifyCreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
- const [targetEnvironment, setTargetEnvironment] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- setTargetEnvironment(netlifyEnvironments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetApp(integrationAuthApps[0].name);
- } else {
- setTargetApp('none');
- }
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
+ const [targetEnvironment, setTargetEnvironment] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ setTargetEnvironment(netlifyEnvironments[0].slug);
+ }
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0].name);
+ } else {
+ setTargetApp('none');
}
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- setIsLoading(true);
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ setIsLoading(true);
- if (!integrationAuth?._id) return;
+ if (!integrationAuth?._id) return;
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp))?.appId ?? null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId:
+ integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp)
+ ?.appId ?? null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp && targetEnvironment) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Netlify Integration</CardTitle>
- <FormControl
- label="Project Environment"
- >
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp &&
+ targetEnvironment ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Netlify Integration</CardTitle>
+ <FormControl label="Project Environment">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Netlify Site"
- >
+ <FormControl label="Netlify Site">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-app-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-app-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -127,35 +129,36 @@ export default function NetlifyCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <FormControl
- label="Netlify Context"
- >
+ <FormControl label="Netlify Context">
<Select
value={targetEnvironment}
onValueChange={(val) => setTargetEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{netlifyEnvironments.map((netlifyEnvironment) => (
- <SelectItem value={netlifyEnvironment.slug} key={`target-environment-${netlifyEnvironment.slug}`}>
+ <SelectItem
+ value={netlifyEnvironment.slug}
+ key={`target-environment-${netlifyEnvironment.slug}`}
+ >
{netlifyEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
NetlifyCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/netlify/oauth2/callback.tsx b/frontend/src/pages/integrations/netlify/oauth2/callback.tsx
index db884282ad..8eb5499566 100644
--- a/frontend/src/pages/integrations/netlify/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/netlify/oauth2/callback.tsx
@@ -2,40 +2,34 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function NetlifyOAuth2CallbackPage() {
- const router = useRouter();
-
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
-
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
-
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'netlify'
- });
-
- router.push(
- `/integrations/netlify/create?integrationAuthId=${integrationAuth._id}`
- );
-
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ const router = useRouter();
+
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
+
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
+
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'netlify'
+ });
+
+ router.push(`/integrations/netlify/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
NetlifyOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/railway/authorize.tsx b/frontend/src/pages/integrations/railway/authorize.tsx
index 94d3f06bf2..7c983c4e1c 100644
--- a/frontend/src/pages/integrations/railway/authorize.tsx
+++ b/frontend/src/pages/integrations/railway/authorize.tsx
@@ -1,77 +1,62 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function RailwayAuthorizeIntegrationPage() {
- const router = useRouter();
- const [apiKey, setApiKey] = useState('');
- const [apiKeyErrorText, setApiKeyErrorText] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const handleButtonClick = async () => {
- try {
- setApiKeyErrorText('');
- if (apiKey.length === 0) {
- setApiKeyErrorText('API Key cannot be blank');
- return;
- }
-
- setIsLoading(true);
-
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'railway',
- accessId: null,
- accessToken: apiKey
- });
-
- setIsLoading(false);
-
- router.push(
- `/integrations/railway/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ const router = useRouter();
+ const [apiKey, setApiKey] = useState('');
+ const [apiKeyErrorText, setApiKeyErrorText] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
+
+ const handleButtonClick = async () => {
+ try {
+ setApiKeyErrorText('');
+ if (apiKey.length === 0) {
+ setApiKeyErrorText('API Key cannot be blank');
+ return;
+ }
+
+ setIsLoading(true);
+
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'railway',
+ accessId: null,
+ accessToken: apiKey
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/railway/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Railway Integration</CardTitle>
- <FormControl
- label="Railway API Key"
- errorText={apiKeyErrorText}
- isError={apiKeyErrorText !== '' ?? false}
- >
- <Input
- placeholder=''
- value={apiKey}
- onChange={(e) => setApiKey(e.target.value)}
- />
- </FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
- >
- Connect to Railway
- </Button>
- </Card>
- </div>
- );
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Railway Integration</CardTitle>
+ <FormControl
+ label="Railway API Key"
+ errorText={apiKeyErrorText}
+ isError={apiKeyErrorText !== '' ?? false}
+ >
+ <Input placeholder="" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />
+ </FormControl>
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
+ >
+ Connect to Railway
+ </Button>
+ </Card>
+ </div>
+ );
}
RailwayAuthorizeIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/railway/create.tsx b/frontend/src/pages/integrations/railway/create.tsx
index 95eb90c6fc..d7a2191c2f 100644
--- a/frontend/src/pages/integrations/railway/create.tsx
+++ b/frontend/src/pages/integrations/railway/create.tsx
@@ -2,206 +2,213 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import {
- useGetIntegrationAuthApps,
- useGetIntegrationAuthById,
- useGetIntegrationAuthRailwayEnvironments,
- useGetIntegrationAuthRailwayServices
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById,
+ useGetIntegrationAuthRailwayEnvironments,
+ useGetIntegrationAuthRailwayServices
} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function RailwayCreateIntegrationPage() {
- const router = useRouter();
-
- const [targetAppId, setTargetAppId] = useState('');
- const [targetEnvironmentId, setTargetEnvironmentId] = useState('');
- const [targetServiceId, setTargetServiceId] = useState('');
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
- const { data: targetEnvironments } = useGetIntegrationAuthRailwayEnvironments({
- integrationAuthId: integrationAuthId as string ?? '',
- appId: targetAppId
- });
- const { data: targetServices } = useGetIntegrationAuthRailwayServices({
- integrationAuthId: integrationAuthId as string ?? '',
- appId: targetAppId
- });
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetAppId(integrationAuthApps[0].appId as string);
- } else {
- setTargetAppId('none');
- }
- }
- }, [integrationAuthApps]);
-
- useEffect(() => {
- if (targetEnvironments) {
- if (targetEnvironments.length > 0) {
- setTargetEnvironmentId(targetEnvironments[0].environmentId);
- } else {
- setTargetEnvironmentId('none');
- }
- }
- }, [targetEnvironments]);
-
- const filteredServices = targetServices
- ?.concat({
- name: '',
- serviceId: ''
- });
-
- const handleButtonClick = async () => {
- try {
- setIsLoading(true);
-
- if (!integrationAuth?._id) return;
-
- const targetApp = integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.appId === targetAppId);
- const targetEnvironment = targetEnvironments?.find((environment) => environment.environmentId === targetEnvironmentId);
-
- if (!targetApp || !targetApp.appId || !targetEnvironment) return;
-
- const targetService = targetServices?.find((service) => service.serviceId === targetServiceId);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp.name,
- appId: targetApp.appId,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: targetEnvironment.name,
- targetEnvironmentId: targetEnvironment.environmentId,
- targetService: targetService ? targetService.name : null,
- targetServiceId: targetService ? targetService.serviceId : null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
-
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const router = useRouter();
+
+ const [targetAppId, setTargetAppId] = useState('');
+ const [targetEnvironmentId, setTargetEnvironmentId] = useState('');
+ const [targetServiceId, setTargetServiceId] = useState('');
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
+ const { data: targetEnvironments } = useGetIntegrationAuthRailwayEnvironments({
+ integrationAuthId: (integrationAuthId as string) ?? '',
+ appId: targetAppId
+ });
+ const { data: targetServices } = useGetIntegrationAuthRailwayServices({
+ integrationAuthId: (integrationAuthId as string) ?? '',
+ appId: targetAppId
+ });
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return workspace && selectedSourceEnvironment && integrationAuthApps && targetEnvironments && filteredServices ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className="text-center">Railway Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
- <Select
- value={selectedSourceEnvironment}
- onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetAppId(integrationAuthApps[0].appId as string);
+ } else {
+ setTargetAppId('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ useEffect(() => {
+ if (targetEnvironments) {
+ if (targetEnvironments.length > 0) {
+ setTargetEnvironmentId(targetEnvironments[0].environmentId);
+ } else {
+ setTargetEnvironmentId('none');
+ }
+ }
+ }, [targetEnvironments]);
+
+ const filteredServices = targetServices?.concat({
+ name: '',
+ serviceId: ''
+ });
+
+ const handleButtonClick = async () => {
+ try {
+ setIsLoading(true);
+
+ if (!integrationAuth?._id) return;
+
+ const targetApp = integrationAuthApps?.find(
+ (integrationAuthApp) => integrationAuthApp.appId === targetAppId
+ );
+ const targetEnvironment = targetEnvironments?.find(
+ (environment) => environment.environmentId === targetEnvironmentId
+ );
+
+ if (!targetApp || !targetApp.appId || !targetEnvironment) return;
+
+ const targetService = targetServices?.find(
+ (service) => service.serviceId === targetServiceId
+ );
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp.name,
+ appId: targetApp.appId,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: targetEnvironment.name,
+ targetEnvironmentId: targetEnvironment.environmentId,
+ targetService: targetService ? targetService.name : null,
+ targetServiceId: targetService ? targetService.serviceId : null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetEnvironments &&
+ filteredServices ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Railway Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
+ <Select
+ value={selectedSourceEnvironment}
+ onValueChange={(val) => setSelectedSourceEnvironment(val)}
+ className="w-full border border-mineshaft-500"
+ >
+ {workspace?.environments.map((sourceEnvironment) => (
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
+ {sourceEnvironment.name}
+ </SelectItem>
+ ))}
+ </Select>
+ </FormControl>
+ <FormControl label="Railway Project">
+ <Select
+ value={targetAppId}
+ onValueChange={(val) => setTargetAppId(val)}
+ className="w-full border border-mineshaft-500"
+ isDisabled={integrationAuthApps.length === 0}
+ >
+ {integrationAuthApps.length > 0 ? (
+ integrationAuthApps.map((integrationAuthApp) => (
+ <SelectItem
+ value={integrationAuthApp.appId as string}
+ key={`target-app-${integrationAuthApp.appId as string}`}
>
- {workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
- {sourceEnvironment.name}
- </SelectItem>
- ))}
- </Select>
- </FormControl>
- <FormControl label="Railway Project">
- <Select
- value={targetAppId}
- onValueChange={(val) => setTargetAppId(val)}
- className='w-full border border-mineshaft-500'
- isDisabled={integrationAuthApps.length === 0}
- >
- {integrationAuthApps.length > 0 ? (
- integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.appId as string} key={`target-app-${integrationAuthApp.appId as string}`}>
- {integrationAuthApp.name}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="none" key="target-app-none">
- No projects found
- </SelectItem>
- )}
- </Select>
- </FormControl>
- <FormControl label="Railway Project Environment">
- <Select
- value={targetEnvironmentId}
- onValueChange={(val) => setTargetEnvironmentId(val)}
- className='w-full border border-mineshaft-500'
- >
- {targetEnvironments.length > 0 ? (
- targetEnvironments.map((targetEnvironment) => (
- <SelectItem value={targetEnvironment.environmentId as string} key={`target-environment-${targetEnvironment.environmentId as string}`}>
- {targetEnvironment.name}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="none" key="target-environment-none">
- No environments found
- </SelectItem>
- )}
- </Select>
- </FormControl>
- <FormControl label="Railway Service (Optional)">
- <Select
- value={targetServiceId}
- onValueChange={(val) => setTargetServiceId(val)}
- className='w-full border border-mineshaft-500'
- >
- {filteredServices.map((targetService) => (
- <SelectItem value={targetService.serviceId as string} key={`target-service-${targetService.serviceId as string}`}>
- {targetService.name}
- </SelectItem>
- ))}
- </Select>
- </FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
- isDisabled={integrationAuthApps.length === 0}
+ {integrationAuthApp.name}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="none" key="target-app-none">
+ No projects found
+ </SelectItem>
+ )}
+ </Select>
+ </FormControl>
+ <FormControl label="Railway Project Environment">
+ <Select
+ value={targetEnvironmentId}
+ onValueChange={(val) => setTargetEnvironmentId(val)}
+ className="w-full border border-mineshaft-500"
+ >
+ {targetEnvironments.length > 0 ? (
+ targetEnvironments.map((targetEnvironment) => (
+ <SelectItem
+ value={targetEnvironment.environmentId as string}
+ key={`target-environment-${targetEnvironment.environmentId as string}`}
>
- Create Integration
- </Button>
- </Card>
- </div>
- ) : <div />
+ {targetEnvironment.name}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="none" key="target-environment-none">
+ No environments found
+ </SelectItem>
+ )}
+ </Select>
+ </FormControl>
+ <FormControl label="Railway Service (Optional)">
+ <Select
+ value={targetServiceId}
+ onValueChange={(val) => setTargetServiceId(val)}
+ className="w-full border border-mineshaft-500"
+ >
+ {filteredServices.map((targetService) => (
+ <SelectItem
+ value={targetService.serviceId as string}
+ key={`target-service-${targetService.serviceId as string}`}
+ >
+ {targetService.name}
+ </SelectItem>
+ ))}
+ </Select>
+ </FormControl>
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
+ isDisabled={integrationAuthApps.length === 0}
+ >
+ Create Integration
+ </Button>
+ </Card>
+ </div>
+ ) : (
+ <div />
+ );
}
RailwayCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
-
diff --git a/frontend/src/pages/integrations/render/authorize.tsx b/frontend/src/pages/integrations/render/authorize.tsx
index c01dfe9562..8788b5a94e 100644
--- a/frontend/src/pages/integrations/render/authorize.tsx
+++ b/frontend/src/pages/integrations/render/authorize.tsx
@@ -1,77 +1,62 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function RenderCreateIntegrationPage() {
- const router = useRouter();
- const [apiKey, setApiKey] = useState('');
- const [apiKeyErrorText, setApiKeyErrorText] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const handleButtonClick = async () => {
- try {
- setApiKeyErrorText('');
- if (apiKey.length === 0) {
- setApiKeyErrorText('API Key cannot be blank');
- return;
- }
+ const router = useRouter();
+ const [apiKey, setApiKey] = useState('');
+ const [apiKeyErrorText, setApiKeyErrorText] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
- setIsLoading(true);
+ const handleButtonClick = async () => {
+ try {
+ setApiKeyErrorText('');
+ if (apiKey.length === 0) {
+ setApiKeyErrorText('API Key cannot be blank');
+ return;
+ }
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'render',
- accessId: null,
- accessToken: apiKey
- });
+ setIsLoading(true);
- setIsLoading(false);
-
- router.push(
- `/integrations/render/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'render',
+ accessId: null,
+ accessToken: apiKey
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/render/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Render Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Render Integration</CardTitle>
+ <FormControl
label="Render API Key"
errorText={apiKeyErrorText}
isError={apiKeyErrorText !== '' ?? false}
>
- <Input
- placeholder='rnd_xxx'
- value={apiKey}
- onChange={(e) => setApiKey(e.target.value)}
- />
+ <Input placeholder="rnd_xxx" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to Render
+ Connect to Render
</Button>
</Card>
</div>
- )
+ );
}
RenderCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/render/create.tsx b/frontend/src/pages/integrations/render/create.tsx
index ce9d702eef..cf49d769ca 100644
--- a/frontend/src/pages/integrations/render/create.tsx
+++ b/frontend/src/pages/integrations/render/create.tsx
@@ -2,115 +2,114 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps, useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function RenderCreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetApp(integrationAuthApps[0].name);
- } else {
- setTargetApp('none');
- }
- }
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- if (!integrationAuth?._id) return;
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp))?.appId ?? null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null
- });
-
- setIsLoading(false);
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Render Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0].name);
+ } else {
+ setTargetApp('none');
+ }
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId:
+ integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp)
+ ?.appId ?? null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Render Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Render Service"
- className='mt-4'
- >
+ <FormControl label="Render Service" className="mt-4">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-app-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-app-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -121,20 +120,20 @@ export default function RenderCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
RenderCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/supabase/authorize.tsx b/frontend/src/pages/integrations/supabase/authorize.tsx
index 95785be6fe..379400ae47 100644
--- a/frontend/src/pages/integrations/supabase/authorize.tsx
+++ b/frontend/src/pages/integrations/supabase/authorize.tsx
@@ -1,7 +1,6 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
@@ -61,5 +60,3 @@ export default function SupabaseCreateIntegrationPage() {
}
SupabaseCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/supabase/create.tsx b/frontend/src/pages/integrations/supabase/create.tsx
index 16e35e36e6..8ab93ff4c6 100644
--- a/frontend/src/pages/integrations/supabase/create.tsx
+++ b/frontend/src/pages/integrations/supabase/create.tsx
@@ -2,7 +2,6 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
useGetIntegrationAuthApps,
@@ -138,5 +137,3 @@ export default function SupabaseCreateIntegrationPage() {
}
SupabaseCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/travisci/authorize.tsx b/frontend/src/pages/integrations/travisci/authorize.tsx
index cdd5e44411..18107e3831 100644
--- a/frontend/src/pages/integrations/travisci/authorize.tsx
+++ b/frontend/src/pages/integrations/travisci/authorize.tsx
@@ -1,77 +1,62 @@
import { useState } from 'react';
import { useRouter } from 'next/router';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Input,
-} from '../../../components/v2';
-import saveIntegrationAccessToken from "../../api/integrations/saveIntegrationAccessToken";
+import { Button, Card, CardTitle, FormControl, Input } from '../../../components/v2';
+import saveIntegrationAccessToken from '../../api/integrations/saveIntegrationAccessToken';
export default function TravisCICreateIntegrationPage() {
- const router = useRouter();
- const [apiKey, setApiKey] = useState('');
- const [apiKeyErrorText, setApiKeyErrorText] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const handleButtonClick = async () => {
- try {
- setApiKeyErrorText('');
- if (apiKey.length === 0) {
- setApiKeyErrorText('API Key cannot be blank');
- return;
- }
+ const router = useRouter();
+ const [apiKey, setApiKey] = useState('');
+ const [apiKeyErrorText, setApiKeyErrorText] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
- setIsLoading(true);
+ const handleButtonClick = async () => {
+ try {
+ setApiKeyErrorText('');
+ if (apiKey.length === 0) {
+ setApiKeyErrorText('API Key cannot be blank');
+ return;
+ }
- const integrationAuth = await saveIntegrationAccessToken({
- workspaceId: localStorage.getItem('projectData.id'),
- integration: 'travisci',
- accessToken: apiKey,
- accessId: null,
- });
+ setIsLoading(true);
- setIsLoading(false);
-
- router.push(
- `/integrations/travisci/create?integrationAuthId=${integrationAuth._id}`
- );
- } catch (err) {
- console.error(err);
- }
+ const integrationAuth = await saveIntegrationAccessToken({
+ workspaceId: localStorage.getItem('projectData.id'),
+ integration: 'travisci',
+ accessToken: apiKey,
+ accessId: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/travisci/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Travis CI Integration</CardTitle>
- <FormControl
+ };
+
+ return (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Travis CI Integration</CardTitle>
+ <FormControl
label="Travis CI API Token"
errorText={apiKeyErrorText}
isError={apiKeyErrorText !== '' ?? false}
>
- <Input
- placeholder=''
- value={apiKey}
- onChange={(e) => setApiKey(e.target.value)}
- />
+ <Input placeholder="" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />
</FormControl>
- <Button
- onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
- isLoading={isLoading}
+ <Button
+ onClick={handleButtonClick}
+ color="mineshaft"
+ className="mt-4"
+ isLoading={isLoading}
>
- Connect to Travis CI
+ Connect to Travis CI
</Button>
</Card>
</div>
- )
+ );
}
TravisCICreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/travisci/create.tsx b/frontend/src/pages/integrations/travisci/create.tsx
index 7f4e93422f..9358415c63 100644
--- a/frontend/src/pages/integrations/travisci/create.tsx
+++ b/frontend/src/pages/integrations/travisci/create.tsx
@@ -2,115 +2,114 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
-import { useGetIntegrationAuthApps,useGetIntegrationAuthById } from '../../../hooks/api/integrationAuth';
+ useGetIntegrationAuthApps,
+ useGetIntegrationAuthById
+} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
export default function TravisCICreateIntegrationPage() {
- const router = useRouter();
+ const router = useRouter();
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetApp, setTargetApp] = useState('');
-
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetApp(integrationAuthApps[0].name);
- } else {
- setTargetApp('none');
- }
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetApp, setTargetApp] = useState('');
+
+ const [isLoading, setIsLoading] = useState(false);
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ }
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetApp(integrationAuthApps[0].name);
+ } else {
+ setTargetApp('none');
}
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- if (!integrationAuth?._id) return;
+ }
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (!integrationAuth?._id) return;
- setIsLoading(true);
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp,
- appId: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp))?.appId ?? null,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment: null,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path: null,
- region: null,
- });
-
- setIsLoading(false);
+ setIsLoading(true);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp,
+ appId:
+ integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp)
+ ?.appId ?? null,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment: null,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path: null,
+ region: null
+ });
+
+ setIsLoading(false);
+
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetApp) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Travis CI Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetApp ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Travis CI Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`source-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`source-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Travis CI Project"
- className='mt-4'
- >
+ <FormControl label="Travis CI Project" className="mt-4">
<Select
value={targetApp}
onValueChange={(val) => setTargetApp(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.name} key={`target-environment-${integrationAuthApp.name}`}>
+ <SelectItem
+ value={integrationAuthApp.name}
+ key={`target-environment-${integrationAuthApp.name}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -121,20 +120,20 @@ export default function TravisCICreateIntegrationPage() {
)}
</Select>
</FormControl>
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
TravisCICreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/vercel/create.tsx b/frontend/src/pages/integrations/vercel/create.tsx
index 5310339575..d416189b55 100644
--- a/frontend/src/pages/integrations/vercel/create.tsx
+++ b/frontend/src/pages/integrations/vercel/create.tsx
@@ -2,140 +2,136 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../components/utilities/withTranslateProps';
-import {
- Button,
- Card,
- CardTitle,
- FormControl,
- Select,
- SelectItem
-} from '../../../components/v2';
+import { Button, Card, CardTitle, FormControl, Select, SelectItem } from '../../../components/v2';
import {
useGetIntegrationAuthApps,
useGetIntegrationAuthById,
useGetIntegrationAuthVercelBranches
} from '../../../hooks/api/integrationAuth';
import { useGetWorkspaceById } from '../../../hooks/api/workspace';
-import createIntegration from "../../api/integrations/createIntegration";
+import createIntegration from '../../api/integrations/createIntegration';
const vercelEnvironments = [
- { name: 'Development', slug: 'development' },
- { name: 'Preview', slug: 'preview' },
- { name: 'Production', slug: 'production' }
-]
+ { name: 'Development', slug: 'development' },
+ { name: 'Preview', slug: 'preview' },
+ { name: 'Production', slug: 'production' }
+];
export default function VercelCreateIntegrationPage() {
- const router = useRouter();
-
- const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
- const [targetAppId, setTargetAppId] = useState('');
- const [targetEnvironment, setTargetEnvironment] = useState('');
- const [targetBranch, setTargetBranch] = useState('');
- const [isLoading, setIsLoading] = useState(false);
-
- const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
- const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
- const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId as string ?? '');
- const { data: integrationAuthApps } = useGetIntegrationAuthApps({
- integrationAuthId: integrationAuthId as string ?? ''
- });
-
- const { data: branches } = useGetIntegrationAuthVercelBranches({
- integrationAuthId: integrationAuthId as string,
- appId: targetAppId,
- });
-
- const filteredBranches = branches
- ?.filter((branchName) => branchName !== 'main')
- .concat('');
-
- useEffect(() => {
- if (workspace) {
- setSelectedSourceEnvironment(workspace.environments[0].slug);
- }
- }, [workspace]);
-
- useEffect(() => {
- if (integrationAuthApps) {
- if (integrationAuthApps.length > 0) {
- setTargetAppId(integrationAuthApps[0].appId as string);
- setTargetEnvironment(vercelEnvironments[0].slug);
- } else {
- setTargetAppId('none');
- setTargetEnvironment(vercelEnvironments[0].slug);
- }
+ const router = useRouter();
+
+ const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState('');
+ const [targetAppId, setTargetAppId] = useState('');
+ const [targetEnvironment, setTargetEnvironment] = useState('');
+ const [targetBranch, setTargetBranch] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
+
+ const { integrationAuthId } = queryString.parse(router.asPath.split('?')[1]);
+ const { data: workspace } = useGetWorkspaceById(localStorage.getItem('projectData.id') ?? '');
+ const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? '');
+ const { data: integrationAuthApps } = useGetIntegrationAuthApps({
+ integrationAuthId: (integrationAuthId as string) ?? ''
+ });
+
+ const { data: branches } = useGetIntegrationAuthVercelBranches({
+ integrationAuthId: integrationAuthId as string,
+ appId: targetAppId
+ });
+
+ const filteredBranches = branches?.filter((branchName) => branchName !== 'main').concat('');
+
+ useEffect(() => {
+ if (workspace) {
+ setSelectedSourceEnvironment(workspace.environments[0].slug);
+ }
+ }, [workspace]);
+
+ useEffect(() => {
+ if (integrationAuthApps) {
+ if (integrationAuthApps.length > 0) {
+ setTargetAppId(integrationAuthApps[0].appId as string);
+ setTargetEnvironment(vercelEnvironments[0].slug);
+ } else {
+ setTargetAppId('none');
+ setTargetEnvironment(vercelEnvironments[0].slug);
}
- }, [integrationAuthApps]);
-
- const handleButtonClick = async () => {
- try {
- if (!integrationAuth?._id) return;
-
- setIsLoading(true);
-
- const targetApp = integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.appId === targetAppId);
-
- if (!targetApp || !targetApp.appId) return;
-
- const path = (targetEnvironment === 'preview' && targetBranch !== '') ? targetBranch : null;
-
- await createIntegration({
- integrationAuthId: integrationAuth?._id,
- isActive: true,
- app: targetApp.name,
- appId: targetApp.appId,
- sourceEnvironment: selectedSourceEnvironment,
- targetEnvironment,
- targetEnvironmentId: null,
- targetService: null,
- targetServiceId: null,
- owner: null,
- path,
- region: null
- });
-
- setIsLoading(false);
- router.push(
- `/integrations/${localStorage.getItem('projectData.id')}`
- );
- } catch (err) {
- console.error(err);
- }
}
-
- return (integrationAuth && workspace && selectedSourceEnvironment && integrationAuthApps && targetAppId && targetEnvironment) ? (
- <div className="h-full w-full flex justify-center items-center">
- <Card className="max-w-md p-8 rounded-md">
- <CardTitle className='text-center'>Vercel Integration</CardTitle>
- <FormControl
- label="Project Environment"
- className='mt-4'
- >
+ }, [integrationAuthApps]);
+
+ const handleButtonClick = async () => {
+ try {
+ if (!integrationAuth?._id) return;
+
+ setIsLoading(true);
+
+ const targetApp = integrationAuthApps?.find(
+ (integrationAuthApp) => integrationAuthApp.appId === targetAppId
+ );
+
+ if (!targetApp || !targetApp.appId) return;
+
+ const path = targetEnvironment === 'preview' && targetBranch !== '' ? targetBranch : null;
+
+ await createIntegration({
+ integrationAuthId: integrationAuth?._id,
+ isActive: true,
+ app: targetApp.name,
+ appId: targetApp.appId,
+ sourceEnvironment: selectedSourceEnvironment,
+ targetEnvironment,
+ targetEnvironmentId: null,
+ targetService: null,
+ targetServiceId: null,
+ owner: null,
+ path,
+ region: null
+ });
+
+ setIsLoading(false);
+ router.push(`/integrations/${localStorage.getItem('projectData.id')}`);
+ } catch (err) {
+ console.error(err);
+ }
+ };
+
+ return integrationAuth &&
+ workspace &&
+ selectedSourceEnvironment &&
+ integrationAuthApps &&
+ targetAppId &&
+ targetEnvironment ? (
+ <div className="flex h-full w-full items-center justify-center">
+ <Card className="max-w-md rounded-md p-8">
+ <CardTitle className="text-center">Vercel Integration</CardTitle>
+ <FormControl label="Project Environment" className="mt-4">
<Select
value={selectedSourceEnvironment}
onValueChange={(val) => setSelectedSourceEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{workspace?.environments.map((sourceEnvironment) => (
- <SelectItem value={sourceEnvironment.slug} key={`azure-key-vault-environment-${sourceEnvironment.slug}`}>
+ <SelectItem
+ value={sourceEnvironment.slug}
+ key={`azure-key-vault-environment-${sourceEnvironment.slug}`}
+ >
{sourceEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
- <FormControl
- label="Vercel App"
- >
+ <FormControl label="Vercel App">
<Select
value={targetAppId}
onValueChange={(val) => setTargetAppId(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
isDisabled={integrationAuthApps.length === 0}
>
{integrationAuthApps.length > 0 ? (
integrationAuthApps.map((integrationAuthApp) => (
- <SelectItem value={integrationAuthApp.appId as string} key={`target-app-${integrationAuthApp.appId as string}`}>
+ <SelectItem
+ value={integrationAuthApp.appId as string}
+ key={`target-app-${integrationAuthApp.appId as string}`}
+ >
{integrationAuthApp.name}
</SelectItem>
))
@@ -146,29 +142,28 @@ export default function VercelCreateIntegrationPage() {
)}
</Select>
</FormControl>
- <FormControl
- label="Vercel App Environment"
- >
+ <FormControl label="Vercel App Environment">
<Select
value={targetEnvironment}
onValueChange={(val) => setTargetEnvironment(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{vercelEnvironments.map((vercelEnvironment) => (
- <SelectItem value={vercelEnvironment.slug} key={`target-environment-${vercelEnvironment.slug}`}>
+ <SelectItem
+ value={vercelEnvironment.slug}
+ key={`target-environment-${vercelEnvironment.slug}`}
+ >
{vercelEnvironment.name}
</SelectItem>
))}
</Select>
</FormControl>
{targetEnvironment === 'preview' && filteredBranches && (
- <FormControl
- label="Vercel Preview Branch (Optional)"
- >
+ <FormControl label="Vercel Preview Branch (Optional)">
<Select
value={targetBranch}
onValueChange={(val) => setTargetBranch(val)}
- className='w-full border border-mineshaft-500'
+ className="w-full border border-mineshaft-500"
>
{filteredBranches.map((branchName) => (
<SelectItem value={branchName} key={`target-branch-${branchName}`}>
@@ -178,20 +173,20 @@ export default function VercelCreateIntegrationPage() {
</Select>
</FormControl>
)}
- <Button
+ <Button
onClick={handleButtonClick}
- color="mineshaft"
- className='mt-4'
+ color="mineshaft"
+ className="mt-4"
isLoading={isLoading}
isDisabled={integrationAuthApps.length === 0}
>
- Create Integration
+ Create Integration
</Button>
</Card>
</div>
- ) : <div />
+ ) : (
+ <div />
+ );
}
VercelCreateIntegrationPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/integrations/vercel/oauth2/callback.tsx b/frontend/src/pages/integrations/vercel/oauth2/callback.tsx
index 1acf01b02f..70ef26afb8 100644
--- a/frontend/src/pages/integrations/vercel/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/vercel/oauth2/callback.tsx
@@ -2,40 +2,34 @@ import { useEffect } from 'react';
import { useRouter } from 'next/router';
import queryString from 'query-string';
-import { getTranslatedServerSideProps } from '../../../../components/utilities/withTranslateProps';
-import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration";
+import AuthorizeIntegration from '../../../api/integrations/authorizeIntegration';
export default function VercelOAuth2CallbackPage() {
- const router = useRouter();
-
- const { code, state } = queryString.parse(router.asPath.split('?')[1]);
-
- useEffect(() => {
- (async () => {
- try {
- // validate state
- if (state !== localStorage.getItem('latestCSRFToken')) return;
- localStorage.removeItem('latestCSRFToken');
-
- const integrationAuth = await AuthorizeIntegration({
- workspaceId: localStorage.getItem('projectData.id') as string,
- code: code as string,
- integration: 'vercel'
- });
-
- router.push(
- `/integrations/vercel/create?integrationAuthId=${integrationAuth._id}`
- );
-
- } catch (err) {
- console.error(err);
- }
- })();
- }, []);
-
- return <div />
+ const router = useRouter();
+
+ const { code, state } = queryString.parse(router.asPath.split('?')[1]);
+
+ useEffect(() => {
+ (async () => {
+ try {
+ // validate state
+ if (state !== localStorage.getItem('latestCSRFToken')) return;
+ localStorage.removeItem('latestCSRFToken');
+
+ const integrationAuth = await AuthorizeIntegration({
+ workspaceId: localStorage.getItem('projectData.id') as string,
+ code: code as string,
+ integration: 'vercel'
+ });
+
+ router.push(`/integrations/vercel/create?integrationAuthId=${integrationAuth._id}`);
+ } catch (err) {
+ console.error(err);
+ }
+ })();
+ }, []);
+
+ return <div />;
}
VercelOAuth2CallbackPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['integrations']);
\ No newline at end of file
diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx
index 64f1caca5a..5eb42b7eb6 100644
--- a/frontend/src/pages/login.tsx
+++ b/frontend/src/pages/login.tsx
@@ -1,14 +1,13 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
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 ListBox from '@app/components/basic/Listbox';
import LoginStep from '@app/components/login/LoginStep';
import MFAStep from '@app/components/login/MFAStep';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { isLoggedIn } from '@app/reactQuery';
import getWorkspaces from './api/workspace/getWorkspaces';
@@ -20,7 +19,6 @@ export default function Login() {
const [step, setStep] = useState(1);
const { t } = useTranslation();
const lang = router.locale ?? 'en';
-
const setLanguage = async (to: string) => {
router.push('/login', '/login', { locale: to });
@@ -43,7 +41,7 @@ export default function Login() {
redirectToDashboard();
}
}, []);
-
+
const renderStep = (loginStep: number) => {
// TODO: add MFA step
switch (loginStep) {
@@ -59,45 +57,38 @@ export default function Login() {
);
case 2:
// TODO: add MFA step
- return (
- <MFAStep
- email={email}
- password={password}
- />
- );
+ return <MFAStep email={email} password={password} />;
default:
- return <div />
+ return <div />;
}
- }
+ };
return (
- <div className="bg-bunker-800 h-screen flex flex-col justify-start px-6">
+ <div className="flex h-screen flex-col justify-start bg-bunker-800 px-6">
<Head>
- <title>{t('common:head-title', { title: t('login:title') })}</title>
+ <title>{t('common.head-title', { title: t('login.title') })}</title>
<link rel="icon" href="/infisical.ico" />
<meta property="og:image" content="/images/message.png" />
- <meta property="og:title" content={t('login:og-title') ?? ''} />
- <meta name="og:description" content={t('login:og-description') ?? ''} />
+ <meta property="og:title" content={t('login.og-title') ?? ''} />
+ <meta name="og:description" content={t('login.og-description') ?? ''} />
</Head>
<Link href="/">
- <div className="flex justify-center mb-8 mt-20 cursor-pointer">
+ <div className="mb-8 mt-20 flex cursor-pointer justify-center">
<Image src="/images/biglogo.png" height={90} width={120} alt="long logo" />
</div>
</Link>
{renderStep(step)}
<div className="absolute right-4 top-0 mt-4 flex items-center justify-center">
- <div className="w-48 mx-auto">
+ <div className="mx-auto w-48">
<ListBox
isSelected={lang}
onChange={setLanguage}
data={['en', 'ko', 'fr', 'pt-BR']}
isFull
- text={`${t('common:language')}: `}
+ text={`${t('common.language')}: `}
/>
</div>
</div>
</div>
);
}
-
-export const getStaticProps = getTranslatedStaticProps(['auth', 'login', 'mfa']);
diff --git a/frontend/src/pages/noprojects.tsx b/frontend/src/pages/noprojects.tsx
index a08c1b8eea..37b1faf4ae 100644
--- a/frontend/src/pages/noprojects.tsx
+++ b/frontend/src/pages/noprojects.tsx
@@ -3,7 +3,6 @@ import Image from 'next/image';
import { useRouter } from 'next/router';
import Button from '@app/components/basic/buttons/Button';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import getOrganizationUserProjects from './api/organization/GetOrgUserProjects';
@@ -11,7 +10,9 @@ export default function NoProjects() {
const router = useRouter();
const redirectUser = async () => {
- const workspaces = await getOrganizationUserProjects({ orgId: String(localStorage.getItem("orgData.id")) });
+ const workspaces = await getOrganizationUserProjects({
+ orgId: String(localStorage.getItem('orgData.id'))
+ });
if (workspaces.length > 0) {
router.push(`/dashboard/${workspaces[0]._id}`);
}
@@ -25,20 +26,19 @@ export default function NoProjects() {
}, []);
return (
- <div className="h-full flex flex-col items-center justify-center text-gray-300 text-lg text-center w-11/12 mr-auto">
+ <div className="mr-auto flex h-full w-11/12 flex-col items-center justify-center text-center text-lg text-gray-300">
<div className="mb-6 mt-16 mr-16">
<Image src="/images/dragon-cant-find.svg" height={270} width={436} alt="google logo" />
</div>
- <div className="px-4 rounded-md bg-bunker-500 mb-8 text-bunker-300 shadow-xl py-6">
+ <div className="mb-8 rounded-md bg-bunker-500 px-4 py-6 text-bunker-300 shadow-xl">
<div className="max-w-md">
You are not part of any projects in this organization yet. When you are, they will appear
here.
</div>
- <div className="max-w-md mt-4">
- Create a new project, or ask other organization members to give you neccessary
- permissions.
+ <div className="mt-4 max-w-md">
+ Create a new project, or ask other organization members to give you necessary permissions.
</div>
- <div className="mt-6 mx-2">
+ <div className="mx-2 mt-6">
<Button text="Check again" onButtonPressed={redirectUser} size="md" color="mineshaft" />
</div>
</div>
@@ -47,5 +47,3 @@ export default function NoProjects() {
}
NoProjects.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['noprojects']);
diff --git a/frontend/src/pages/password-reset.tsx b/frontend/src/pages/password-reset.tsx
index 450cd82de9..aba340d00e 100644
--- a/frontend/src/pages/password-reset.tsx
+++ b/frontend/src/pages/password-reset.tsx
@@ -12,7 +12,6 @@ import Button from '@app/components/basic/buttons/Button';
import InputField from '@app/components/basic/InputField';
import passwordCheck from '@app/components/utilities/checks/PasswordCheck';
import Aes256Gcm from '@app/components/utilities/cryptography/aes-256-gcm';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { deriveArgonKey } from '../components/utilities/cryptography/crypto';
import EmailVerifyOnPasswordReset from './api/auth/EmailVerifyOnPasswordReset';
@@ -83,9 +82,9 @@ export default function PasswordReset() {
parallelism: 1,
hashLen: 32
});
-
+
if (!derivedKey) throw new Error('Failed to derive key from password');
-
+
const key = crypto.randomBytes(32);
// create encrypted private key by encrypting the private
@@ -98,7 +97,7 @@ export default function PasswordReset() {
text: privateKey,
secret: key
});
-
+
// create the protected key by encrypting the symmetric key
// [key] with the derived key
const {
@@ -134,12 +133,12 @@ export default function PasswordReset() {
// Click a button to confirm email
const stepConfirmEmail = (
- <div className="bg-bunker flex flex-col items-center w-full py-6 max-w-xs md:max-w-lg my-32 px-4 md:px-6 mx-1 rounded-xl drop-shadow-xl">
- <p className="text-4xl text-center font-semibold mb-8 flex justify-center text-transparent bg-clip-text bg-gradient-to-br from-sky-400 to-primary">
+ <div className="my-32 mx-1 flex w-full max-w-xs flex-col items-center rounded-xl bg-bunker py-6 px-4 drop-shadow-xl md:max-w-lg md:px-6">
+ <p className="mb-8 flex justify-center bg-gradient-to-br from-sky-400 to-primary bg-clip-text text-center text-4xl font-semibold text-transparent">
Confirm your email
</p>
<Image src="/images/envelope.svg" height={262} width={410} alt="verify email" />
- <div className="flex 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">
+ <div className="mx-auto mt-4 mb-2 flex max-h-24 max-w-md flex-col items-center justify-center px-4 text-lg md:p-2">
<Button
text="Confirm Email"
onButtonPressed={async () => {
@@ -163,16 +162,16 @@ export default function PasswordReset() {
// Input backup key
const stepInputBackupKey = (
- <div className="bg-bunker flex flex-col items-center w-full pt-6 pb-3 max-w-xs md:max-w-lg my-32 px-4 md:px-6 mx-1 rounded-xl drop-shadow-xl">
- <p className="text-2xl md:text-3xl w-max mx-auto flex justify-center font-semibold text-bunker-100 mb-4">
+ <div className="my-32 mx-1 flex w-full max-w-xs flex-col items-center rounded-xl bg-bunker px-4 pt-6 pb-3 drop-shadow-xl md:max-w-lg md:px-6">
+ <p className="mx-auto mb-4 flex w-max justify-center text-2xl font-semibold text-bunker-100 md:text-3xl">
Enter your backup key
</p>
- <div className="flex flex-row items-center justify-center md:pb-4 mt-4 md:mx-2">
- <p className="text-sm flex justify-center text-gray-400 w-max max-w-md">
+ <div className="mt-4 flex flex-row items-center justify-center md:mx-2 md:pb-4">
+ <p className="flex w-max max-w-md justify-center text-sm text-gray-400">
You can find it in your emrgency kit. You had to download the enrgency kit during signup.
</p>
</div>
- <div className="flex items-center justify-center w-full md:p-2 rounded-lg mt-4 md:mt-0 max-h-24 md:max-h-28">
+ <div className="mt-4 flex max-h-24 w-full items-center justify-center rounded-lg md:mt-0 md:max-h-28 md:p-2">
<InputField
label="Backup Key"
onChangeHandler={setBackupKey}
@@ -184,8 +183,8 @@ export default function PasswordReset() {
errorText="Something is wrong with the backup key"
/>
</div>
- <div className="flex flex-col items-center justify-center w-full md:p-2 max-h-20 max-w-md mt-4 mx-auto text-sm">
- <div className="text-l mt-6 m-8 px-8 py-3 text-lg">
+ <div className="mx-auto mt-4 flex max-h-20 w-full max-w-md flex-col items-center justify-center text-sm md:p-2">
+ <div className="text-l m-8 mt-6 px-8 py-3 text-lg">
<Button
text="Submit Backup Key"
onButtonPressed={() => getEncryptedKeyHandler()}
@@ -198,16 +197,16 @@ export default function PasswordReset() {
// Enter new password
const stepEnterNewPassword = (
- <div className="bg-bunker flex flex-col items-center w-full pt-6 pb-3 max-w-xs md:max-w-lg my-32 px-4 md:px-6 mx-1 rounded-xl drop-shadow-xl">
- <p className="text-2xl md:text-3xl w-max mx-auto flex justify-center font-semibold text-bunker-100">
+ <div className="my-32 mx-1 flex w-full max-w-xs flex-col items-center rounded-xl bg-bunker px-4 pt-6 pb-3 drop-shadow-xl md:max-w-lg md:px-6">
+ <p className="mx-auto flex w-max justify-center text-2xl font-semibold text-bunker-100 md:text-3xl">
Enter new password
</p>
- <div className="flex flex-row items-center justify-center md:pb-4 mt-1 md:mx-2">
- <p className="text-sm flex justify-center text-gray-400 w-max max-w-md">
+ <div className="mt-1 flex flex-row items-center justify-center md:mx-2 md:pb-4">
+ <p className="flex w-max max-w-md justify-center text-sm text-gray-400">
Make sure you save it somewhere save.
</p>
</div>
- <div className="flex items-center justify-center w-full md:p-2 rounded-lg mt-4 md:mt-0 max-h-24 md:max-h-28">
+ <div className="mt-4 flex max-h-24 w-full items-center justify-center rounded-lg md:mt-0 md:max-h-28 md:p-2">
<InputField
label="New Password"
onChangeHandler={(password) => {
@@ -229,23 +228,23 @@ export default function PasswordReset() {
/>
</div>
{passwordErrorLength || passwordErrorLowerCase || passwordErrorNumber ? (
- <div className="w-full mt-3 bg-white/5 px-2 mx-2 flex flex-col items-start py-2 rounded-md max-w-md mb-2">
- <div className="text-gray-400 text-sm mb-1">Password should contain at least:</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="mx-2 mt-3 mb-2 flex w-full max-w-md flex-col items-start rounded-md bg-white/5 px-2 py-2">
+ <div className="mb-1 text-sm text-gray-400">Password should contain at least:</div>
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLength ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div className={`${passwordErrorLength ? 'text-gray-400' : 'text-gray-600'} text-sm`}>
14 characters
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLowerCase ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div
className={`${passwordErrorLowerCase ? 'text-gray-400' : 'text-gray-600'} text-sm`}
@@ -253,11 +252,11 @@ export default function PasswordReset() {
1 lowercase character
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorNumber ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div className={`${passwordErrorNumber ? 'text-gray-400' : 'text-gray-600'} text-sm`}>
1 number
@@ -267,8 +266,8 @@ export default function PasswordReset() {
) : (
<div className="py-2" />
)}
- <div className="flex flex-col items-center justify-center w-full md:p-2 max-h-20 max-w-md mt-4 mx-auto text-sm">
- <div className="text-l mt-6 m-8 px-8 py-3 text-lg">
+ <div className="mx-auto mt-4 flex max-h-20 w-full max-w-md flex-col items-center justify-center text-sm md:p-2">
+ <div className="text-l m-8 mt-6 px-8 py-3 text-lg">
<Button
text="Submit New Password"
onButtonPressed={() => resetPasswordHandler()}
@@ -280,12 +279,10 @@ export default function PasswordReset() {
);
return (
- <div className="bg-bunker-800 h-screen w-full flex flex-col items-center justify-center">
+ <div className="flex h-screen w-full flex-col items-center justify-center bg-bunker-800">
{step === 1 && stepConfirmEmail}
{step === 2 && stepInputBackupKey}
{step === 3 && stepEnterNewPassword}
</div>
);
}
-
-export const getServerSideProps = getTranslatedStaticProps([]);
diff --git a/frontend/src/pages/settings/billing/[id].tsx b/frontend/src/pages/settings/billing/[id].tsx
index 5c06af4662..e1e909790f 100644
--- a/frontend/src/pages/settings/billing/[id].tsx
+++ b/frontend/src/pages/settings/billing/[id].tsx
@@ -1,11 +1,10 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
-import { useTranslation } from 'next-i18next';
import { plans as plansConstant } from 'public/data/frequentConstants';
import Plan from '@app/components/billing/Plan';
import NavHeader from '@app/components/navigation/NavHeader';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import getOrganizationSubscriptions from '../../api/organization/GetOrgSubscription';
import getOrganizationUsers from '../../api/organization/GetOrgUsers';
@@ -19,43 +18,43 @@ export default function SettingsBilling() {
const plans = [
{
key: 1,
- name: t('billing:starter.name')!,
- price: t('billing:free')!,
- priceExplanation: t('billing:starter.price-explanation')!,
- text: t('billing:starter.text')!,
- subtext: t('billing:starter.subtext')!,
- buttonTextMain: t('billing:downgrade')!,
- buttonTextSecondary: t('billing:learn-more')!,
+ name: t('billing.starter.name')!,
+ price: t('billing.free')!,
+ priceExplanation: t('billing.starter.price-explanation')!,
+ text: t('billing.starter.text')!,
+ subtext: t('billing.starter.subtext')!,
+ buttonTextMain: t('billing.downgrade')!,
+ buttonTextSecondary: t('billing.learn-more')!,
current: currentPlan === plansConstant.starter
},
{
key: 2,
name: 'Team',
price: '$8',
- priceExplanation: t('billing:professional.price-explanation')!,
+ priceExplanation: t('billing.professional.price-explanation')!,
text: 'For teams that want to improve their efficiency and security.',
- buttonTextMain: t('billing:upgrade')!,
- buttonTextSecondary: t('billing:learn-more')!,
+ buttonTextMain: t('billing.upgrade')!,
+ buttonTextSecondary: t('billing.learn-more')!,
current: currentPlan === plansConstant.team
},
{
key: 3,
- name: t('billing:professional.name')!,
+ name: t('billing.professional.name')!,
price: '$18',
- priceExplanation: t('billing:professional.price-explanation')!,
- text: t('billing:enterprise.text')!,
- subtext: t('billing:professional.subtext')!,
- buttonTextMain: t('billing:upgrade')!,
- buttonTextSecondary: t('billing:learn-more')!,
+ priceExplanation: t('billing.professional.price-explanation')!,
+ text: t('billing.enterprise.text')!,
+ subtext: t('billing.professional.subtext')!,
+ buttonTextMain: t('billing.upgrade')!,
+ buttonTextSecondary: t('billing.learn-more')!,
current: currentPlan === plansConstant.professional
},
{
key: 4,
- name: t('billing:enterprise.name')!,
- price: t('billing:custom-pricing')!,
+ name: t('billing.enterprise.name')!,
+ price: t('billing.custom-pricing')!,
text: 'Boost the security and efficiency of your engineering teams.',
- buttonTextMain: t('billing:schedule-demo')!,
- buttonTextSecondary: t('billing:learn-more')!,
+ buttonTextMain: t('billing.schedule-demo')!,
+ buttonTextSecondary: t('billing.learn-more')!,
current: false
}
];
@@ -77,30 +76,30 @@ export default function SettingsBilling() {
}, []);
return (
- <div className="bg-bunker-800 pb-4 flex flex-col justify-between text-white">
+ <div className="flex flex-col justify-between bg-bunker-800 pb-4 text-white">
<Head>
- <title>{t('common:head-title', { title: t('billing:title') })}</title>
+ <title>{t('common.head-title', { title: t('billing.title') })}</title>
<link rel="icon" href="/infisical.ico" />
</Head>
<div className="flex flex-row">
<div className="w-full pb-2">
- <NavHeader pageName={t('billing:title')} />
- <div className="flex flex-row justify-between items-center ml-6 my-8 text-xl max-w-5xl">
- <div className="flex flex-col justify-start items-start text-3xl">
- <p className="font-semibold mr-4 text-gray-200">{t('billing:title')}</p>
- <p className="font-normal mr-4 text-gray-400 text-base">{t('billing:description')}</p>
+ <NavHeader pageName={t('billing.title')} />
+ <div className="my-8 ml-6 flex max-w-5xl flex-row items-center justify-between text-xl">
+ <div className="flex flex-col items-start justify-start text-3xl">
+ <p className="mr-4 font-semibold text-gray-200">{t('billing.title')}</p>
+ <p className="mr-4 text-base font-normal text-gray-400">{t('billing.description')}</p>
</div>
</div>
- <div className="flex flex-col ml-6 text-mineshaft-50 w-max">
- <p className="text-xl font-semibold">{t('billing:subscription')}</p>
- <div className="grid grid-cols-2 grid-rows-2 gap-y-6 gap-x-3 mt-4 overflow-x-auto">
+ <div className="ml-6 flex w-max flex-col text-mineshaft-50">
+ <p className="text-xl font-semibold">{t('billing.subscription')}</p>
+ <div className="mt-4 grid grid-cols-2 grid-rows-2 gap-y-6 gap-x-3 overflow-x-auto">
{plans.map((plan) => (
<Plan key={plan.name} plan={plan} />
))}
</div>
- <p className="text-xl font-bold mt-12">{t('billing:current-usage')}</p>
+ <p className="mt-12 text-xl font-bold">{t('billing.current-usage')}</p>
<div className="flex flex-row">
- <div className="mr-4 mt-8 text-gray-300 w-60 pt-6 pb-10 rounded-md bg-white/5 justify-center items-center flex flex-col">
+ <div className="mr-4 mt-8 flex w-60 flex-col items-center justify-center rounded-md bg-white/5 pt-6 pb-10 text-gray-300">
<p className="text-6xl font-bold">{numUsers}</p>
<p className="text-gray-300">
{numUsers > 1 ? 'Organization members' : 'Organization member'}
@@ -119,5 +118,3 @@ export default function SettingsBilling() {
}
SettingsBilling.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps(['settings', 'billing']);
diff --git a/frontend/src/pages/settings/org/[id]/index.tsx b/frontend/src/pages/settings/org/[id]/index.tsx
index 59c8c373ca..1770e99310 100644
--- a/frontend/src/pages/settings/org/[id]/index.tsx
+++ b/frontend/src/pages/settings/org/[id]/index.tsx
@@ -1,8 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
-import { useTranslation } from 'next-i18next';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import { OrgSettingsPage } from '@app/views/Settings/OrgSettingsPage';
export default function SettingsOrg() {
@@ -11,7 +10,7 @@ export default function SettingsOrg() {
return (
<>
<Head>
- <title>{t('common:head-title', { title: t('settings-org:title') })}</title>
+ <title>{t('common.head-title', { title: t('settings.org.title') })}</title>
<link rel="icon" href="/infisical.ico" />
</Head>
<OrgSettingsPage />
@@ -20,10 +19,3 @@ export default function SettingsOrg() {
}
SettingsOrg.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps([
- 'settings',
- 'settings-org',
- 'section-incident',
- 'section-members'
-]);
diff --git a/frontend/src/pages/settings/org/[id]/service-accounts/[serviceAccountId].tsx b/frontend/src/pages/settings/org/[id]/service-accounts/[serviceAccountId].tsx
index dff9486a81..683dd7a410 100644
--- a/frontend/src/pages/settings/org/[id]/service-accounts/[serviceAccountId].tsx
+++ b/frontend/src/pages/settings/org/[id]/service-accounts/[serviceAccountId].tsx
@@ -1,8 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import Head from 'next/head';
-import { useTranslation } from 'next-i18next';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import { CreateServiceAccountPage } from '@app/views/Settings/CreateServiceAccountPage';
export default function ServiceAccountPage() {
@@ -18,10 +16,3 @@ export default function ServiceAccountPage() {
}
ServiceAccountPage.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps([
- 'settings',
- 'settings-org',
- 'section-incident',
- 'section-members'
-]);
\ No newline at end of file
diff --git a/frontend/src/pages/settings/personal/[id].tsx b/frontend/src/pages/settings/personal/[id].tsx
index 2dbd27b8b8..2b428aeca7 100644
--- a/frontend/src/pages/settings/personal/[id].tsx
+++ b/frontend/src/pages/settings/personal/[id].tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faCheck, faPlus, faX } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -13,7 +13,6 @@ import NavHeader from '@app/components/navigation/NavHeader';
import passwordCheck from '@app/components/utilities/checks/PasswordCheck';
import changePassword from '@app/components/utilities/cryptography/changePassword';
import issueBackupKey from '@app/components/utilities/cryptography/issueBackupKey';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import { SecuritySection } from '@app/views/Settings/PersonalSettingsPage/SecuritySection/SecuritySection';
import AddApiKeyDialog from '../../../components/basic/dialog/AddApiKeyDialog';
@@ -36,13 +35,14 @@ export default function PersonalSettings() {
const [isAddApiKeyDialogOpen, setIsAddApiKeyDialogOpen] = useState(false);
const [apiKeys, setApiKeys] = useState<any[]>([]);
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const router = useRouter();
const lang = router.locale ?? 'en';
const setLanguage = async (to: string) => {
router.push(router.asPath, router.asPath, { locale: to });
localStorage.setItem('lang', to);
+ i18n.changeLanguage(to);
};
useEffect(() => {
@@ -65,9 +65,9 @@ export default function PersonalSettings() {
};
return (
- <div className="bg-bunker-800 max-h-screen flex flex-col justify-between text-white">
+ <div className="flex max-h-screen flex-col justify-between bg-bunker-800 text-white">
<Head>
- <title>{t('common:head-title', { title: t('settings-personal:title') })}</title>
+ <title>{t('common.head-title', { title: t('settings.personal.title') })}</title>
<link rel="icon" href="/infisical.ico" />
</Head>
<AddApiKeyDialog
@@ -77,44 +77,44 @@ export default function PersonalSettings() {
setApiKeys={setApiKeys}
/>
<div className="flex flex-row">
- <div className="w-full max-h-screen pb-2">
- <NavHeader pageName={t('settings-personal:title')} isProjectRelated={false} />
- <div className="flex flex-row justify-between items-center ml-6 mt-8 mb-6 text-xl max-w-5xl">
- <div className="flex flex-col justify-start items-start text-3xl">
- <p className="font-semibold mr-4 text-gray-200">{t('settings-personal:title')}</p>
- <p className="font-normal mr-4 text-gray-400 text-base">
- {t('settings-personal:description')}
+ <div className="max-h-screen w-full pb-2">
+ <NavHeader pageName={t('settings.personal.title')} isProjectRelated={false} />
+ <div className="ml-6 mt-8 mb-6 flex max-w-5xl flex-row items-center justify-between text-xl">
+ <div className="flex flex-col items-start justify-start text-3xl">
+ <p className="mr-4 font-semibold text-gray-200">{t('settings.personal.title')}</p>
+ <p className="mr-4 text-base font-normal text-gray-400">
+ {t('settings.personal.description')}
</p>
</div>
</div>
- <div className="flex flex-col ml-6 text-mineshaft-50 mr-6 max-w-5xl">
- <div className="bg-white/5 rounded-md px-6 pt-6 pb-6 flex flex-col items-start w-full mb-6 mt-4">
- <p className="text-xl font-semibold self-start">
- {t('settings-personal:change-language')}
+ <div className="ml-6 mr-6 flex max-w-5xl flex-col text-mineshaft-50">
+ <div className="mb-6 mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-6 pb-6">
+ <p className="self-start text-xl font-semibold">
+ {t('settings.personal.change-language')}
</p>
- <div className="max-h-28 w-ful mt-4">
+ <div className="w-ful mt-4 max-h-28">
<ListBox
isSelected={lang}
onChange={setLanguage}
data={['en', 'ko', 'fr', 'es']}
- text={`${t('common:language')}: `}
+ text={`${t('common.language')}: `}
/>
</div>
</div>
<SecuritySection />
- <div className="bg-white/5 rounded-md px-6 flex flex-col items-start w-full mt-2 mb-8 pt-4">
- <div className="flex flex-row justify-between w-full">
- <div className="flex flex-col w-full">
- <p className="text-xl font-semibold mb-3">
- {t('settings-personal:api-keys.title')}
+ <div className="mt-2 mb-8 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-4">
+ <div className="flex w-full flex-row justify-between">
+ <div className="flex w-full flex-col">
+ <p className="mb-3 text-xl font-semibold">
+ {t('settings.personal.api-keys.title')}
</p>
<p className="text-sm text-gray-400">
- {t('settings-personal:api-keys.description')}
+ {t('settings.personal.api-keys.description')}
</p>
</div>
- <div className="w-40 mt-2">
+ <div className="mt-2 w-40">
<Button
- text={String(t('settings-personal:api-keys.add-new'))}
+ text={String(t('settings.personal.api-keys.add-new'))}
onButtonPressed={() => {
setIsAddApiKeyDialogOpen(true);
}}
@@ -127,17 +127,17 @@ export default function PersonalSettings() {
<ApiKeyTable data={apiKeys} setApiKeys={setApiKeys as any} />
</div>
- <div className="bg-white/5 rounded-md px-6 pt-5 pb-6 flex flex-col items-start w-full mb-6">
- <div className="flex flex-row max-w-5xl justify-between items-center w-full">
- <div className="flex flex-col justify-between w-full max-w-3xl">
- <p className="text-xl font-semibold mb-3 min-w-max">
- {t('section-password:change')}
+ <div className="mb-6 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-5 pb-6">
+ <div className="flex w-full max-w-5xl flex-row items-center justify-between">
+ <div className="flex w-full max-w-3xl flex-col justify-between">
+ <p className="mb-3 min-w-max text-xl font-semibold">
+ {t('section.password.change')}
</p>
</div>
</div>
- <div className="max-w-xl w-full">
+ <div className="w-full max-w-xl">
<InputField
- label={t('section-password:current') as string}
+ label={t('section.password.current') as string}
onChangeHandler={(password) => {
setCurrentPassword(password);
}}
@@ -145,13 +145,13 @@ export default function PersonalSettings() {
value={currentPassword}
isRequired
error={currentPasswordError}
- errorText={t('section-password:current-wrong') as string}
+ errorText={t('section.password.current-wrong') as string}
autoComplete="current-password"
id="current-password"
/>
<div className="py-2" />
<InputField
- label={t('section-password:new') as string}
+ label={t('section.password.new') as string}
onChangeHandler={(password) => {
setNewPassword(password);
passwordCheck({
@@ -171,59 +171,59 @@ export default function PersonalSettings() {
/>
</div>
{passwordErrorLength || passwordErrorLowerCase || passwordErrorNumber ? (
- <div className="w-full mt-3 bg-white/5 px-2 flex flex-col items-start py-2 rounded-md max-w-xl mb-2">
- <div className="text-gray-400 text-sm mb-1">
- {t('section-password:validate-base')}
+ <div className="mt-3 mb-2 flex w-full max-w-xl flex-col items-start rounded-md bg-white/5 px-2 py-2">
+ <div className="mb-1 text-sm text-gray-400">
+ {t('section.password.validate-base')}
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLength ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div
className={`${
passwordErrorLength ? 'text-gray-400' : 'text-gray-600'
} text-sm`}
>
- {t('section-password:validate-length')}
+ {t('section.password.validate-length')}
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorLowerCase ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div
className={`${
passwordErrorLowerCase ? 'text-gray-400' : 'text-gray-600'
} text-sm`}
>
- {t('section-password:validate-case')}
+ {t('section.password.validate-case')}
</div>
</div>
- <div className="flex flex-row justify-start items-center ml-1">
+ <div className="ml-1 flex flex-row items-center justify-start">
{passwordErrorNumber ? (
- <FontAwesomeIcon icon={faX} className="text-md text-red mr-2.5" />
+ <FontAwesomeIcon icon={faX} className="text-md mr-2.5 text-red" />
) : (
- <FontAwesomeIcon icon={faCheck} className="text-md text-primary mr-2" />
+ <FontAwesomeIcon icon={faCheck} className="text-md mr-2 text-primary" />
)}
<div
className={`${
passwordErrorNumber ? 'text-gray-400' : 'text-gray-600'
} text-sm`}
>
- {t('section-password:validate-number')}
+ {t('section.password.validate-number')}
</div>
</div>
</div>
) : (
<div className="py-2" />
)}
- <div className="flex flex-row items-center mt-3 w-52 pr-3">
+ <div className="mt-3 flex w-52 flex-row items-center pr-3">
<Button
- text={t('section-password:change') as string}
+ text={t('section.password.change') as string}
onButtonPressed={() => {
if (!passwordErrorLength && !passwordErrorLowerCase && !passwordErrorNumber) {
changePassword(
@@ -244,47 +244,47 @@ export default function PersonalSettings() {
currentPassword !== '' &&
!(passwordErrorLength || passwordErrorLowerCase || passwordErrorNumber)
}
- textDisabled={t('section-password:change') as string}
+ textDisabled={t('section.password.change') as string}
/>
<FontAwesomeIcon
icon={faCheck}
- className={`ml-4 text-primary text-3xl ${
+ className={`ml-4 text-3xl text-primary ${
passwordChanged ? 'opacity-100' : 'opacity-0'
} duration-300`}
/>
</div>
</div>
- <div className="bg-white/5 rounded-md px-6 pt-5 pb-6 mt-2 flex flex-col items-start w-full mb-6">
- <div className="flex flex-row max-w-5xl justify-between items-center w-full">
- <div className="flex flex-col justify-between w-full max-w-3xl">
- <p className="text-xl font-semibold mb-3 min-w-max">
- {t('settings-personal:emergency.name')}
+ <div className="mt-2 mb-6 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-5 pb-6">
+ <div className="flex w-full max-w-5xl flex-row items-center justify-between">
+ <div className="flex w-full max-w-3xl flex-col justify-between">
+ <p className="mb-3 min-w-max text-xl font-semibold">
+ {t('settings.personal.emergency.name')}
</p>
- <p className="text-sm text-mineshaft-300 min-w-max">
- {t('settings-personal:emergency.text1')}
+ <p className="min-w-max text-sm text-mineshaft-300">
+ {t('settings.personal.emergency.text1')}
</p>
- <p className="text-sm text-mineshaft-300 mb-5 min-w-max">
- {t('settings-personal:emergency.text2')}
+ <p className="mb-5 min-w-max text-sm text-mineshaft-300">
+ {t('settings.personal.emergency.text2')}
</p>
</div>
</div>
- <div className="w-full max-w-xl mb-4">
+ <div className="mb-4 w-full max-w-xl">
<InputField
- label={t('section-password:current') as string}
+ label={t('section.password.current') as string}
onChangeHandler={setBackupPassword}
type="password"
value={backupPassword}
isRequired
error={backupKeyError}
- errorText={t('section-password:current-wrong') as string}
+ errorText={t('section.password.current-wrong') as string}
autoComplete="current-password"
id="current-password"
/>
</div>
- <div className="flex flex-row items-center mt-3 w-60">
+ <div className="mt-3 flex w-60 flex-row items-center">
<Button
- text={t('settings-personal:emergency.download') as string}
+ text={t('settings.personal.emergency.download') as string}
onButtonPressed={() => {
issueBackupKey({
email: personalEmail,
@@ -297,11 +297,11 @@ export default function PersonalSettings() {
color="mineshaft"
size="md"
active={backupPassword !== ''}
- textDisabled={t('settings-personal:emergency.download') as string}
+ textDisabled={t('settings.personal.emergency.download') as string}
/>
<FontAwesomeIcon
icon={faCheck}
- className={`ml-4 text-primary text-3xl ${
+ className={`ml-4 text-3xl text-primary ${
backupKeyIssued ? 'opacity-100' : 'opacity-0'
} duration-300`}
/>
@@ -315,10 +315,3 @@ export default function PersonalSettings() {
}
PersonalSettings.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps([
- 'settings',
- 'settings-personal',
- 'section-password',
- 'section-api-key'
-]);
diff --git a/frontend/src/pages/settings/project/[id].tsx b/frontend/src/pages/settings/project/[id].tsx
index 0d08eca45a..7f6583d2aa 100644
--- a/frontend/src/pages/settings/project/[id].tsx
+++ b/frontend/src/pages/settings/project/[id].tsx
@@ -1,7 +1,6 @@
import { useTranslation } from 'react-i18next';
import Head from 'next/head';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { ProjectSettingsPage } from '@app/views/Settings/ProjectSettingsPage';
const ProjectSettings = () => {
@@ -10,10 +9,9 @@ const ProjectSettings = () => {
return (
<>
<Head>
- <title>{t('common:head-title', { title: t('settings-project:title') })}</title>
+ <title>{t('common.head-title', { title: t('settings.project.title') })}</title>
<link rel="icon" href="/infisical.ico" />
</Head>
-
<ProjectSettingsPage />
</>
);
@@ -22,9 +20,3 @@ const ProjectSettings = () => {
export default ProjectSettings;
ProjectSettings.requireAuth = true;
-
-export const getServerSideProps = getTranslatedStaticProps([
- 'settings',
- 'settings-project',
- 'section-token'
-]);
diff --git a/frontend/src/pages/signup.tsx b/frontend/src/pages/signup.tsx
index 1f1099c7b8..572ac11aa7 100644
--- a/frontend/src/pages/signup.tsx
+++ b/frontend/src/pages/signup.tsx
@@ -1,10 +1,10 @@
/* eslint-disable no-nested-ternary */
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
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 CodeInputStep from '@app/components/signup/CodeInputStep';
import DownloadBackupPDF from '@app/components/signup/DonwloadBackupPDFStep';
@@ -12,7 +12,6 @@ import EnterEmailStep from '@app/components/signup/EnterEmailStep';
import TeamInviteStep from '@app/components/signup/TeamInviteStep';
import UserInfoStep from '@app/components/signup/UserInfoStep';
import SecurityClient from '@app/components/utilities/SecurityClient';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { useFetchServerStatus } from '@app/hooks/api/serverDetails';
import checkEmailVerificationCode from './api/auth/CheckEmailVerificationCode';
@@ -30,8 +29,7 @@ export default function SignUp() {
const [codeError, setCodeError] = useState(false);
const [step, setStep] = useState(1);
const router = useRouter();
- const {data: serverDetails } = useFetchServerStatus()
-
+ const { data: serverDetails } = useFetchServerStatus();
const { t } = useTranslation();
@@ -62,7 +60,7 @@ export default function SignUp() {
// Checking if the code matches the email.
const response = await checkEmailVerificationCode({ email, code });
if (response.status === 200) {
- const {token} = await response.json();
+ const { token } = await response.json();
SecurityClient.setSignupToken(token);
setStep(3);
} else {
@@ -73,29 +71,29 @@ export default function SignUp() {
// when email service is not configured, skip step 2 and 5
useEffect(() => {
- if (!serverDetails?.emailConfigured && step === 2){
- incrementStep()
+ if (!serverDetails?.emailConfigured && step === 2) {
+ incrementStep();
}
- if (!serverDetails?.emailConfigured && step === 5){
- getWorkspaces().then((userWorkspaces)=>{
+ if (!serverDetails?.emailConfigured && step === 5) {
+ getWorkspaces().then((userWorkspaces) => {
router.push(`/dashboard/${userWorkspaces[0]._id}`);
});
}
}, [step]);
return (
- <div className="bg-bunker-800 h-screen flex flex-col items-center justify-center">
+ <div className="flex h-screen flex-col items-center justify-center bg-bunker-800">
<Head>
- <title>{t('common:head-title', { title: t('signup:title') })}</title>
+ <title>{t('common.head-title', { title: t('signup.title') })}</title>
<link rel="icon" href="/infisical.ico" />
<meta property="og:image" content="/images/message.png" />
- <meta property="og:title" content={t('signup:og-title') as string} />
- <meta name="og:description" content={t('signup:og-description') as string} />
+ <meta property="og:title" content={t('signup.og-title') as string} />
+ <meta name="og:description" content={t('signup.og-description') as string} />
</Head>
- <div className="flex flex-col justify-center items-center">
+ <div className="flex flex-col items-center justify-center">
<Link href="/">
- <div className="flex justify-center mb-2 md:mb-8 cursor-pointer">
+ <div className="mb-2 flex cursor-pointer justify-center md:mb-8">
<Image src="/images/biglogo.png" height={90} width={120} alt="Infisical Wide Logo" />
</div>
</Link>
@@ -127,11 +125,13 @@ export default function SignUp() {
password={password}
name={`${firstName} ${lastName}`}
/>
- ) : (serverDetails?.emailConfigured ? <TeamInviteStep /> : "")}
+ ) : serverDetails?.emailConfigured ? (
+ <TeamInviteStep />
+ ) : (
+ ''
+ )}
</form>
</div>
</div>
);
}
-
-export const getStaticProps = getTranslatedStaticProps(['auth', 'signup', 'section-password']);
diff --git a/frontend/src/pages/users/[id].tsx b/frontend/src/pages/users/[id].tsx
index 27b531444a..3153f9935b 100644
--- a/frontend/src/pages/users/[id].tsx
+++ b/frontend/src/pages/users/[id].tsx
@@ -1,8 +1,8 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import Head from 'next/head';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import { useTranslation } from 'next-i18next';
import { faMagnifyingGlass, faPlus } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -11,7 +11,6 @@ import AddProjectMemberDialog from '@app/components/basic/dialog/AddProjectMembe
import ProjectUsersTable from '@app/components/basic/table/ProjectUsersTable';
import NavHeader from '@app/components/navigation/NavHeader';
import guidGenerator from '@app/components/utilities/randomId';
-import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
import {
decryptAssymmetric,
@@ -146,15 +145,15 @@ export default function Users() {
};
return userList ? (
- <div className="bg-bunker-800 md:h-screen flex flex-col justify-start max-w-[calc(100vw-240px)]">
+ <div className="flex max-w-[calc(100vw-240px)] flex-col justify-start bg-bunker-800 md:h-screen">
<Head>
- <title>{t('common:head-title', { title: t('settings-members:title') })}</title>
+ <title>{t('common.head-title', { title: t('settings.members.title') })}</title>
<link rel="icon" href="/infisical.ico" />
</Head>
- <NavHeader pageName={t('settings-members:title')} isProjectRelated />
- <div className="flex flex-col justify-start items-start px-6 py-6 pb-4 text-3xl">
- <p className="font-semibold mr-4 text-white">{t('settings-members:title')}</p>
- <p className="mr-4 text-base text-gray-400">{t('settings-members:description')}</p>
+ <NavHeader pageName={t('settings.members.title')} isProjectRelated />
+ <div className="flex flex-col items-start justify-start px-6 py-6 pb-4 text-3xl">
+ <p className="mr-4 font-semibold text-white">{t('settings.members.title')}</p>
+ <p className="mr-4 text-base text-gray-400">{t('settings.members.description')}</p>
</div>
<AddProjectMemberDialog
isOpen={isAddOpen}
@@ -170,22 +169,22 @@ export default function Users() {
setEmail={setEmail}
/>
{/* <DeleteUserDialog isOpen={isDeleteOpen} closeModal={closeDeleteModal} submitModal={deleteMembership} userIdToBeDeleted={userIdToBeDeleted}/> */}
- <div className="px-6 pb-1 w-full flex flex-row items-start">
- <div className="h-10 w-full bg-white/5 mt-2 rounded-md flex flex-row items-center">
+ <div className="flex w-full flex-row items-start px-6 pb-1">
+ <div className="mt-2 flex h-10 w-full flex-row items-center rounded-md bg-white/5">
<FontAwesomeIcon
- className="bg-white/5 rounded-l-md py-3 pl-4 pr-2 text-gray-400"
+ className="rounded-l-md bg-white/5 py-3 pl-4 pr-2 text-gray-400"
icon={faMagnifyingGlass}
/>
<input
- className="pl-2 text-gray-400 rounded-r-md bg-white/5 w-full h-full outline-none"
+ className="h-full w-full rounded-r-md bg-white/5 pl-2 text-gray-400 outline-none"
value={searchUsers}
onChange={(e) => setSearchUsers(e.target.value)}
- placeholder={String(t('section-members:search-members'))}
+ placeholder={String(t('section.members.search-members'))}
/>
</div>
- <div className="mt-2 ml-2 min-w-max flex flex-row items-start justify-start">
+ <div className="mt-2 ml-2 flex min-w-max flex-row items-start justify-start">
<Button
- text={String(t('section-members:add-member'))}
+ text={String(t('section.members.add-member'))}
onButtonPressed={openAddModal}
color="mineshaft"
size="md"
@@ -193,7 +192,7 @@ export default function Users() {
/>
</div>
</div>
- <div className="block overflow-x-scroll px-6 pb-6 no-scrollbar no-scrollbar::-webkit-scrollbar">
+ <div className="no-scrollbar::-webkit-scrollbar block overflow-x-scroll px-6 pb-6 no-scrollbar">
<ProjectUsersTable
userData={userList}
changeData={setUserList}
@@ -206,16 +205,10 @@ export default function Users() {
</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="relative z-10 mr-auto ml-2 flex h-full w-10/12 flex-col items-center justify-center bg-bunker-800">
<Image src="/images/loading/loading.gif" height={70} width={120} alt="loading animation" />
</div>
);
}
Users.requireAuth = true;
-
-export const getServerSideProps = getTranslatedServerSideProps([
- 'settings',
- 'settings-members',
- 'section-members'
-]);
diff --git a/frontend/src/pages/verify-email.tsx b/frontend/src/pages/verify-email.tsx
index 203b040bf0..1d6d64e9fc 100644
--- a/frontend/src/pages/verify-email.tsx
+++ b/frontend/src/pages/verify-email.tsx
@@ -5,7 +5,6 @@ import Link from 'next/link';
import Button from '@app/components/basic/buttons/Button';
import InputField from '@app/components/basic/InputField';
-import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
import { EmailServiceSetupModal } from '@app/components/v2';
import { usePopUp } from '@app/hooks';
import { useFetchServerStatus } from '@app/hooks/api/serverDetails';
@@ -15,10 +14,8 @@ import SendEmailOnPasswordReset from './api/auth/SendEmailOnPasswordReset';
export default function VerifyEmail() {
const [email, setEmail] = useState('');
const [step, setStep] = useState(1);
- const {data: serverDetails } = useFetchServerStatus()
- const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp([
- 'setUpEmail'
- ] as const);
+ const { data: serverDetails } = useFetchServerStatus();
+ const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp(['setUpEmail'] as const);
/**
* This function sends the verification email and forwards a user to the next step.
@@ -31,7 +28,7 @@ export default function VerifyEmail() {
};
return (
- <div className="bg-bunker-800 h-screen flex flex-col justify-start px-6">
+ <div className="flex h-screen flex-col justify-start bg-bunker-800 px-6">
<Head>
<title>Login</title>
<link rel="icon" href="/infisical.ico" />
@@ -43,21 +40,21 @@ export default function VerifyEmail() {
/>
</Head>
<Link href="/">
- <div className="flex justify-center mb-8 mt-20 cursor-pointer">
+ <div className="mb-8 mt-20 flex cursor-pointer justify-center">
<Image src="/images/biglogo.png" height={90} width={120} alt="long logo" />
</div>
</Link>
{step === 1 && (
- <div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-4 pt-8 px-6 rounded-xl drop-shadow-xl">
- <p className="text-2xl md:text-3xl w-max mx-auto flex justify-center font-semibold text-bunker-100 mb-6">
+ <div className="h-7/12 mx-auto w-full max-w-md rounded-xl bg-bunker py-4 px-6 pt-8 drop-shadow-xl">
+ <p className="mx-auto mb-6 flex w-max justify-center text-2xl font-semibold text-bunker-100 md:text-3xl">
Forgot your password?
</p>
- <div className="flex flex-row items-center justify-center md:pb-4 mt-4 md:mx-2">
- <p className="text-sm flex justify-center text-gray-400 w-max">
+ <div className="mt-4 flex flex-row items-center justify-center md:mx-2 md:pb-4">
+ <p className="flex w-max justify-center text-sm text-gray-400">
You will need your emergency kit. Enter your email to start account recovery.
</p>
</div>
- <div className="flex items-center justify-center w-full md:p-2 rounded-lg mt-4 md:mt-0 max-h-24 md:max-h-28">
+ <div className="mt-4 flex max-h-24 w-full items-center justify-center rounded-lg md:mt-0 md:max-h-28 md:p-2">
<InputField
label="Email"
onChangeHandler={setEmail}
@@ -68,26 +65,30 @@ export default function VerifyEmail() {
autoComplete="username"
/>
</div>
- <div className="flex flex-col items-center justify-center w-full md:p-2 max-h-20 max-w-md mt-4 mx-auto text-sm">
- <div className="text-l mt-6 m-8 px-8 py-3 text-lg">
- <Button text="Continue" onButtonPressed={()=>{
- if (serverDetails?.emailConfigured){
- sendVerificationEmail()
- } else {
- handlePopUpOpen('setUpEmail');
- }
- }} size="lg" />
+ <div className="mx-auto mt-4 flex max-h-20 w-full max-w-md flex-col items-center justify-center text-sm md:p-2">
+ <div className="text-l m-8 mt-6 px-8 py-3 text-lg">
+ <Button
+ text="Continue"
+ onButtonPressed={() => {
+ if (serverDetails?.emailConfigured) {
+ sendVerificationEmail();
+ } else {
+ handlePopUpOpen('setUpEmail');
+ }
+ }}
+ size="lg"
+ />
</div>
</div>
</div>
)}
{step === 2 && (
- <div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-4 pt-8 px-6 rounded-xl drop-shadow-xl">
- <p className="text-xl md:text-2xl w-max mx-auto flex justify-center font-semibold text-bunker-100 mb-6">
+ <div className="h-7/12 mx-auto w-full max-w-md rounded-xl bg-bunker py-4 px-6 pt-8 drop-shadow-xl">
+ <p className="mx-auto mb-6 flex w-max justify-center text-xl font-semibold text-bunker-100 md:text-2xl">
Look for an email in your inbox.
</p>
- <div className="flex flex-row items-center justify-center md:pb-4 mt-4 md:mx-2">
- <p className="text-sm flex justify-center text-gray-400 w-max text-center">
+ <div className="mt-4 flex flex-row items-center justify-center md:mx-2 md:pb-4">
+ <p className="flex w-max justify-center text-center text-sm text-gray-400">
An email with instructions has been sent to {email}.
</p>
</div>
@@ -101,5 +102,3 @@ export default function VerifyEmail() {
</div>
);
}
-
-export const getServerSideProps = getTranslatedStaticProps([]);
diff --git a/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx b/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
index 0483c462d4..cf09edb71c 100644
--- a/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
+++ b/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
@@ -95,8 +95,8 @@ export const DashboardEnvOverview = ({ onEnvChange }: { onEnvChange: any }) => {
<FormProvider {...method}>
<form autoComplete="off">
{/* breadcrumb row */}
- <div className="relative right-6">
- <NavHeader pageName={t('dashboard:title')} isProjectRelated />
+ <div className="relative right-5">
+ <NavHeader pageName={t('dashboard.title')} isProjectRelated />
</div>
<div className="mt-6">
<p className="text-3xl font-semibold text-bunker-100">Secrets Overview</p>
@@ -161,7 +161,7 @@ export const DashboardEnvOverview = ({ onEnvChange }: { onEnvChange: any }) => {
<div
className={`${
isDashboardSecretEmpty ? '' : ''
- } no-scrollbar::-webkit-scrollbar mt-3 border rounded-md border-mineshaft-600 flex h-full max-h-[calc(100vh-370px)] w-full min-w-[60.3rem] flex-grow flex-row items-start justify-center overflow-x-hidden no-scrollbar`}
+ } no-scrollbar::-webkit-scrollbar mt-3 flex h-full max-h-[calc(100vh-370px)] w-full min-w-[60.3rem] flex-grow flex-row items-start justify-center overflow-x-hidden rounded-md border border-mineshaft-600 no-scrollbar`}
>
{!isDashboardSecretEmpty && (
<TableContainer className="border-none">
@@ -190,7 +190,7 @@ export const DashboardEnvOverview = ({ onEnvChange }: { onEnvChange: any }) => {
</div>
)}
{/* In future, we should add an option to add environments here
- <div className="ml-10 h-full flex items-start justify-center">
+ <div className="flex items-start justify-center h-full ml-10">
<Button
leftIcon={<FontAwesomeIcon icon={faPlus}/>}
onClick={() => prepend(DEFAULT_SECRET_VALUE, { shouldFocus: false })}
diff --git a/frontend/src/views/DashboardPage/DashboardPage.tsx b/frontend/src/views/DashboardPage/DashboardPage.tsx
index ea4d895e85..f5c64636a1 100644
--- a/frontend/src/views/DashboardPage/DashboardPage.tsx
+++ b/frontend/src/views/DashboardPage/DashboardPage.tsx
@@ -419,7 +419,7 @@ export const DashboardPage = ({ envFromTop }: { envFromTop: string }) => {
{/* breadcrumb row */}
<div className="relative right-6 mb-6 -top-2">
<NavHeader
- pageName={t('dashboard:title')}
+ pageName={t('dashboard.title')}
currentEnv={
userAvailableEnvs?.filter((envir) => envir.slug === envFromTop)[0].name || ''
}
diff --git a/frontend/src/views/DashboardPage/components/SecretDetailDrawer/GenRandomNumber.tsx b/frontend/src/views/DashboardPage/components/SecretDetailDrawer/GenRandomNumber.tsx
index d64a6ad36a..949c003093 100644
--- a/frontend/src/views/DashboardPage/components/SecretDetailDrawer/GenRandomNumber.tsx
+++ b/frontend/src/views/DashboardPage/components/SecretDetailDrawer/GenRandomNumber.tsx
@@ -1,7 +1,7 @@
import crypto from 'crypto';
import { useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faMinus, faPlus, faShuffle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -28,7 +28,7 @@ export const GenRandomNumber = ({ onGenerate }: Props) => {
leftIcon={<FontAwesomeIcon icon={faShuffle} />}
onClick={onGenerateRandomHex}
>
- {t('dashboard:sidebar.generate-random-hex')}
+ {t('dashboard.sidebar.generate-random-hex')}
</Button>
<div className="rounded-r-md bg-mineshaft p-2">
<div className="flex rounded-md border-mineshaft-400 bg-bunker-800 p-1 px-2">
diff --git a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx
index b34e9455fa..8ee413841e 100644
--- a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx
+++ b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx
@@ -1,5 +1,5 @@
import { ChangeEvent, DragEvent } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { faUpload } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { twMerge } from 'tailwind-merge';
@@ -78,55 +78,53 @@ export const SecretDropzone = ({ isSmaller, onParsedEnv, onAddNewSecret }: Props
};
return (
- <div className="mx-1">
- <div
- onDragEnter={handleDrag}
- onDragLeave={handleDrag}
- onDragOver={handleDrag}
- onDrop={handleDrop}
- className={twMerge(
- 'relative mb-4 mt-4 max-w-[calc(100vw-292px)] flex w-full cursor-pointer text-mineshaft-200 items-center py-8 justify-center space-x-2 rounded-md bg-mineshaft-900 px-2 opacity-60 outline-dashed outline-2 outline-chicago-600 duration-200 hover:opacity-100',
- isDragActive && 'opacity-100',
- !isSmaller && 'flex-col space-y-4 max-w-3xl py-20',
- isLoading && 'bg-bunker-800'
- )}
- >
- {isLoading ? (
- <div className="mb-16 flex items-center justify-center pt-16">
- <img src="/images/loading/loading.gif" height={70} width={120} alt="loading animation" />
+ <div
+ onDragEnter={handleDrag}
+ onDragLeave={handleDrag}
+ onDragOver={handleDrag}
+ onDrop={handleDrop}
+ className={twMerge(
+ 'relative mx-0.5 mb-4 mt-4 flex w-full max-w-[calc(100vw-292px)] cursor-pointer items-center justify-center space-x-2 rounded-md bg-mineshaft-900 py-8 px-2 text-mineshaft-200 opacity-60 outline-dashed outline-2 outline-chicago-600 duration-200 hover:opacity-100',
+ isDragActive && 'opacity-100',
+ !isSmaller && 'max-w-3xl flex-col space-y-4 py-20',
+ isLoading && 'bg-bunker-800'
+ )}
+ >
+ {isLoading ? (
+ <div className="mb-16 flex items-center justify-center pt-16">
+ <img src="/images/loading/loading.gif" height={70} width={120} alt="loading animation" />
+ </div>
+ ) : (
+ <>
+ <div>
+ <FontAwesomeIcon icon={faUpload} size={isSmaller ? '2x' : '5x'} />
</div>
- ) : (
- <>
- <div>
- <FontAwesomeIcon icon={faUpload} size={isSmaller ? '2x' : '5x'} />
- </div>
- <div>
- <p className="">{t(isSmaller ? 'common:drop-zone-keys' : 'common:drop-zone')}</p>
- </div>
- <input
- id="fileSelect"
- type="file"
- className="absolute h-full w-full cursor-pointer opacity-0"
- accept=".txt,.env,.yml,.yaml"
- onChange={handleFileUpload}
- />
- {!isSmaller && (
- <>
- <div className="flex w-full flex-row items-center justify-center py-4">
- <div className="w-1/5 border-t border-mineshaft-700" />
- <p className="mx-4 text-xs text-mineshaft-400">OR</p>
- <div className="w-1/5 border-t border-mineshaft-700" />
- </div>
- <div>
- <Button variant="star" onClick={onAddNewSecret}>
- Add a new secret
- </Button>
- </div>
- </>
- )}{' '}
- </>
- )}
- </div>
+ <div>
+ <p className="">{t(isSmaller ? 'common.drop-zone-keys' : 'common.drop-zone')}</p>
+ </div>
+ <input
+ id="fileSelect"
+ type="file"
+ className="absolute h-full w-full cursor-pointer opacity-0"
+ accept=".txt,.env,.yml,.yaml"
+ onChange={handleFileUpload}
+ />
+ {!isSmaller && (
+ <>
+ <div className="flex w-full flex-row items-center justify-center py-4">
+ <div className="w-1/5 border-t border-mineshaft-700" />
+ <p className="mx-4 text-xs text-mineshaft-400">OR</p>
+ <div className="w-1/5 border-t border-mineshaft-700" />
+ </div>
+ <div>
+ <Button variant="star" onClick={onAddNewSecret}>
+ Add a new secret
+ </Button>
+ </div>
+ </>
+ )}{' '}
+ </>
+ )}
</div>
);
};
diff --git a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx
index 33b94eafe8..2692df6c2a 100644
--- a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx
+++ b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { useState } from 'react';
-import { useTranslation } from 'next-i18next';
+import { useTranslation } from 'react-i18next';
import { plans } from 'public/data/frequentConstants';
import { useNotificationContext } from '@app/components/context/Notifications/NotificationProvider';
@@ -21,12 +21,12 @@ import {
useGetUserWsKey,
useRenameOrg,
useUpdateOrgUserRole,
- useUploadWsKey,
+ useUploadWsKey
} from '@app/hooks/api';
-import {
- OrgIncidentContactsTable,
- OrgMembersTable,
+import {
+ OrgIncidentContactsTable,
+ OrgMembersTable,
OrgNameChangeSection,
OrgServiceAccountsTable
} from './components';
@@ -44,9 +44,11 @@ export const OrgSettingsPage = () => {
const orgId = currentOrg?._id || '';
const { data: orgUsers, isLoading: isOrgUserLoading } = useGetOrgUsers(orgId);
- const { data: workspaceMemberships, isLoading: IsWsMembershipLoading } = useGetUserWorkspaceMemberships(orgId);
+ const { data: workspaceMemberships, isLoading: IsWsMembershipLoading } =
+ useGetUserWorkspaceMemberships(orgId);
const { data: wsKey } = useGetUserWsKey(currentWorkspace?._id || '');
- const { data: incidentContact, isLoading: IsIncidentContactLoading } = useGetOrgIncidentContact(orgId);
+ const { data: incidentContact, isLoading: IsIncidentContactLoading } =
+ useGetOrgIncidentContact(orgId);
const renameOrg = useRenameOrg();
const removeUserOrgMembership = useDeleteOrgMembership();
@@ -239,18 +241,16 @@ export const OrgSettingsPage = () => {
//
return (
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <NavHeader pageName={t('settings-org:title')} />
- <div className="my-8 max-w-5xl ml-8">
- <p className="text-3xl font-semibold text-gray-200">{t('settings-org:title')}</p>
- <p className="text-base font-normal text-gray-400">
- {t('settings-org:description')}
- </p>
+ <NavHeader pageName={t('settings.org.title')} />
+ <div className="my-8 ml-8 max-w-5xl">
+ <p className="text-3xl font-semibold text-gray-200">{t('settings.org.title')}</p>
+ <p className="text-base font-normal text-gray-400">{t('settings.org.description')}</p>
</div>
<div className="max-w-8xl ml-6 mr-6 flex flex-col text-mineshaft-50">
<OrgNameChangeSection orgName={currentOrg?.name} onOrgNameChange={onRenameOrg} />
- <div className="w-full rounded-md bg-white/5 p-6 mb-6">
+ <div className="mb-6 w-full rounded-md bg-white/5 p-6">
<p className="mr-4 mb-4 text-xl font-semibold text-white">
- {t('section-members:org-members')}
+ {t('section.members.org-members')}
</p>
<OrgMembersTable
isLoading={isOrgUserLoading || IsWsMembershipLoading}
@@ -268,19 +268,17 @@ export const OrgSettingsPage = () => {
/>
</div>
<div className="mb-6 mt-2 w-full rounded-md bg-white/5 p-6">
- <p className="mr-4 mb-4 text-xl font-semibold text-white">
- Service Accounts
- </p>
+ <p className="mr-4 mb-4 text-xl font-semibold text-white">Service Accounts</p>
<OrgServiceAccountsTable />
</div>
<div className="mb-6 mt-2 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-6 pb-6">
<div className="flex w-full max-w-5xl flex-row items-center justify-between">
<div className="flex w-full max-w-3xl flex-col justify-between">
<p className="mb-3 min-w-max text-xl font-semibold">
- {t('section-incident:incident-contacts')}
+ {t('section.incident.incident-contacts')}
</p>
<p className="mb-2 min-w-max text-xs text-gray-500">
- {t('section-incident:incident-contacts-description')}
+ {t('section.incident.incident-contacts-description')}
</p>
</div>
</div>
diff --git a/frontend/src/views/Settings/OrgSettingsPage/components/OrgNameChangeSection/OrgNameChangeSection.tsx b/frontend/src/views/Settings/OrgSettingsPage/components/OrgNameChangeSection/OrgNameChangeSection.tsx
index 9b18285c0a..02c6ec7783 100644
--- a/frontend/src/views/Settings/OrgSettingsPage/components/OrgNameChangeSection/OrgNameChangeSection.tsx
+++ b/frontend/src/views/Settings/OrgSettingsPage/components/OrgNameChangeSection/OrgNameChangeSection.tsx
@@ -39,7 +39,7 @@ export const OrgNameChangeSection = ({ onOrgNameChange, orgName }: Props): JSX.E
return (
<form onSubmit={handleSubmit(onFormSubmit)}>
<div className="mb-6 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pb-6 pt-3">
- <p className="mb-4 mt-2 text-xl font-semibold">{t('common:display-name')}</p>
+ <p className="mb-4 mt-2 text-xl font-semibold">{t('common.display-name')}</p>
<div className="mb-2 w-full max-w-lg">
<Controller
defaultValue=""
@@ -60,7 +60,7 @@ export const OrgNameChangeSection = ({ onOrgNameChange, orgName }: Props): JSX.E
isDisabled={!isDirty || isSubmitting}
leftIcon={<FontAwesomeIcon icon={faCheck} />}
>
- {t('common:save-changes')}
+ {t('common.save-changes')}
</Button>
</div>
</form>
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
index 3ba5bc956e..6971a0f48a 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
@@ -10,7 +10,8 @@ import NavHeader from '@app/components/navigation/NavHeader';
import {
decryptAssymmetric,
decryptSymmetric,
- encryptSymmetric} from '@app/components/utilities/cryptography/crypto';
+ encryptSymmetric
+} from '@app/components/utilities/cryptography/crypto';
import { Button, FormControl, Input } from '@app/components/v2';
import { plans } from '@app/const';
import { useSubscription, useWorkspace } from '@app/context';
@@ -31,7 +32,8 @@ import {
useNameWorkspaceSecrets,
useRenameWorkspace,
useToggleAutoCapitalization,
- useUpdateWsEnvironment} from '@app/hooks/api';
+ useUpdateWsEnvironment
+} from '@app/hooks/api';
import { AutoCapitalizationSection } from './components/AutoCapitalizationSection/AutoCapitalizationSection';
import { SecretTagsSection } from './components/SecretTagsSection';
@@ -67,7 +69,8 @@ export const ProjectSettingsPage = () => {
const updateWsEnv = useUpdateWsEnvironment();
const deleteWsEnv = useDeleteWsEnvironment();
- const { data: isBlindIndexed, isLoading: isBlindIndexedLoading } = useGetWorkspaceIndexStatus(workspaceID);
+ const { data: isBlindIndexed, isLoading: isBlindIndexedLoading } =
+ useGetWorkspaceIndexStatus(workspaceID);
// service token
const { data: serviceTokens, isLoading: isServiceTokenLoading } = useGetUserWsServiceTokens({
@@ -212,7 +215,12 @@ export const ProjectSettingsPage = () => {
}
};
- const onCreateServiceToken = async ({ environment, expiresIn, name, permissions }: CreateServiceToken) => {
+ const onCreateServiceToken = async ({
+ environment,
+ expiresIn,
+ name,
+ permissions
+ }: CreateServiceToken) => {
// type guard
if (!latestFileKey) return '';
try {
@@ -229,7 +237,7 @@ export const ProjectSettingsPage = () => {
plaintext: key,
key: randomBytes
});
-
+
const res = await createServiceToken.mutateAsync({
encryptedKey: ciphertext,
iv,
@@ -240,10 +248,10 @@ export const ProjectSettingsPage = () => {
workspaceId: workspaceID,
randomBytes,
permissions: Object.entries(permissions)
- .filter(([, permissionsValue]) => permissionsValue)
- .map(([permissionsKey]) => permissionsKey)
+ .filter(([, permissionsValue]) => permissionsValue)
+ .map(([permissionsKey]) => permissionsKey)
});
-
+
createNotification({
text: 'Successfully created a service token',
type: 'success'
@@ -324,7 +332,7 @@ export const ProjectSettingsPage = () => {
publicKey: latestFileKey.sender.publicKey,
privateKey: localStorage.getItem('PRIVATE_KEY') as string
});
-
+
const secretsToUpdate = encryptedSecrets.map((encryptedSecret) => {
const secretName = decryptSymmetric({
ciphertext: encryptedSecret.secretKeyCiphertext,
@@ -332,30 +340,30 @@ export const ProjectSettingsPage = () => {
tag: encryptedSecret.secretKeyTag,
key
});
-
- return ({
+
+ return {
secretName,
_id: encryptedSecret._id
- });
+ };
});
await nameWorkspaceSecrets.mutateAsync({
workspaceId: currentWorkspace._id,
secretsToUpdate
});
- }
+ };
return (
<div className="dark container mx-auto flex flex-col px-8 text-mineshaft-50 dark:[color-scheme:dark]">
{/* TODO(akhilmhdh): Remove this right when layout is refactored */}
<div className="relative right-5">
- <NavHeader pageName={t('settings-project:title')} isProjectRelated />
+ <NavHeader pageName={t('settings.project.title')} isProjectRelated />
</div>
<div className="my-8 flex max-w-5xl flex-row items-center justify-between text-xl">
<div className="flex flex-col items-start justify-start text-3xl">
- <p className="mr-4 font-semibold text-gray-200">{t('settings-project:title')}</p>
+ <p className="mr-4 font-semibold text-gray-200">{t('settings.project.title')}</p>
<p className="mr-4 text-base font-normal text-gray-400">
- {t('settings-project:description')}
+ {t('settings.project.description')}
</p>
</div>
</div>
@@ -392,13 +400,11 @@ export const ProjectSettingsPage = () => {
onAutoCapitalizationChange={onAutoCapitalizationToggle}
/>
{!isBlindIndexedLoading && !isBlindIndexed && (
- <ProjectIndexSecretsSection
- onEnableBlindIndices={onEnableBlindIndices}
- />
+ <ProjectIndexSecretsSection onEnableBlindIndices={onEnableBlindIndices} />
)}
<div className="mb-6 mt-4 flex w-full flex-col items-start rounded-md border-l border-red bg-white/5 px-6 pl-6 pb-4 pt-4">
- <p className="text-xl font-bold text-red">{t('settings-project:danger-zone')}</p>
- <p className="text-md mt-2 text-gray-400">{t('settings-project:danger-zone-note')}</p>
+ <p className="text-xl font-bold text-red">{t('settings.project.danger-zone')}</p>
+ <p className="text-md mt-2 text-gray-400">{t('settings.project.danger-zone-note')}</p>
<div className="mr-auto mt-4 max-h-28 w-full max-w-md">
<FormControl
label={
@@ -421,10 +427,10 @@ export const ProjectSettingsPage = () => {
isDisabled={deleteProjectInput !== currentWorkspace?.name || isDeleting}
isLoading={isDeleting}
>
- {t('settings-project:delete-project')}
+ {t('settings.project.delete-project')}
</Button>
<p className="mt-3 ml-0.5 text-xs text-gray-500">
- {t('settings-project:delete-project-note')}
+ {t('settings.project.delete-project-note')}
</p>
</div>
</div>
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/AutoCapitalizationSection/AutoCapitalizationSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/AutoCapitalizationSection/AutoCapitalizationSection.tsx
index a3beb3ded0..9492f46418 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/AutoCapitalizationSection/AutoCapitalizationSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/AutoCapitalizationSection/AutoCapitalizationSection.tsx
@@ -14,7 +14,7 @@ export const AutoCapitalizationSection = ({
const { t } = useTranslation();
return (
<div className="mb-6 mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pb-6 pt-2">
- <p className="mb-4 mt-2 text-xl font-semibold">{t('settings-project:auto-capitalization')}</p>
+ <p className="mb-4 mt-2 text-xl font-semibold">{t('settings.project.auto-capitalization')}</p>
<Checkbox
className="data-[state=checked]:bg-primary"
id="autoCapitalization"
@@ -23,7 +23,7 @@ export const AutoCapitalizationSection = ({
onAutoCapitalizationChange(state as boolean);
}}
>
- {t('settings-project:auto-capitalization-description')}
+ {t('settings.project.auto-capitalization-description')}
</Checkbox>
</div>
);
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/CopyProjectIDSection/CopyProjectIDSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/CopyProjectIDSection/CopyProjectIDSection.tsx
index 62ad08c500..b761158cc4 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/CopyProjectIDSection/CopyProjectIDSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/CopyProjectIDSection/CopyProjectIDSection.tsx
@@ -29,12 +29,12 @@ export const CopyProjectIDSection = ({ workspaceID }: Props): JSX.Element => {
return (
<div className="mb-6 mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pt-4 pb-2">
- <p className="self-start text-xl font-semibold">{t('common:project-id')}</p>
+ <p className="self-start text-xl font-semibold">{t('common.project-id')}</p>
<p className="mt-4 self-start text-base font-normal text-gray-400">
- {t('settings-project:project-id-description')}
+ {t('settings.project.project-id-description')}
</p>
<p className="mt-2 self-start text-base font-normal text-gray-400">
- {t('settings-project:project-id-description2')}
+ {t('settings.project.project-id-description2')}
{/* eslint-disable-next-line react/jsx-no-target-blank */}
<a
href="https://infisical.com/docs/documentation/getting-started/introduction"
@@ -42,12 +42,12 @@ export const CopyProjectIDSection = ({ workspaceID }: Props): JSX.Element => {
rel="noopener"
className="text-primary duration-200 hover:opacity-80"
>
- {t('settings-project:docs')}
+ {t('settings.project.docs')}
</a>
</p>
- <p className="mt-4 text-xs text-bunker-300">{t('settings-project:auto-generated')}</p>
+ <p className="mt-4 text-xs text-bunker-300">{t('settings.project.auto-generated')}</p>
<div className="mt-2 mb-3 mr-2 flex items-center justify-end rounded-md bg-white/[0.07] text-base text-gray-400">
- <p className="mr-2 pl-4 font-bold">{`${t('common:project-id')}:`}</p>
+ <p className="mr-2 pl-4 font-bold">{`${t('common.project-id')}:`}</p>
<p className="mr-4">{workspaceID}</p>
<IconButton
ariaLabel="copy icon"
@@ -57,7 +57,7 @@ export const CopyProjectIDSection = ({ workspaceID }: Props): JSX.Element => {
>
<FontAwesomeIcon icon={isProjectIdCopied ? faCheck : faCopy} />
<span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">
- {t('common:click-to-copy')}
+ {t('common.click-to-copy')}
</span>
</IconButton>
</div>
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx
index 02b488b555..f2f79a31fa 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx
@@ -42,7 +42,7 @@ export const ProjectNameChangeSection = ({
return (
<form onSubmit={handleSubmit(onFormSubmit)}>
<div className="mb-6 flex w-full flex-col items-start rounded-md bg-white/5 px-6 pb-6 pt-3">
- <p className="mb-4 mt-2 text-xl font-semibold">{t('common:display-name')}</p>
+ <p className="mb-4 mt-2 text-xl font-semibold">{t('common.display-name')}</p>
<div className="mb-2 w-full max-w-lg">
<Controller
defaultValue=""
@@ -63,7 +63,7 @@ export const ProjectNameChangeSection = ({
isDisabled={!isDirty || isSubmitting}
leftIcon={<FontAwesomeIcon icon={faCheck} />}
>
- {t('common:save-changes')}
+ {t('common.save-changes')}
</Button>
</div>
</form>
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenSection/ServiceTokenSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenSection/ServiceTokenSection.tsx
index 10c95ee557..71be23d6b9 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenSection/ServiceTokenSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenSection/ServiceTokenSection.tsx
@@ -38,17 +38,21 @@ const apiTokenExpiry = [
{ label: '1 Month', value: 2592000 },
{ label: '6 months', value: 15552000 },
{ label: '12 months', value: 31104000 },
- { label: 'Never', value: null },
+ { label: 'Never', value: null }
];
const createServiceTokenSchema = yup.object({
name: yup.string().required().label('Service Token Name'),
environment: yup.string().required().label('Environment'),
expiresIn: yup.string().optional().label('Service Token Expiration'),
- permissions: yup.object().shape({
- read: yup.boolean().required(),
- write: yup.boolean().required()
- }).defined().required()
+ permissions: yup
+ .object()
+ .shape({
+ read: yup.boolean().required(),
+ write: yup.boolean().required()
+ })
+ .defined()
+ .required()
});
export type CreateServiceToken = yup.InferType<typeof createServiceTokenSchema>;
@@ -93,7 +97,7 @@ export const ServiceTokenSection = ({
'createAPIToken',
'deleteAPITokenConfirmation'
] as const);
-
+
const {
control,
reset,
@@ -119,8 +123,8 @@ export const ServiceTokenSection = ({
<div className="mt-4 mb-4 flex w-full flex-col items-start rounded-md bg-white/5 p-6">
<div className="flex w-full flex-row justify-between">
<div className="flex w-full flex-col">
- <p className="mb-3 text-xl font-semibold">{t('section-token:service-tokens')}</p>
- <p className="text-sm text-gray-400">{t('section-token:service-tokens-description')}</p>
+ <p className="mb-3 text-xl font-semibold">{t('section.token.service-tokens')}</p>
+ <p className="text-sm text-gray-400">{t('section.token.service-tokens-description')}</p>
<p className="mb-4 text-sm text-gray-400">
Please, make sure you are on the
<a
@@ -145,16 +149,16 @@ export const ServiceTokenSection = ({
>
<ModalTrigger asChild>
<Button color="mineshaft" leftIcon={<FontAwesomeIcon icon={faPlus} />}>
- {t('section-token:add-new')}
+ {t('section.token.add-new')}
</Button>
</ModalTrigger>
<ModalContent
title={
- t('section-token:add-dialog.title', {
+ t('section.token.add-dialog.title', {
target: workspaceName
}) as string
}
- subTitle={t('section-token:add-dialog.description') as string}
+ subTitle={t('section.token.add-dialog.description') as string}
>
{!hasServiceToken ? (
<form onSubmit={handleSubmit(onFormSubmit)}>
@@ -164,7 +168,7 @@ export const ServiceTokenSection = ({
defaultValue=""
render={({ field, fieldState: { error } }) => (
<FormControl
- label={t('section-token:add-dialog.name')}
+ label={t('section.token.add-dialog.name')}
isError={Boolean(error)}
errorText={error?.message}
>
@@ -229,15 +233,18 @@ export const ServiceTokenSection = ({
read: true,
write: false
}}
- render={({ field: { onChange, value }, fieldState: { error }}) => {
- const options = [{
- label: 'Read (default)',
- value: 'read'
- }, {
- label: 'Write (optional)',
- value: 'write'
- }];
-
+ render={({ field: { onChange, value }, fieldState: { error } }) => {
+ const options = [
+ {
+ label: 'Read (default)',
+ value: 'read'
+ },
+ {
+ label: 'Write (optional)',
+ value: 'write'
+ }
+ ];
+
return (
<FormControl
label="Permissions"
@@ -246,23 +253,23 @@ export const ServiceTokenSection = ({
>
<>
{options.map(({ label, value: optionValue }) => {
- // TODO: refactor
- return (
- <Checkbox
- id={value[optionValue]}
- key={optionValue}
- className="data-[state=checked]:bg-primary"
- isChecked={value[optionValue]}
- isDisabled={ optionValue === 'read'}
- onCheckedChange={(state) => {
- onChange({
- ...value,
- [optionValue]: state
- });
- }}
- >
- {label}
- </Checkbox>
+ // TODO: refactor
+ return (
+ <Checkbox
+ id={value[optionValue]}
+ key={optionValue}
+ className="data-[state=checked]:bg-primary"
+ isChecked={value[optionValue]}
+ isDisabled={optionValue === 'read'}
+ onCheckedChange={(state) => {
+ onChange({
+ ...value,
+ [optionValue]: state
+ });
+ }}
+ >
+ {label}
+ </Checkbox>
);
})}
</>
@@ -297,7 +304,7 @@ export const ServiceTokenSection = ({
>
<FontAwesomeIcon icon={isTokenCopied ? faCheck : faCopy} />
<span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">
- {t('common:click-to-copy')}
+ {t('common.click-to-copy')}
</span>
</IconButton>
</div>