From 577de24290fd9e2cb09635671af4c370a6a17d97 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 1 Dec 2024 21:32:04 -0500 Subject: [PATCH] API keys --- app/hooks/useSettingsConfig.ts | 6 +++--- app/scenes/Settings/{ApiKeys.tsx => PersonalApiKeys.tsx} | 4 ++-- shared/i18n/locales/en_US/translation.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) rename app/scenes/Settings/{ApiKeys.tsx => PersonalApiKeys.tsx} (97%) diff --git a/app/hooks/useSettingsConfig.ts b/app/hooks/useSettingsConfig.ts index e9bc8b915d..2e8e1aad35 100644 --- a/app/hooks/useSettingsConfig.ts +++ b/app/hooks/useSettingsConfig.ts @@ -28,7 +28,7 @@ import useCurrentTeam from "./useCurrentTeam"; import useCurrentUser from "./useCurrentUser"; import usePolicy from "./usePolicy"; -const ApiKeys = lazy(() => import("~/scenes/Settings/ApiKeys")); +const PersonalApiKeys = lazy(() => import("~/scenes/Settings/PersonalApiKeys")); const Details = lazy(() => import("~/scenes/Settings/Details")); const Export = lazy(() => import("~/scenes/Settings/Export")); const Features = lazy(() => import("~/scenes/Settings/Features")); @@ -88,8 +88,8 @@ const useSettingsConfig = () => { }, { name: t("API"), - path: settingsPath("tokens"), - component: ApiKeys, + path: settingsPath("personal-api-keys"), + component: PersonalApiKeys, enabled: can.createApiKey, group: t("Account"), icon: CodeIcon, diff --git a/app/scenes/Settings/ApiKeys.tsx b/app/scenes/Settings/PersonalApiKeys.tsx similarity index 97% rename from app/scenes/Settings/ApiKeys.tsx rename to app/scenes/Settings/PersonalApiKeys.tsx index 42e3825872..839c68f280 100644 --- a/app/scenes/Settings/ApiKeys.tsx +++ b/app/scenes/Settings/PersonalApiKeys.tsx @@ -18,7 +18,7 @@ import usePolicy from "~/hooks/usePolicy"; import useStores from "~/hooks/useStores"; import ApiKeyListItem from "./components/ApiKeyListItem"; -function ApiKeys() { +function PersonalApiKeys() { const team = useCurrentTeam(); const user = useCurrentUser(); const { t } = useTranslation(); @@ -97,4 +97,4 @@ function ApiKeys() { ); } -export default observer(ApiKeys); +export default observer(PersonalApiKeys); diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 13b4f33d1b..a52a8267aa 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -829,9 +829,6 @@ "Something went wrong": "Something went wrong", "Please try again or contact support if the problem persists": "Please try again or contact support if the problem persists", "No documents found for your search filters.": "No documents found for your search filters.", - "API key copied to clipboard": "API key copied to clipboard", - "Create personal API keys to authenticate with the API and programatically control\n your workspace's data. API keys have the same permissions as your user account.\n For more details see the developer documentation.": "Create personal API keys to authenticate with the API and programatically control\n your workspace's data. API keys have the same permissions as your user account.\n For more details see the developer documentation.", - "Personal keys": "Personal keys", "Last used": "Last used", "No expiry": "No expiry", "Copied": "Copied", @@ -958,6 +955,9 @@ "Email address": "Email address", "Your email address should be updated in your SSO provider.": "Your email address should be updated in your SSO provider.", "The email integration is currently disabled. Please set the associated environment variables and restart the server to enable notifications.": "The email integration is currently disabled. Please set the associated environment variables and restart the server to enable notifications.", + "API key copied to clipboard": "API key copied to clipboard", + "Create personal API keys to authenticate with the API and programatically control\n your workspace's data. API keys have the same permissions as your user account.\n For more details see the developer documentation.": "Create personal API keys to authenticate with the API and programatically control\n your workspace's data. API keys have the same permissions as your user account.\n For more details see the developer documentation.", + "Personal keys": "Personal keys", "Preferences saved": "Preferences saved", "Delete account": "Delete account", "Manage settings that affect your personal experience.": "Manage settings that affect your personal experience.",