From 980f066ca83fb9df15e879792fa8c0606afa0477 Mon Sep 17 00:00:00 2001 From: Jake Laderman Date: Mon, 26 Aug 2024 13:21:17 -0400 Subject: [PATCH 1/4] remove portal props --- www/src/components/account/CreateServiceAccount.tsx | 1 - www/src/components/account/Domains.tsx | 1 - www/src/components/account/EditGroup.tsx | 2 -- www/src/components/account/EditRole.tsx | 1 - www/src/components/account/Groups.tsx | 1 - www/src/components/cluster/ClusterAdminsModal.tsx | 1 - www/src/components/cluster/ClusterDependencyModal.tsx | 1 - www/src/components/cluster/ClusterPromoteModal.tsx | 1 - www/src/components/login/LegacyExpiration.tsx | 1 - www/src/components/profile/AccessTokens.tsx | 2 -- www/src/components/profile/KeyBackups.tsx | 2 -- .../shell/terminal/sidebar/installed/LaunchAppModal.tsx | 1 - www/src/components/users/settings/UserSettingsModal.tsx | 1 - www/src/components/utils/Confirm.tsx | 1 - www/src/components/utils/user/DeleteUserModal.tsx | 1 - 15 files changed, 18 deletions(-) diff --git a/www/src/components/account/CreateServiceAccount.tsx b/www/src/components/account/CreateServiceAccount.tsx index 8b7419f3e..b93c6ab57 100644 --- a/www/src/components/account/CreateServiceAccount.tsx +++ b/www/src/components/account/CreateServiceAccount.tsx @@ -218,7 +218,6 @@ export function EditServiceAccount({ user, update }: any) { /> { setEdit(false) diff --git a/www/src/components/account/Domains.tsx b/www/src/components/account/Domains.tsx index dc07208ba..404dbd77c 100644 --- a/www/src/components/account/Domains.tsx +++ b/www/src/components/account/Domains.tsx @@ -143,7 +143,6 @@ function AccessPolicy({ domain: { id, accessPolicy }, edit, setEdit }: any) { return ( setEdit(false)} width="100%" diff --git a/www/src/components/account/EditGroup.tsx b/www/src/components/account/EditGroup.tsx index ed630f791..149ed4ac8 100644 --- a/www/src/components/account/EditGroup.tsx +++ b/www/src/components/account/EditGroup.tsx @@ -74,7 +74,6 @@ export function EditGroupMembers({ group, open, onClose }: any) { return ( setOpen(false)} diff --git a/www/src/components/account/Groups.tsx b/www/src/components/account/Groups.tsx index bbb45062b..5bd6b5179 100644 --- a/www/src/components/account/Groups.tsx +++ b/www/src/components/account/Groups.tsx @@ -123,7 +123,6 @@ export function Group({ group, q }: { group: GroupT; q: any }) { dialogKey === 'viewGroup' && setDialogKey('')} diff --git a/www/src/components/cluster/ClusterAdminsModal.tsx b/www/src/components/cluster/ClusterAdminsModal.tsx index 248763b18..8dbd0f5fc 100644 --- a/www/src/components/cluster/ClusterAdminsModal.tsx +++ b/www/src/components/cluster/ClusterAdminsModal.tsx @@ -175,7 +175,6 @@ export function ClusterAdminsModal({ onClose, serviceAccount }) { return ( setGraph(false)} > @@ -236,7 +235,6 @@ function AccessToken({ token, first, last }: any) { setAudits(false)} > diff --git a/www/src/components/profile/KeyBackups.tsx b/www/src/components/profile/KeyBackups.tsx index d56fbc01b..5f191316c 100644 --- a/www/src/components/profile/KeyBackups.tsx +++ b/www/src/components/profile/KeyBackups.tsx @@ -210,7 +210,6 @@ function LocalSyncButton() { onClose={openState.setOff} header="Sync encryption keys locally" size="large" - portal > diff --git a/www/src/components/account/billing/BillingBankCards.tsx b/www/src/components/account/billing/BillingBankCards.tsx index 86796dc41..66738a17f 100644 --- a/www/src/components/account/billing/BillingBankCards.tsx +++ b/www/src/components/account/billing/BillingBankCards.tsx @@ -160,9 +160,7 @@ function AddPaymentMethodModal({ > { - onClose() - }} + onClose={onClose} /> ) diff --git a/www/src/components/account/billing/BillingFeatureBlockModal.tsx b/www/src/components/account/billing/BillingFeatureBlockModal.tsx index 98d5a9285..8e52982e0 100644 --- a/www/src/components/account/billing/BillingFeatureBlockModal.tsx +++ b/www/src/components/account/billing/BillingFeatureBlockModal.tsx @@ -26,7 +26,6 @@ export default function BillingFeatureBlockModal({ }: BillingFeatureBlockModalProps) { return ( void + onClose?: Nullable<() => void> }>) { const initialFormState = formVariant === PaymentFormVariant.Upgrade diff --git a/www/src/components/account/billing/StripeElements.tsx b/www/src/components/account/billing/StripeElements.tsx index 0daa55c0f..1b5add379 100644 --- a/www/src/components/account/billing/StripeElements.tsx +++ b/www/src/components/account/billing/StripeElements.tsx @@ -24,7 +24,7 @@ export function StripeElements({ appearance, mode: 'setup', currency: 'usd', - } satisfies StripeElementsOptions), + }) satisfies StripeElementsOptions, [appearance] ) diff --git a/www/src/components/account/invite/InviteUser.tsx b/www/src/components/account/invite/InviteUser.tsx index 4688c0c40..0ef55713d 100644 --- a/www/src/components/account/invite/InviteUser.tsx +++ b/www/src/components/account/invite/InviteUser.tsx @@ -205,7 +205,7 @@ function InviteUserUnstyled({ attributes: { email, inviteGroups: groupBindings.map( - (g) => ({ groupId: g.id } as BindingAttributes) + (g) => ({ groupId: g.id }) as BindingAttributes ), admin: isAdmin, serviceAccountId, diff --git a/www/src/components/account/invite/InviteUserModal.tsx b/www/src/components/account/invite/InviteUserModal.tsx index 010a003fa..e8dc53f77 100644 --- a/www/src/components/account/invite/InviteUserModal.tsx +++ b/www/src/components/account/invite/InviteUserModal.tsx @@ -40,7 +40,6 @@ function InviteUserModalUnstyled({ diff --git a/www/src/components/account/utils.ts b/www/src/components/account/utils.ts index 31fc6818c..2cc667e23 100644 --- a/www/src/components/account/utils.ts +++ b/www/src/components/account/utils.ts @@ -16,8 +16,8 @@ export function hasRbac(user: CurrentUser, permission: Permission) { if (user.boundRoles != null) { const boundRoles = user.boundRoles.filter(notNil) - return boundRoles.some(({ permissions }) => - permissions?.includes(permission) + return boundRoles.some( + ({ permissions }) => permissions?.includes(permission) ) } diff --git a/www/src/components/cluster/ClusterAppHealth.tsx b/www/src/components/cluster/ClusterAppHealth.tsx index 8ee6b592e..c8ff92461 100644 --- a/www/src/components/cluster/ClusterAppHealth.tsx +++ b/www/src/components/cluster/ClusterAppHealth.tsx @@ -23,7 +23,7 @@ export default function ClusterAppHealth({ return ( {healthy ? 'Healthy' : 'Unhealthy'} diff --git a/www/src/components/cluster/ClusterDependencyModal.tsx b/www/src/components/cluster/ClusterDependencyModal.tsx index 2017b0e69..9de952f85 100644 --- a/www/src/components/cluster/ClusterDependencyModal.tsx +++ b/www/src/components/cluster/ClusterDependencyModal.tsx @@ -85,11 +85,11 @@ export function ClusterDependencyModal({ } size="large" - overflow="hidden" >
Set up promotions
{error && ( diff --git a/www/src/components/cluster/ClusterPromoteModal.tsx b/www/src/components/cluster/ClusterPromoteModal.tsx index 770006a80..e9c897bed 100644 --- a/www/src/components/cluster/ClusterPromoteModal.tsx +++ b/www/src/components/cluster/ClusterPromoteModal.tsx @@ -128,11 +128,11 @@ function ClusterPromoteModalInternal({ } size="large" - overflow="hidden" >
{finished ? 'Cluster promotion complete' : 'Cluster promotion'} diff --git a/www/src/components/cluster/UpgradeNeededModal.tsx b/www/src/components/cluster/UpgradeNeededModal.tsx index 69869adb8..fa6136c9d 100644 --- a/www/src/components/cluster/UpgradeNeededModal.tsx +++ b/www/src/components/cluster/UpgradeNeededModal.tsx @@ -32,7 +32,6 @@ function UpgradeNeededModal({ return ( ({ }, }) +// @ts-ignore, see https://github.com/pmndrs/react-spring/issues/1515 const OverlayBG = styled(AnimatedDiv)(({ theme }) => ({ position: 'absolute', top: 0, diff --git a/www/src/components/overview/CreateClusterModal.tsx b/www/src/components/overview/CreateClusterModal.tsx index 840ad80ab..97585da54 100644 --- a/www/src/components/overview/CreateClusterModal.tsx +++ b/www/src/components/overview/CreateClusterModal.tsx @@ -366,7 +366,6 @@ function CreateClusterModal({ open, onClose }): ReactElement { return ( Create cluster} open={open} onClose={() => { diff --git a/www/src/components/overview/clusters/ClusterHealth.tsx b/www/src/components/overview/clusters/ClusterHealth.tsx index 28ad9023e..7e2fc6c4f 100644 --- a/www/src/components/overview/clusters/ClusterHealth.tsx +++ b/www/src/components/overview/clusters/ClusterHealth.tsx @@ -32,7 +32,7 @@ export default function ClusterHealth({ return ( diff --git a/www/src/components/profile/AccessTokens.tsx b/www/src/components/profile/AccessTokens.tsx index 9d8915c75..6566cdead 100644 --- a/www/src/components/profile/AccessTokens.tsx +++ b/www/src/components/profile/AccessTokens.tsx @@ -129,6 +129,7 @@ function TokenMetrics({ token }: any) { setGraph(false)} > diff --git a/www/src/components/repository/RepositoryPackages.tsx b/www/src/components/repository/RepositoryPackages.tsx index 2d688df22..4890c55d4 100644 --- a/www/src/components/repository/RepositoryPackages.tsx +++ b/www/src/components/repository/RepositoryPackages.tsx @@ -61,8 +61,8 @@ export default function RepositoryPackages() { const tabStateRef = useRef(null) const pathPrefix = `/repository/${repository.name}/packages` - const currentTab = DIRECTORY.find((tab) => - pathname?.startsWith(`${pathPrefix}${tab.path}`) + const currentTab = DIRECTORY.find( + (tab) => pathname?.startsWith(`${pathPrefix}${tab.path}`) ) return ( diff --git a/www/src/components/shell/OAuthCallback.tsx b/www/src/components/shell/OAuthCallback.tsx index 19450e555..47c4ff27d 100644 --- a/www/src/components/shell/OAuthCallback.tsx +++ b/www/src/components/shell/OAuthCallback.tsx @@ -31,7 +31,7 @@ const toOnboardingContext = ( authUrls: authUrlData?.scmAuthorization as Array, token, }, - } as ContextProps) + }) as ContextProps function OAuthCallback({ provider }: any) { const navigate = useNavigate() diff --git a/www/src/components/shell/onboarding/checklist/Checklist.tsx b/www/src/components/shell/onboarding/checklist/Checklist.tsx index af60bc6cc..f8ba7cabc 100644 --- a/www/src/components/shell/onboarding/checklist/Checklist.tsx +++ b/www/src/components/shell/onboarding/checklist/Checklist.tsx @@ -167,7 +167,7 @@ export function OnboardingChecklist() { > {error && ( diff --git a/www/src/components/shell/onboarding/sections/shell/ShellStatus.tsx b/www/src/components/shell/onboarding/sections/shell/ShellStatus.tsx index a1bb39d31..5f6839ad1 100644 --- a/www/src/components/shell/onboarding/sections/shell/ShellStatus.tsx +++ b/www/src/components/shell/onboarding/sections/shell/ShellStatus.tsx @@ -25,7 +25,7 @@ function StatusChip({ loading, error }: StatusChipProps) { loading={loading && !error} backgroundColor="fill-two" borderColor="border-fill-two" - severity={error ? 'error' : loading ? 'info' : 'success'} + severity={error ? 'danger' : loading ? 'info' : 'success'} > {error ? 'Error' : loading ? 'Running' : 'Success'} diff --git a/www/src/components/shell/terminal/actionbar/options/DeleteShellModal.tsx b/www/src/components/shell/terminal/actionbar/options/DeleteShellModal.tsx index 2d581c45c..a14887998 100644 --- a/www/src/components/shell/terminal/actionbar/options/DeleteShellModal.tsx +++ b/www/src/components/shell/terminal/actionbar/options/DeleteShellModal.tsx @@ -9,6 +9,8 @@ import { import { A, Button, Flex, Span } from 'honorable' import { useCallback, useContext, useState } from 'react' +import { useTheme } from 'styled-components' + import { ImpersonationContext } from '../../../context/impersonation' import { @@ -17,6 +19,7 @@ import { } from '../../../queries' function DeleteDemoModal({ onClose }) { + const theme = useTheme() const [open, setOpen] = useState(true) const close = useCallback(() => { setOpen(false) @@ -32,8 +35,7 @@ function DeleteDemoModal({ onClose }) { size="large" open={open} onClose={close} - style={{ padding: 0 }} - borderTop="4px solid border-warning" + css={{ borderTop: `4px solid ${theme.colors['border-warning']}` }} > )} setOpen(false)} - width="512px" - portal + size="custom" + css={{ width: '512px' }} > The device you requested on should now have access. diff --git a/www/src/components/users/stripe.css b/www/src/components/users/stripe.css index df2848c4a..397105c7b 100644 --- a/www/src/components/users/stripe.css +++ b/www/src/components/users/stripe.css @@ -5,7 +5,8 @@ padding: 10px 14px; font-size: 1em; font-family: 'Source Code Pro', monospace; - box-shadow: rgba(50, 50, 93, 0.14902) 0px 1px 3px, + box-shadow: + rgba(50, 50, 93, 0.14902) 0px 1px 3px, rgba(0, 0, 0, 0.0196078) 0px 1px 0px; border: 0; outline: 0; @@ -18,7 +19,8 @@ } .StripeElement--focus { - box-shadow: rgba(50, 50, 93, 0.109804) 0px 4px 6px, + box-shadow: + rgba(50, 50, 93, 0.109804) 0px 4px 6px, rgba(0, 0, 0, 0.0784314) 0px 1px 3px; -webkit-transition: all 150ms ease; transition: all 150ms ease; diff --git a/www/src/components/utils/Confirm.tsx b/www/src/components/utils/Confirm.tsx index 58157b666..e46a7e9ab 100644 --- a/www/src/components/utils/Confirm.tsx +++ b/www/src/components/utils/Confirm.tsx @@ -33,7 +33,8 @@ export function Confirm({ header={title} open={open} onClose={close} - width="512px" + css={{ width: '512px' }} + size="custom" actions={ <>