From 7896d387759d330eabc0eb2ce2787a3e00104808 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 20 Nov 2024 01:12:25 -0300 Subject: [PATCH 01/18] feat: create `UiKitSubscriptionLicenseSurface` --- .../uikit/hooks/useBannerContextValue.ts | 1 + .../admin/subscription/SubscriptionPage.tsx | 21 +++- .../surface/UiKitSubscriptionLicense.tsx | 102 ++++++++++++++++++ .../UiKitSubscriptionLicenseSurface.tsx | 33 ++++++ 4 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 apps/meteor/client/views/admin/subscription/surface/UiKitSubscriptionLicense.tsx create mode 100644 apps/meteor/client/views/admin/subscription/surface/UiKitSubscriptionLicenseSurface.tsx diff --git a/apps/meteor/client/uikit/hooks/useBannerContextValue.ts b/apps/meteor/client/uikit/hooks/useBannerContextValue.ts index 35b38e8dee63..81cb70af6636 100644 --- a/apps/meteor/client/uikit/hooks/useBannerContextValue.ts +++ b/apps/meteor/client/uikit/hooks/useBannerContextValue.ts @@ -41,6 +41,7 @@ export const useBannerContextValue = ({ view, values }: UseBannerContextValuePar }, updateState: (): void => undefined, appId: view.appId, + viewId: view.viewId, values, }; }; diff --git a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx index e6f5beffe7ba..a0c229341195 100644 --- a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx +++ b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx @@ -21,9 +21,12 @@ import PlanCardCommunity from './components/cards/PlanCard/PlanCardCommunity'; import SeatsCard from './components/cards/SeatsCard'; import { useCancelSubscriptionModal } from './hooks/useCancelSubscriptionModal'; import { useWorkspaceSync } from './hooks/useWorkspaceSync'; -import { Page, PageHeader, PageScrollableContentWithShadow } from '../../../components/Page'; +import UiKitSubscriptionLicense from './surface/UiKitSubscriptionLicense'; +import { Page, PageScrollableContentWithShadow } from '../../../components/Page'; +import PageBlockWithBorder from '../../../components/Page/PageBlockWithBorder'; +import PageHeaderNoShadow from '../../../components/Page/PageHeaderNoShadow'; import { useIsEnterprise } from '../../../hooks/useIsEnterprise'; -import { useInvalidateLicense, useLicense } from '../../../hooks/useLicense'; +import { useInvalidateLicense } from '../../../hooks/useLicense'; import { useRegistrationStatus } from '../../../hooks/useRegistrationStatus'; function useShowLicense() { @@ -99,7 +102,7 @@ const SubscriptionPage = () => { return ( - + {isRegistered && (