diff --git a/apps/meteor/client/components/Page/Page.tsx b/apps/meteor/client/components/Page/Page.tsx index 801c4bce89f17..3a002d32a946b 100644 --- a/apps/meteor/client/components/Page/Page.tsx +++ b/apps/meteor/client/components/Page/Page.tsx @@ -1,14 +1,24 @@ import { Box } from '@rocket.chat/fuselage'; +import Colors from '@rocket.chat/fuselage-tokens/colors'; import React, { useState, ReactElement, ComponentProps } from 'react'; import PageContext from './PageContext'; -const Page = (props: ComponentProps): ReactElement => { +type PageProps = Omit, 'backgroundColor'> & { + surface?: 'light' | 'tint' | 'neutral'; +}; + +const surfaceMap = { + light: Colors.white, + tint: Colors.n100, + neutral: Colors.n400, +}; // TODO: Remove this export after the migration is complete + +const Page = ({ surface = 'light', ...props }: PageProps): ReactElement => { const [border, setBorder] = useState(false); return ( ): ReactElement => { height='full' overflow='hidden' {...props} + backgroundColor={`var(--rcx-color-surface-${surface}, ${surfaceMap[surface]})`} /> ); diff --git a/apps/meteor/client/views/admin/apps/AllAppsSection.tsx b/apps/meteor/client/views/admin/apps/AllAppsSection.tsx deleted file mode 100644 index 84cfb425e47cb..0000000000000 --- a/apps/meteor/client/views/admin/apps/AllAppsSection.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { App } from '@rocket.chat/core-typings'; -import { PaginatedResult } from '@rocket.chat/rest-typings'; -import { useTranslation } from '@rocket.chat/ui-contexts'; -import React, { ReactElement } from 'react'; - -import { AsyncState, AsyncStatePhase } from '../../../lib/asyncState'; -import AppsList from './AppsList'; - -export type AllAppsSectionProps = { - appsResult: AsyncState<{ items: App[] } & { shouldShowSearchText: boolean } & PaginatedResult>; - isMarketplace: boolean; -}; - -const AllAppsSection = ({ appsResult, isMarketplace }: AllAppsSectionProps): ReactElement | null => { - const t = useTranslation(); - - const isAllAppsListReady = appsResult.phase === AsyncStatePhase.RESOLVED && Boolean(appsResult.value.count); - - if (isAllAppsListReady) return ; - - return null; -}; - -export default AllAppsSection; diff --git a/apps/meteor/client/views/admin/apps/AppDetails.tsx b/apps/meteor/client/views/admin/apps/AppDetails.tsx index 4cdeac6939d13..26a72f67f007c 100644 --- a/apps/meteor/client/views/admin/apps/AppDetails.tsx +++ b/apps/meteor/client/views/admin/apps/AppDetails.tsx @@ -1,4 +1,4 @@ -import { Box, Callout, Chip, Margins } from '@rocket.chat/fuselage'; +import { Box, ButtonGroup, Callout, Chip, Margins } from '@rocket.chat/fuselage'; import { ExternalLink } from '@rocket.chat/ui-client'; import { TranslationKey, useTranslation } from '@rocket.chat/ui-contexts'; import React, { FC } from 'react'; @@ -59,13 +59,13 @@ const AppDetails: FC = ({ app }) => { {t('Categories')} - + {categories?.map((current) => ( - - {current} + + {current} ))} - + diff --git a/apps/meteor/client/views/admin/apps/AppDetailsPage.tsx b/apps/meteor/client/views/admin/apps/AppDetailsPage.tsx index 569a5f7da58aa..1eee7d1993467 100644 --- a/apps/meteor/client/views/admin/apps/AppDetailsPage.tsx +++ b/apps/meteor/client/views/admin/apps/AppDetailsPage.tsx @@ -86,7 +86,7 @@ const AppDetailsPage: FC<{ id: string }> = function AppDetailsPage({ id }) { <> - + handleTabClick('details')} selected={!tab || tab === 'details'}> {t('Details')} diff --git a/apps/meteor/client/views/admin/apps/AppsPage.tsx b/apps/meteor/client/views/admin/apps/AppsPage.tsx index b7821df4228c5..da3d0f91e88a2 100644 --- a/apps/meteor/client/views/admin/apps/AppsPage.tsx +++ b/apps/meteor/client/views/admin/apps/AppsPage.tsx @@ -1,5 +1,4 @@ import { Button, ButtonGroup, Icon, Skeleton, Tabs } from '@rocket.chat/fuselage'; -import colors from '@rocket.chat/fuselage-tokens/colors'; import { useRoute, useSetting, useMethod, useTranslation } from '@rocket.chat/ui-contexts'; import React, { useEffect, useState, ReactElement } from 'react'; @@ -37,8 +36,8 @@ const AppsPage = ({ isMarketplace }: AppsPageProps): ReactElement => { }; return ( - - + + {isMarketplace && !isLoggedInCloud && (