|
1 | 1 | 'use client'; |
2 | 2 |
|
3 | 3 | import { useCallback, useState } from 'react'; |
4 | | -import { TriangleAlert } from 'lucide-react'; |
| 4 | +import { Zap, TriangleAlert } from 'lucide-react'; |
5 | 5 | import type { KiloClawDashboardStatus } from '@/lib/kiloclaw/types'; |
6 | 6 | import { |
7 | 7 | useKiloClawGatewayStatus, |
@@ -48,6 +48,13 @@ export function ClawDashboard({ status }: { status: KiloClawDashboardStatus | un |
48 | 48 | const { data: isServiceDegraded } = useKiloClawServiceDegraded(); |
49 | 49 | const { data: earlybirdStatus } = useQuery(trpc.kiloclaw.getEarlybirdStatus.queryOptions()); |
50 | 50 |
|
| 51 | + const SEVEN_DAYS_MS = 7 * 24 * 60 * 60 * 1000; |
| 52 | + const instanceYoung = |
| 53 | + instanceStatus !== null && |
| 54 | + instanceStatus.provisionedAt !== null && |
| 55 | + Date.now() - instanceStatus.provisionedAt < SEVEN_DAYS_MS; |
| 56 | + const configServiceNudgeVisible = !instanceStatus || instanceYoung; |
| 57 | + |
51 | 58 | const [dirtySecrets, setDirtySecrets] = useState<Set<string>>(new Set()); |
52 | 59 |
|
53 | 60 | const onSecretsChanged = useCallback((entryId: string) => { |
@@ -90,6 +97,31 @@ export function ClawDashboard({ status }: { status: KiloClawDashboardStatus | un |
90 | 97 | </Alert> |
91 | 98 | )} |
92 | 99 |
|
| 100 | + {configServiceNudgeVisible && ( |
| 101 | + <div className="border-brand-primary/30 bg-brand-primary/5 flex flex-col gap-3 rounded-xl border p-4 sm:flex-row sm:items-center sm:justify-between"> |
| 102 | + <div className="flex items-start gap-3"> |
| 103 | + <Zap className="text-brand-primary mt-0.5 h-5 w-5 shrink-0" /> |
| 104 | + <div> |
| 105 | + <p className="text-brand-primary text-sm font-semibold"> |
| 106 | + Go from inbox chaos to an AI executive assistant — in one hour. |
| 107 | + </p> |
| 108 | + <p className="text-muted-foreground mt-0.5 text-sm"> |
| 109 | + A KiloClaw expert configures your email, calendar, and messaging live on a call. |
| 110 | + Includes <b>2 months free</b> hosting. |
| 111 | + </p> |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + <a |
| 115 | + href="https://kilo.ai/kiloclaw/config-service" |
| 116 | + target="_blank" |
| 117 | + rel="noopener noreferrer" |
| 118 | + className="bg-brand-primary text-primary-foreground hover:bg-brand-primary/90 inline-flex shrink-0 items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors" |
| 119 | + > |
| 120 | + Book your session |
| 121 | + </a> |
| 122 | + </div> |
| 123 | + )} |
| 124 | + |
93 | 125 | <Card className="mt-6"> |
94 | 126 | {!instanceStatus ? ( |
95 | 127 | <CardContent className="p-5"> |
|
0 commit comments