From ffca91e7a67a94d1bb478e350d0c485b194ebd48 Mon Sep 17 00:00:00 2001 From: Michael Yankelev <12774278+FSM1@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:13:26 +0200 Subject: [PATCH] allow for multiple api keys (#2267) * allow for multiple api keys * fix test --- packages/storage-ui/cypress/tests/api-keys-management.cy.ts | 1 - packages/storage-ui/src/Components/Modules/ApiKeys.tsx | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/storage-ui/cypress/tests/api-keys-management.cy.ts b/packages/storage-ui/cypress/tests/api-keys-management.cy.ts index 926c978be..39ed018ff 100644 --- a/packages/storage-ui/cypress/tests/api-keys-management.cy.ts +++ b/packages/storage-ui/cypress/tests/api-keys-management.cy.ts @@ -21,7 +21,6 @@ describe("Main Navigation", () => { // ensure new key modal is closed and api key button is not enabled newKeyModal.secretLabel().should("not.exist") - apiKeysPage.addApiKeyButton().should("not.be.enabled") // ensure key id and status are correct in the table cy.get("@keyId").then((keyId) => { diff --git a/packages/storage-ui/src/Components/Modules/ApiKeys.tsx b/packages/storage-ui/src/Components/Modules/ApiKeys.tsx index 0e8dbc173..df8d72221 100644 --- a/packages/storage-ui/src/Components/Modules/ApiKeys.tsx +++ b/packages/storage-ui/src/Components/Modules/ApiKeys.tsx @@ -16,7 +16,8 @@ import { DeleteSvg, MoreIcon, CopyIcon, - Divider } from "@chainsafe/common-components" + Divider +} from "@chainsafe/common-components" import { CSSTheme } from "../../Themes/types" import { Trans } from "@lingui/macro" import dayjs from "dayjs" @@ -96,7 +97,7 @@ const useStyles = makeStyles(({ constants, breakpoints, animation, zIndex, palet color: constants.createFolder.color, [breakpoints.down("md")]: { bottom: - Number(constants?.mobileButtonHeight) + constants.generalUnit, + Number(constants?.mobileButtonHeight) + constants.generalUnit, borderTopLeftRadius: `${constants.generalUnit * 1.5}px`, borderTopRightRadius: `${constants.generalUnit * 1.5}px`, maxWidth: `${breakpoints.width("md")}px !important` @@ -226,7 +227,6 @@ const ApiKeys = () => { onClick={createStorageAccessKey} variant="outline" size="large" - disabled={keys.filter(k => k.type === "storage").length > 0} >