Add links to Zapier templates in installed apps (#4982)

* add automation cateogry for n8n and zapier

* fix border radius for seperated apps

* create app specific settings in installed apps

* Fixed design issues caused by app settings

* add first version of template cards with logos

* Add link to zapier template

* Add missing translations

* fix mobile view

* better readable app description in mobile view

* code clean up

* fix issue that lisItem was always expanded

* code clean up

* code clean up

* fix import

* fix typo

* code clean up

* add missing alt to img

* use FiShare2 icon instead of FiZap

* Remove duplicate entries

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-10-15 08:05:37 +00:00
1 parent e54bdb4c46
commit 6ee9de6dd8
17 files changed
+303 -38

No files matched your search

@@ -1,8 +1,10 @@
import { InferGetServerSidePropsType } from "next";
import z from "zod";
import { AppSettings } from "@calcom/app-store/_components/AppSettings";
import { InstallAppButton } from "@calcom/app-store/components";
import { InstalledAppVariants } from "@calcom/app-store/utils";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { inferQueryOutput, trpc } from "@calcom/trpc/react";
import { App } from "@calcom/types/App";
@@ -89,9 +91,15 @@ interface IntegrationsContainerProps {
exclude?: (keyof typeof InstalledAppVariants)[];
}
const IntegrationsList = ({ data }: { data: inferQueryOutput<"viewer.integrations"> }) => {
interface IntegrationsListProps {
variant?: IntegrationsContainerProps["variant"];
data: inferQueryOutput<"viewer.integrations">;
}
const IntegrationsList = ({ data, variant }: IntegrationsListProps) => {
const separateItems = variant === "automation";
return (
<List noBorderTreatment>
<List className={classNames(separateItems ? "flex flex-col gap-6" : "")} noBorderTreatment>
{data.items.map((item) => (
<IntegrationListItem
name={item.name}
@@ -100,8 +108,9 @@ const IntegrationsList = ({ data }: { data: inferQueryOutput<"viewer.integration
title={item.title}
logo={item.logo}
description={item.description}
separate={separateItems}
actions={
<div className="flex w-32 justify-end">
<div className="flex w-16 justify-end">
<ConnectOrDisconnectIntegrationButton
credentialIds={item.credentialIds}
type={item.type}
@@ -109,8 +118,9 @@ const IntegrationsList = ({ data }: { data: inferQueryOutput<"viewer.integration
installed
/>
</div>
}
/>
}>
{separateItems && <AppSettings slug={item.slug} />}
</IntegrationListItem>
))}
</List>
);
@@ -153,7 +163,7 @@ const IntegrationsContainer = ({ variant, exclude }: IntegrationsContainerProps)
</Button>
}
/>
<IntegrationsList data={data} />
<IntegrationsList data={data} variant={variant} />
</div>
) : (
<EmptyScreen