From f1be653486a307f4cd8e5cc848abe27bf42958e7 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 28 Jul 2021 11:56:25 -0600 Subject: [PATCH] ui(admin): remove api key components --- .../components/admin/api/ApiKeysContainer.tsx | 21 --- .../components/admin/api/NewApiKeyButton.tsx | 172 ------------------ resources/scripts/routers/AdminRouter.tsx | 6 - 3 files changed, 199 deletions(-) delete mode 100644 resources/scripts/components/admin/api/ApiKeysContainer.tsx delete mode 100644 resources/scripts/components/admin/api/NewApiKeyButton.tsx diff --git a/resources/scripts/components/admin/api/ApiKeysContainer.tsx b/resources/scripts/components/admin/api/ApiKeysContainer.tsx deleted file mode 100644 index 0a8f51ed9..000000000 --- a/resources/scripts/components/admin/api/ApiKeysContainer.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import tw from 'twin.macro'; -import AdminContentBlock from '@/components/admin/AdminContentBlock'; -import NewApiKeyButton from '@/components/admin/api/NewApiKeyButton'; - -export default () => { - return ( - -
-
-

API Keys

-

Control access credentials for managing this Panel via the API.

-
- -
- -
-
-
- ); -}; diff --git a/resources/scripts/components/admin/api/NewApiKeyButton.tsx b/resources/scripts/components/admin/api/NewApiKeyButton.tsx deleted file mode 100644 index a9683b4bb..000000000 --- a/resources/scripts/components/admin/api/NewApiKeyButton.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import React, { useState } from 'react'; -import Button from '@/components/elements/Button'; -import Field from '@/components/elements/Field'; -import Modal from '@/components/elements/Modal'; -import FlashMessageRender from '@/components/FlashMessageRender'; -import useFlash from '@/plugins/useFlash'; -import { Form, Formik, FormikHelpers } from 'formik'; -import tw from 'twin.macro'; -import { object } from 'yup'; - -interface Values { - description: string, -} - -const schema = object().shape({ - -}); - -export default () => { - const [ visible, setVisible ] = useState(false); - const { clearFlashes } = useFlash(); - - const submit = (values: Values, { setSubmitting }: FormikHelpers) => { - clearFlashes('api:create'); - - setSubmitting(true); - - setTimeout(() => { - setVisible(false); - }, 500); - }; - - return ( - <> - - { - ({ isSubmitting, resetForm }) => ( - { - resetForm(); - setVisible(false); - }} - > - -

New API Key

-
- - -
-
-

Permissions

- -
- None - Read - Write -
-
- -
-
-

Allocations

- -
-
- -
- -
- -
- -
- -
-
-
- -
-

Databases

- -
-
- -
- -
- -
- -
- -
-
-
- -
-

Eggs

- -
-
- -
- -
- -
- -
- -
-
-
- -
-

Locations

- -
-
- -
- -
- -
- -
- -
-
-
-
-
- -
- - -
- -
- ) - } -
- - - - ); -}; diff --git a/resources/scripts/routers/AdminRouter.tsx b/resources/scripts/routers/AdminRouter.tsx index 29c4f957a..fc95792e9 100644 --- a/resources/scripts/routers/AdminRouter.tsx +++ b/resources/scripts/routers/AdminRouter.tsx @@ -8,7 +8,6 @@ import { AdminContext } from '@/state/admin'; import { NotFound } from '@/components/elements/ScreenBlock'; import OverviewContainer from '@/components/admin/overview/OverviewContainer'; import SettingsContainer from '@/components/admin/settings/SettingsContainer'; -import ApiKeysContainer from '@/components/admin/api/ApiKeysContainer'; import DatabasesContainer from '@/components/admin/databases/DatabasesContainer'; import NewDatabaseContainer from '@/components/admin/databases/NewDatabaseContainer'; import DatabaseEditContainer from '@/components/admin/databases/DatabaseEditContainer'; @@ -124,10 +123,6 @@ const AdminRouter = ({ location, match }: RouteComponentProps) => { Settings - - - API Keys - Management @@ -208,7 +203,6 @@ const AdminRouter = ({ location, match }: RouteComponentProps) => { -