Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Moor 14cfdeb734 Rename API -> Personal Keys 2024-10-01 22:53:50 -04:00
4 changed files with 13 additions and 6 deletions
+4 -2
View File
@@ -49,6 +49,7 @@ export type ConfigItem = {
path: string;
icon: React.FC<ComponentProps<typeof Icon>>;
component: React.ComponentType;
redirects?: string[];
enabled: boolean;
group: string;
};
@@ -87,8 +88,9 @@ const useSettingsConfig = () => {
icon: EmailIcon,
},
{
name: t("API"),
path: settingsPath("tokens"),
name: t("Personal Keys"),
path: settingsPath("personal-api-keys"),
redirects: [settingsPath("tokens")],
component: ApiKeys,
enabled: can.createApiKey,
group: t("Account"),
+6 -1
View File
@@ -1,5 +1,5 @@
import * as React from "react";
import { RouteComponentProps, Switch } from "react-router-dom";
import { Redirect, RouteComponentProps, Switch } from "react-router-dom";
import DocumentNew from "~/scenes/DocumentNew";
import Error404 from "~/scenes/Error404";
import Route from "~/components/ProfiledRoute";
@@ -22,6 +22,11 @@ export default function SettingsRoutes() {
component={config.component}
/>
))}
{configs.map((config) =>
config.redirects?.map((redirect) => (
<Redirect exact key={redirect} from={redirect} to={config.path} />
))
)}
<Route
exact
path={`${settingsPath("templates")}/${matchDocumentSlug}`}
+2 -2
View File
@@ -43,7 +43,7 @@ function ApiKeys() {
return (
<Scene
title={t("API")}
title={t("Personal Keys")}
icon={<CodeIcon />}
actions={
<>
@@ -60,7 +60,7 @@ function ApiKeys() {
</>
}
>
<Heading>{t("API")}</Heading>
<Heading>{t("Personal Keys")}</Heading>
<Text as="p" type="secondary">
<Trans
defaults="Create personal API keys to authenticate with the API and programatically control
+1 -1
View File
@@ -472,7 +472,7 @@
"Could not import file": "Could not import file",
"Unsubscribed from document": "Unsubscribed from document",
"Account": "Account",
"API": "API",
"Personal Keys": "Personal Keys",
"Details": "Details",
"Security": "Security",
"Features": "Features",