@@ -5,8 +5,20 @@ import { useEnvironment } from "~/hooks/useEnvironment";
5
5
import { useEventSource } from "~/hooks/useEventSource" ;
6
6
import { useOrganization } from "~/hooks/useOrganizations" ;
7
7
import { useProject } from "~/hooks/useProject" ;
8
- import { Dialog , DialogContent , DialogHeader , DialogTrigger } from "./primitives/Dialog" ;
9
- import { Button } from "./primitives/Buttons" ;
8
+ import {
9
+ Dialog ,
10
+ DialogContent ,
11
+ DialogFooter ,
12
+ DialogHeader ,
13
+ DialogTrigger ,
14
+ } from "./primitives/Dialog" ;
15
+ import { Button , LinkButton } from "./primitives/Buttons" ;
16
+ import connectedImage from "../assets/images/cli-connected.png" ;
17
+ import disconnectedImage from "../assets/images/cli-disconnected.png" ;
18
+ import { Paragraph } from "./primitives/Paragraph" ;
19
+ import { PackageManagerProvider , TriggerDevStepV3 } from "./SetupCommands" ;
20
+ import { docsPath } from "~/utils/pathBuilder" ;
21
+ import { BookOpenIcon } from "@heroicons/react/20/solid" ;
10
22
11
23
export function useDevPresence ( ) {
12
24
const organization = useOrganization ( ) ;
@@ -79,7 +91,37 @@ export function DevPresence() {
79
91
? "Your dev server is connected to Trigger.dev"
80
92
: "Your dev server is not connected to Trigger.dev" }
81
93
</ DialogHeader >
82
- < div className = "mt-2 flex flex-col gap-4" > </ div >
94
+ < div className = "mt-2 flex flex-col gap-3 px-2" >
95
+ < div className = "flex flex-col items-center justify-center gap-6 px-6 py-10" >
96
+ < img
97
+ src = { isConnected ? connectedImage : disconnectedImage }
98
+ alt = { isConnected ? "Connected" : "Disconnected" }
99
+ width = { 282 }
100
+ height = { 45 }
101
+ />
102
+ < Paragraph variant = "small" className = { isConnected ? "text-success" : "text-error" } >
103
+ { isConnected
104
+ ? "Your local dev server is connected to Trigger.dev"
105
+ : "Your local dev server is not connected to Trigger.dev" }
106
+ </ Paragraph >
107
+ </ div >
108
+ { isConnected ? null : (
109
+ < div className = "space-y-3" >
110
+ < PackageManagerProvider >
111
+ < TriggerDevStepV3 />
112
+ </ PackageManagerProvider >
113
+ < Paragraph variant = "small" >
114
+ Run this CLI `dev` command to connect to the Trigger.dev servers to start developing
115
+ locally. Keep it running while you develop to stay connected.
116
+ </ Paragraph >
117
+ </ div >
118
+ ) }
119
+ </ div >
120
+ < DialogFooter >
121
+ < LinkButton variant = "tertiary/medium" LeadingIcon = { BookOpenIcon } to = { docsPath ( "cli-dev" ) } >
122
+ CLI docs
123
+ </ LinkButton >
124
+ </ DialogFooter >
83
125
</ DialogContent >
84
126
</ Dialog >
85
127
) ;
0 commit comments