Fixing already installed apps & link to them (#3500)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/3509/head^2
parent
277b0c4c92
commit
e395c9297d
|
@ -146,6 +146,10 @@ const Component = ({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
) : installedAppCount > 0 ? (
|
||||||
|
<Button color="secondary" disabled title="App already installed">
|
||||||
|
{t("installed")}
|
||||||
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<InstallAppButton
|
<InstallAppButton
|
||||||
type={type}
|
type={type}
|
||||||
|
|
|
@ -106,6 +106,7 @@ function CalendarList(props: Props) {
|
||||||
<List>
|
<List>
|
||||||
{data.items.map((item) => (
|
{data.items.map((item) => (
|
||||||
<IntegrationListItem
|
<IntegrationListItem
|
||||||
|
slug={item.slug}
|
||||||
key={item.title}
|
key={item.title}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
imageSrc={item.imageSrc}
|
imageSrc={item.imageSrc}
|
||||||
|
@ -147,6 +148,7 @@ function ConnectedCalendarsList(props: Props) {
|
||||||
<Fragment key={item.credentialId}>
|
<Fragment key={item.credentialId}>
|
||||||
{item.calendars ? (
|
{item.calendars ? (
|
||||||
<IntegrationListItem
|
<IntegrationListItem
|
||||||
|
slug={item.integration.slug}
|
||||||
title={item.integration.title}
|
title={item.integration.title}
|
||||||
imageSrc={item.integration.imageSrc}
|
imageSrc={item.integration.imageSrc}
|
||||||
description={item.primary?.externalId || "No external Id"}
|
description={item.primary?.externalId || "No external Id"}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Link from "next/link";
|
||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
@ -6,6 +7,7 @@ import { ListItem, ListItemText, ListItemTitle } from "@components/List";
|
||||||
|
|
||||||
function IntegrationListItem(props: {
|
function IntegrationListItem(props: {
|
||||||
imageSrc?: string;
|
imageSrc?: string;
|
||||||
|
slug: string;
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
actions?: ReactNode;
|
actions?: ReactNode;
|
||||||
|
@ -19,7 +21,9 @@ function IntegrationListItem(props: {
|
||||||
props.imageSrc && <img className="h-10 w-10" src={props.imageSrc} alt={props.title} />
|
props.imageSrc && <img className="h-10 w-10" src={props.imageSrc} alt={props.title} />
|
||||||
}
|
}
|
||||||
<div className="flex-grow truncate pl-2">
|
<div className="flex-grow truncate pl-2">
|
||||||
<ListItemTitle component="h3">{props.title}</ListItemTitle>
|
<ListItemTitle component="h3">
|
||||||
|
<Link href={"/apps/" + props.slug}>{props.title}</Link>
|
||||||
|
</ListItemTitle>
|
||||||
<ListItemText component="p">{props.description}</ListItemText>
|
<ListItemText component="p">{props.description}</ListItemText>
|
||||||
</div>
|
</div>
|
||||||
<div>{props.actions}</div>
|
<div>{props.actions}</div>
|
||||||
|
|
|
@ -118,6 +118,7 @@ const IntegrationsContainer = ({ variant, className = "" }: IntegrationsContaine
|
||||||
<List>
|
<List>
|
||||||
{data.items.map((item) => (
|
{data.items.map((item) => (
|
||||||
<IntegrationListItem
|
<IntegrationListItem
|
||||||
|
slug={item.slug}
|
||||||
key={item.title}
|
key={item.title}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
imageSrc={item.imageSrc}
|
imageSrc={item.imageSrc}
|
||||||
|
|
Loading…
Reference in New Issue