diff --git a/apps/web/pages/settings/developer/api-keys.tsx b/apps/web/pages/settings/developer/api-keys.tsx index f3093fa5e8..74adca11bf 100644 --- a/apps/web/pages/settings/developer/api-keys.tsx +++ b/apps/web/pages/settings/developer/api-keys.tsx @@ -57,7 +57,7 @@ const ApiKeysView = () => {
{isLoading ? null : data?.length ? ( <> -
+
{data.map((apiKey, index) => ( { + const { t } = useLocale(); + + const { data, isLoading } = trpc.viewer.apiKeys.list.useQuery(); + + const [apiKeyModal, setApiKeyModal] = useState(false); + const [apiKeyToEdit, setApiKeyToEdit] = useState<(TApiKeys & { neverExpires?: boolean }) | undefined>( + undefined + ); + + const ContinueButton = () => { + return ( + + ); + }; + + return ( + <> + + + + <> + {isLoading && } +
+ {isLoading ? null : data?.length ? ( + <> +
+ {data.map((apiKey, index) => ( + { + setApiKeyToEdit(apiKey); + setApiKeyModal(true); + }} + /> + ))} +
+ + + ) : ( + + + +
+ } + /> + )} +
+ + + + + + setApiKeyModal(false)} defaultValues={apiKeyToEdit} /> + + + + ); +}; + +SelfHostingView.getLayout = getLayout; +SelfHostingView.PageWrapper = PageWrapper; + +export default SelfHostingView; diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index c4a0f6a904..bf2f127011 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -973,6 +973,10 @@ "booking_full": "No more seats available", "api_keys": "API keys", "api_key": "API key", + "self_hosting": "Self-Hosting", + "self_hosting_description": "Generate and manage commercial license keys", + "host_calcom_title": "Host Cal.com on your own server", + "host_calcom_description": "To host the commercial license of cal.com you can generate and manage your license key here", "test_api_key": "Test API key", "test_passed": "Test passed!", "test_failed": "Test failed", diff --git a/packages/features/settings/layouts/SettingsLayout.tsx b/packages/features/settings/layouts/SettingsLayout.tsx index 185bc418e4..5b3514f820 100644 --- a/packages/features/settings/layouts/SettingsLayout.tsx +++ b/packages/features/settings/layouts/SettingsLayout.tsx @@ -70,6 +70,7 @@ const tabs: VerticalTabItemProps[] = [ // { name: "webhooks", href: "/settings/developer/webhooks" }, { name: "api_keys", href: "/settings/developer/api-keys" }, + { name: "self_hosting", href: "/settings/developer/self-hosting" }, // TODO: Add profile level for embeds // { name: "embeds", href: "/v2/settings/developer/embeds" }, ],