= {}
@@ -422,12 +431,18 @@ export function StepSources({
setState(id, "waitlist")
}
+ // Paused beats locked: upgrading cannot unlock a connector nobody can connect.
const guard = (
plan: RequiredPlan | undefined,
title: string,
fn: () => void,
+ provider?: string,
) => {
return () => {
+ if (provider && connectorPause(provider)) {
+ fn()
+ return
+ }
if (isLocked(plan) && plan) {
setRequestedPlan(plan)
setRequestedConnector(title)
@@ -948,19 +963,22 @@ function GoogleDriveSourceCard({
plan: RequiredPlan | undefined,
title: string,
fn: () => void,
+ provider?: string,
) => () => void
connectRealProvider: (
provider: "google-drive" | "notion" | "onedrive",
id: SourceId,
) => void
}) {
+ const pause = connectorPause("google-drive")
+
return (
}
state={values.connected.drive ?? "idle"}
- ctaLabel="Connect"
+ ctaLabel={pause ? "Notify me" : "Connect"}
locked={isLocked("pro")}
requiredPlan="pro"
perks={[
@@ -968,11 +986,19 @@ function GoogleDriveSourceCard({
"Stays in sync as files change",
"You pick what to share at sign-in",
]}
- onConnect={guard("pro", "Google Drive", () =>
- connectRealProvider("google-drive", "drive"),
+ onConnect={guard(
+ "pro",
+ "Google Drive",
+ () => connectRealProvider("google-drive", "drive"),
+ "google-drive",
)}
headerNote={
- values.driveScope === "full" ? (
+ pause ? (
+
+
+ {pause.message}
+
+ ) : values.driveScope === "full" ? (
Full Drive can exhaust your monthly usage.
@@ -1006,6 +1032,7 @@ function NotionSourceCard({
plan: RequiredPlan | undefined,
title: string,
fn: () => void,
+ provider?: string,
) => () => void
connectRealProvider: (
provider: "google-drive" | "notion" | "onedrive",
@@ -1048,6 +1075,7 @@ function GranolaSourceCard({
plan: RequiredPlan | undefined,
title: string,
fn: () => void,
+ provider?: string,
) => () => void
onOpen: () => void
}) {
@@ -1092,6 +1120,7 @@ function MoreSourcesGrid({
plan: RequiredPlan | undefined,
title: string,
fn: () => void,
+ provider?: string,
) => () => void
openExternal: (id: SourceId, url: string) => void
requestWaitlist: (id: SourceId) => void
@@ -1283,7 +1312,9 @@ function SourceCard({
{isDone ? (
- {state === "waitlist" ? "Requested" : (doneLabel ?? "Connected")}
+ {state === "waitlist"
+ ? "We'll email you"
+ : (doneLabel ?? "Connected")}
) : (