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:
17 files changed
+303
-38
No files matched your search
@@ -163,6 +163,7 @@ function ConnectedCalendarsList(props: Props) {
|
||||
title={item.integration.title}
|
||||
logo={item.integration.logo}
|
||||
description={item.primary?.externalId || "No external Id"}
|
||||
separate={true}
|
||||
actions={
|
||||
<div className="flex w-32 justify-end">
|
||||
<DisconnectIntegration
|
||||
@@ -173,23 +174,27 @@ function ConnectedCalendarsList(props: Props) {
|
||||
/>
|
||||
</div>
|
||||
}>
|
||||
{!fromOnboarding && (
|
||||
<>
|
||||
<p className="px-4 pt-4 text-sm text-neutral-500">{t("toggle_calendars_conflict")}</p>
|
||||
<ul className="space-y-2 p-4">
|
||||
{item.calendars.map((cal) => (
|
||||
<CalendarSwitch
|
||||
key={cal.externalId}
|
||||
externalId={cal.externalId}
|
||||
title={cal.name || "Nameless calendar"}
|
||||
type={item.integration.type}
|
||||
defaultSelected={cal.isSelected}
|
||||
destination={cal.externalId === props.destinationCalendarId}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
)}
|
||||
<div className="border-t border-gray-200">
|
||||
{!fromOnboarding && (
|
||||
<>
|
||||
<p className="px-4 pt-4 text-sm text-neutral-500">
|
||||
{t("toggle_calendars_conflict")}
|
||||
</p>
|
||||
<ul className="space-y-2 p-4">
|
||||
{item.calendars.map((cal) => (
|
||||
<CalendarSwitch
|
||||
key={cal.externalId}
|
||||
externalId={cal.externalId}
|
||||
title={cal.name || "Nameless calendar"}
|
||||
type={item.integration.type}
|
||||
defaultSelected={cal.isSelected}
|
||||
destination={cal.externalId === props.destinationCalendarId}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</IntegrationListItem>
|
||||
) : (
|
||||
<Alert
|
||||
@@ -262,7 +267,7 @@ export function CalendarListContainer(props: { heading?: boolean; fromOnboarding
|
||||
actions={
|
||||
<div className="flex flex-col xl:flex-row xl:space-x-5">
|
||||
{!!data.connectedCalendars.length && (
|
||||
<div className=" flex items-center">
|
||||
<div className="flex items-center">
|
||||
<AdditionalCalendarSelector isLoading={mutation.isLoading} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -16,6 +16,7 @@ function IntegrationListItem(props: {
|
||||
children?: ReactNode;
|
||||
logo: string;
|
||||
destination?: boolean;
|
||||
separate?: boolean;
|
||||
}): JSX.Element {
|
||||
const router = useRouter();
|
||||
const { hl } = router.query;
|
||||
@@ -32,7 +33,8 @@ function IntegrationListItem(props: {
|
||||
<ListItem
|
||||
expanded={!!props.children}
|
||||
className={classNames(
|
||||
"my-0 flex-col border transition-colors duration-500 first:rounded-t-md last:rounded-b-md",
|
||||
props.separate ? "rounded-md" : "first:rounded-t-md last:rounded-b-md",
|
||||
"my-0 flex-col border transition-colors duration-500 ",
|
||||
highlight ? "bg-yellow-100" : ""
|
||||
)}>
|
||||
<div className={classNames("flex w-full flex-1 items-center space-x-2 p-4 rtl:space-x-reverse")}>
|
||||
@@ -45,7 +47,7 @@ function IntegrationListItem(props: {
|
||||
</div>
|
||||
<div>{props.actions}</div>
|
||||
</div>
|
||||
{props.children && <div className="w-full border-t border-gray-200">{props.children}</div>}
|
||||
{props.children && <div className="w-full">{props.children}</div>}
|
||||
</ListItem>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user