Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { ReactNode } from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import { Loader2 } from "lucide-react";
import { Button } from "@onecli/ui/components/button";
import { IS_CLOUD } from "@/lib/env";
import { API_ORIGIN, getAuthToken, getProjectId } from "@/lib/api-fetch";
import { ConnectLayout } from "./connect-layout";
import { ConnectSuccess } from "./connect-success";
Expand Down Expand Up @@ -280,28 +279,6 @@ export const ConnectFlow = ({
Use an API key instead
</Button>
)}
{!IS_CLOUD && (
<>
<div className="flex items-center gap-3 pt-1">
<div className="bg-border h-px flex-1" />
<span className="text-muted-foreground/60 text-[10px] uppercase tracking-widest">
or
</span>
<div className="bg-border h-px flex-1" />
</div>
<p className="text-muted-foreground text-xs">
Skip setup with{" "}
<a
href="https://app.onecli.sh"
target="_blank"
rel="noopener noreferrer"
className="text-foreground underline decoration-foreground/20 underline-offset-2 transition-colors hover:decoration-foreground/60"
>
OneCLI Cloud
</a>
</p>
</>
)}
</div>
</ConnectLayout>
);
Expand Down
24 changes: 7 additions & 17 deletions apps/web/src/app/(dashboard)/_components/get-started-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,16 @@ export const GetStartedDialog = ({
<TryDemoCommand command={runCommand} />
</div>
<p className="text-muted-foreground text-xs">
Requires the OneCLI CLI. One-command install is
available with{" "}
Requires the OneCLI CLI — see the{" "}
<a
href="https://app.onecli.sh"
href="https://onecli.sh/docs/quickstart"
target="_blank"
rel="noopener noreferrer"
className="text-foreground font-medium underline underline-offset-2"
>
OneCLI Cloud
</a>
.
quickstart
</a>{" "}
to install it.
</p>
</div>
)}
Expand Down Expand Up @@ -215,17 +214,8 @@ export const GetStartedDialog = ({
</div>
) : (
<div className="rounded-lg border p-4">
<p className="text-sm">
Migration is available with{" "}
<a
href="https://app.onecli.sh"
target="_blank"
rel="noopener noreferrer"
className="text-foreground font-medium underline underline-offset-2 transition-colors hover:text-foreground/80"
>
OneCLI Cloud
</a>
.
<p className="text-muted-foreground text-sm">
Automated migration isn&apos;t available in this build.
</p>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
useDeleteAppConfig,
useToggleAppConfig,
} from "@/hooks/use-app-config";
import { IS_CLOUD } from "@/lib/env";
import { RedirectUri } from "./redirect-uri";

export interface AppConfigFormHandle {
Expand Down Expand Up @@ -301,23 +300,6 @@ export const AppConfigForm = ({
? "Override platform defaults with your own."
: (hint ?? `Required to connect ${appName}.`)}
</p>
{!hasEnvDefaults &&
!hasCredentials &&
!enabled &&
!IS_CLOUD && (
<p className="text-xs text-muted-foreground mt-1.5">
Or connect instantly with{" "}
<a
href="https://app.onecli.sh"
target="_blank"
rel="noopener noreferrer"
className="text-foreground font-medium underline underline-offset-2 transition-colors hover:text-foreground/80"
>
OneCLI Cloud
</a>{" "}
- no credentials needed.
</p>
)}
</div>
<Switch checked={enabled} onCheckedChange={handleToggle} />
</div>
Expand Down
47 changes: 5 additions & 42 deletions apps/web/src/app/(dashboard)/connections/_components/apps-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
type AppCategory,
} from "./app-categories";
import type { AppDefinition } from "@onecli/api/apps/types";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useQueryClient } from "@tanstack/react-query";
import type { PageScope } from "@/lib/api";
import { queryKeys } from "@/lib/api/keys";
import { useConnections } from "@/hooks/use-connections";
Expand All @@ -40,8 +40,8 @@ import {
useAppMessages,
type AppConnectedEvent,
} from "@/hooks/use-app-connected";
import { getCurrentPlan } from "@/lib/user-plan";
import { ProAppDialog } from "@/lib/components/pro-app-dialog";
import { UnavailableBadge } from "@/lib/components/unavailable-badge";
import { AppIcon } from "./app-icon";
import { ConnectAppDialog } from "./connect-app-dialog";
import { ConfigureCredentialsDialog } from "./configure-credentials-dialog";
Expand Down Expand Up @@ -121,10 +121,6 @@ export const AppsTab = ({
const configuredQuery = useConfiguredProviders(pageScope);
const envDefaultsQuery = useEnvDefaultProviders();
const availableQuery = useAvailableApps(pageScope);
const planQuery = useQuery({
queryKey: queryKeys.userPlan.all(),
queryFn: getCurrentPlan,
});

const connectionCounts = useMemo(() => {
const counts = new Map<string, number>();
Expand All @@ -143,12 +139,10 @@ export const AppsTab = ({
() => new Set(envDefaultsQuery.data ?? []),
[envDefaultsQuery.data],
);
const plan = planQuery.data ?? null;
const loading =
connectionsQuery.isPending ||
configuredQuery.isPending ||
envDefaultsQuery.isPending ||
planQuery.isPending;
envDefaultsQuery.isPending;

const handleConnected = useCallback(
({ provider, connectionId }: AppConnectedEvent) => {
Expand Down Expand Up @@ -387,10 +381,7 @@ export const AppsTab = ({
) : (
filteredApps.map((app) => {
const count = connectionCounts.get(app.id) ?? 0;
const isLocked =
!app.available ||
(app.teamOnly === true &&
!["team", "scale", "enterprise"].includes(plan ?? ""));
const isLocked = !app.available;
return (
<AppRow
key={app.id}
Expand Down Expand Up @@ -525,35 +516,7 @@ const AppRow = ({
</div>

{cloudOnly ? (
<span className="inline-flex items-center gap-1.5 rounded-full border border-brand/20 bg-brand/5 px-2.5 py-0.5">
<svg
width="11"
height="9"
viewBox="0 0 44 36"
fill="none"
className="shrink-0 -mt-px"
>
<path
d="M2 2L16 18L2 34"
stroke="currentColor"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
className="text-brand"
/>
<path
d="M22 2L36 18L22 34"
stroke="currentColor"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
className="text-brand"
/>
</svg>
<span className="text-[11px] font-semibold tracking-wide text-brand">
Team
</span>
</span>
<UnavailableBadge />
) : (
<div className="flex items-center gap-2 shrink-0">
{!hideDetails && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { SecretInput } from "@/components/secret-input";
import type { PageScope } from "@/lib/api";
import { useSaveAppConfig } from "@/hooks/use-app-config";
import type { OAuthConfigField } from "@onecli/api/apps/types";
import { IS_CLOUD } from "@/lib/env";
import { AppIcon } from "./app-icon";
import { RedirectUri } from "./redirect-uri";

Expand Down Expand Up @@ -133,21 +132,6 @@ export const ConfigureCredentialsDialog = ({
>
{saving ? "Saving..." : "Save & Connect"}
</Button>

{!IS_CLOUD && (
<p className="text-muted-foreground text-center text-xs">
Or use{" "}
<a
href="https://app.onecli.sh"
target="_blank"
rel="noopener noreferrer"
className="text-foreground font-medium underline underline-offset-2 transition-colors hover:text-foreground/80"
>
OneCLI Cloud
</a>{" "}
for pre-configured connections.
</p>
)}
</div>
</DialogContent>
</Dialog>
Expand Down
12 changes: 2 additions & 10 deletions apps/web/src/lib/components/condition-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,8 @@ export interface ConditionBuilderProps {
export const ConditionBuilder = ({}: ConditionBuilderProps) => (
<div className="rounded-md border border-dashed px-3 py-2.5">
<p className="text-xs text-muted-foreground">
Match conditions (body content, headers) are available on{" "}
<a
href="https://app.onecli.sh"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
OneCLI Cloud
</a>
.
Match conditions (body content, headers) are not yet available in this
build.
</p>
</div>
);
72 changes: 11 additions & 61 deletions apps/web/src/lib/components/pro-app-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"use client";

import { ExternalLink } from "lucide-react";
import { Button } from "@onecli/ui/components/button";
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@onecli/ui/components/dialog";
import { AppIcon } from "@/app/(dashboard)/connections/_components/app-icon";
import { UnavailableBadge } from "@/lib/components/unavailable-badge";

interface ProAppDialogProps {
appName: string;
Expand All @@ -19,6 +18,13 @@ interface ProAppDialogProps {
onOpenChange: (open: boolean) => void;
}

/**
* Shown when the user opens something this build does not implement: an
* `available: false` registry app (Connections list) or a capability without an
* OSS implementation (granular access). Informational only — the dialog's close
* button is the only action. Every EE edition aliases this module away
* (`next.config.js` → `@/ee/apps/pro-app-dialog`).
*/
export const ProAppDialog = ({
appName,
appIcon,
Expand All @@ -44,72 +50,16 @@ export const ProAppDialog = ({
<DialogTitle className="text-lg">{appName}</DialogTitle>
</DialogHeader>

<div className="mt-2 inline-flex items-center gap-1.5 rounded-full border border-brand/20 bg-brand/5 px-2.5 py-0.5">
<svg
width="11"
height="9"
viewBox="0 0 44 36"
fill="none"
className="shrink-0 -mt-px"
>
<path
d="M2 2L16 18L2 34"
stroke="currentColor"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
className="text-brand"
/>
<path
d="M22 2L36 18L22 34"
stroke="currentColor"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
className="text-brand"
/>
</svg>
<span className="text-[11px] font-semibold tracking-wide text-brand">
Team
</span>
<div className="mt-2">
<UnavailableBadge />
</div>

<p className="mt-4 text-center text-sm leading-relaxed text-muted-foreground text-balance">
{description}
</p>
<p className="mt-1.5 text-center text-xs text-muted-foreground/70 text-balance">
Available on OneCLI Cloud and on-prem enterprise plans.
Not yet available in this build.
</p>

<div className="mt-6 flex w-full flex-col gap-2.5">
<Button
className="w-full"
onClick={() =>
window.open(
"https://app.onecli.sh",
"_blank",
"noopener,noreferrer",
)
}
>
Try OneCLI Cloud
<ExternalLink className="size-3.5" />
</Button>
<Button
variant="outline"
className="w-full"
onClick={() =>
window.open(
"https://cal.com/onecli",
"_blank",
"noopener,noreferrer",
)
}
>
Looking for on-prem? Talk to sales
<ExternalLink className="size-3.5" />
</Button>
</div>
</div>
</DialogContent>
</Dialog>
Expand Down
38 changes: 0 additions & 38 deletions apps/web/src/lib/components/team-badge.tsx

This file was deleted.

Loading