From ab1b9fb1648a618fa9ae2b91b9b03a283fd55915 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Wed, 13 Mar 2024 17:46:48 +0100
Subject: [PATCH] Feat: Deprecate API keys
---
.../APIKeySection/APIKeySection.tsx | 54 +++++------
.../PersonalAPIKeyTab/PersonalAPIKeyTab.tsx | 10 +-
.../PersonalTabGroup/PersonalTabGroup.tsx | 94 ++++++++++++-------
3 files changed, 87 insertions(+), 71 deletions(-)
diff --git a/frontend/src/views/Settings/PersonalSettingsPage/APIKeySection/APIKeySection.tsx b/frontend/src/views/Settings/PersonalSettingsPage/APIKeySection/APIKeySection.tsx
index eb3c12cc5..a0f033049 100644
--- a/frontend/src/views/Settings/PersonalSettingsPage/APIKeySection/APIKeySection.tsx
+++ b/frontend/src/views/Settings/PersonalSettingsPage/APIKeySection/APIKeySection.tsx
@@ -2,38 +2,36 @@ import { useTranslation } from "react-i18next";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Button } from "@app/components/v2";
+import { Button, Tooltip } from "@app/components/v2";
import { usePopUp } from "@app/hooks/usePopUp";
import { AddAPIKeyModal } from "./AddAPIKeyModal";
import { APIKeyTable } from "./APIKeyTable";
export const APIKeySection = () => {
- const { t } = useTranslation();
- const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp([
- "addAPIKey"
- ] as const);
+ const { t } = useTranslation();
+ const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["addAPIKey"] as const);
- return (
-
-
-
- {t("settings.personal.api-keys.title")}
-
-
}
- onClick={() => handlePopUpOpen("addAPIKey")}
- >
- Add API Key
-
-
-
-
-
- );
-}
\ No newline at end of file
+ return (
+
+
+
+ {t("settings.personal.api-keys.title")}
+
+
+ }
+ onClick={() => handlePopUpOpen("addAPIKey")}
+ >
+ Add API Key
+
+
+
+
+
+
+ );
+};
diff --git a/frontend/src/views/Settings/PersonalSettingsPage/PersonalAPIKeyTab/PersonalAPIKeyTab.tsx b/frontend/src/views/Settings/PersonalSettingsPage/PersonalAPIKeyTab/PersonalAPIKeyTab.tsx
index aba48b23e..ca1fa130e 100644
--- a/frontend/src/views/Settings/PersonalSettingsPage/PersonalAPIKeyTab/PersonalAPIKeyTab.tsx
+++ b/frontend/src/views/Settings/PersonalSettingsPage/PersonalAPIKeyTab/PersonalAPIKeyTab.tsx
@@ -1,11 +1,5 @@
import { APIKeySection } from "../APIKeySection";
-// import { APIKeyV2Section } from "../APIKeyV2Section";
export const PersonalAPIKeyTab = () => {
- return (
- <>
- {/* */}
-
- >
- );
-}
\ No newline at end of file
+ return ;
+};
diff --git a/frontend/src/views/Settings/PersonalSettingsPage/PersonalTabGroup/PersonalTabGroup.tsx b/frontend/src/views/Settings/PersonalSettingsPage/PersonalTabGroup/PersonalTabGroup.tsx
index f2e367b36..183fd68a9 100644
--- a/frontend/src/views/Settings/PersonalSettingsPage/PersonalTabGroup/PersonalTabGroup.tsx
+++ b/frontend/src/views/Settings/PersonalSettingsPage/PersonalTabGroup/PersonalTabGroup.tsx
@@ -1,44 +1,68 @@
-import { Fragment } from "react"
-import { Tab } from "@headlessui/react"
+import { Fragment } from "react";
+import Link from "next/link";
+import { faWarning } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Tab } from "@headlessui/react";
import { PersonalAPIKeyTab } from "../PersonalAPIKeyTab";
import { PersonalAuthTab } from "../PersonalAuthTab";
import { PersonalGeneralTab } from "../PersonalGeneralTab";
const tabs = [
- { name: "General", key: "tab-account-general" },
- { name: "Authentication", key: "tab-account-auth" },
- { name: "API Keys", key: "tab-account-api-keys" }
+ { name: "General", key: "tab-account-general" },
+ { name: "Authentication", key: "tab-account-auth" },
+ { name: "API Keys", key: "tab-account-api-keys" }
];
export const PersonalTabGroup = () => {
- return (
-
-
- {tabs.map((tab) => (
-
- {({ selected }) => (
-
- )}
-
- ))}
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file
+ return (
+
+
+ {tabs.map((tab) => (
+
+ {({ selected }) => (
+
+ )}
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
API Keys are deprecated
+
+ API Keys are deprecated and will be removed in the future.
+
Please use Machine Identity authentication for your applications and
+ services.
+
+
+
+ Learn more about Machine Identities
+
+
+
+
+
+
+
+
+
+
+ );
+};