22 AlertTriangle ,
33 ArrowUpDown ,
44 BookIcon ,
5- ExternalLinkIcon ,
65 FolderInput ,
76 Loader2 ,
87 MoreHorizontalIcon ,
@@ -16,7 +15,6 @@ import { toast } from "sonner";
1615import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar" ;
1716import { DateTooltip } from "@/components/shared/date-tooltip" ;
1817import { FocusShortcutInput } from "@/components/shared/focus-shortcut-input" ;
19- import { StatusTooltip } from "@/components/shared/status-tooltip" ;
2018import {
2119 AlertDialog ,
2220 AlertDialogAction ,
@@ -40,10 +38,8 @@ import {
4038import {
4139 DropdownMenu ,
4240 DropdownMenuContent ,
43- DropdownMenuGroup ,
4441 DropdownMenuItem ,
4542 DropdownMenuLabel ,
46- DropdownMenuSeparator ,
4743 DropdownMenuTrigger ,
4844} from "@/components/ui/dropdown-menu" ;
4945import {
@@ -280,14 +276,6 @@ export const ShowProjects = () => {
280276 )
281277 . reduce ( ( acc , curr ) => acc + curr , 0 ) ;
282278
283- const haveServicesWithDomains = project ?. environments
284- . map (
285- ( env ) =>
286- env . applications . length > 0 ||
287- env . compose . length > 0 ,
288- )
289- . some ( Boolean ) ;
290-
291279 // Find default environment from accessible environments, or fall back to first accessible environment
292280 const accessibleEnvironment =
293281 project ?. environments . find ( ( env ) => env . isDefault ) ||
@@ -313,122 +301,6 @@ export const ShowProjects = () => {
313301 } }
314302 >
315303 < Card className = "group relative w-full h-full bg-transparent transition-colors hover:bg-border" >
316- { haveServicesWithDomains ? (
317- < DropdownMenu >
318- < DropdownMenuTrigger asChild >
319- < Button
320- className = "absolute -right-3 -top-3 size-9 translate-y-1 rounded-full p-0 opacity-0 transition-all duration-200 group-hover:translate-y-0 group-hover:opacity-100"
321- size = "sm"
322- variant = "default"
323- >
324- < ExternalLinkIcon className = "size-3.5" />
325- </ Button >
326- </ DropdownMenuTrigger >
327- < DropdownMenuContent
328- className = "w-[200px] space-y-2 overflow-y-auto max-h-[400px]"
329- onClick = { ( e ) => e . stopPropagation ( ) }
330- >
331- { project . environments . some (
332- ( env ) => env . applications . length > 0 ,
333- ) && (
334- < DropdownMenuGroup >
335- < DropdownMenuLabel >
336- Applications
337- </ DropdownMenuLabel >
338- { project . environments . map ( ( env ) =>
339- env . applications . map ( ( app ) => (
340- < div key = { app . applicationId } >
341- < DropdownMenuSeparator />
342- < DropdownMenuGroup >
343- < DropdownMenuLabel className = "font-normal capitalize text-xs flex items-center justify-between" >
344- { app . name }
345- < StatusTooltip
346- status = {
347- app . applicationStatus
348- }
349- />
350- </ DropdownMenuLabel >
351- < DropdownMenuSeparator />
352- { app . domains . map ( ( domain ) => (
353- < DropdownMenuItem
354- key = { domain . domainId }
355- asChild
356- >
357- < Link
358- className = "space-x-4 text-xs cursor-pointer justify-between"
359- target = "_blank"
360- href = { `${
361- domain . https
362- ? "https"
363- : "http"
364- } ://${ domain . host } ${
365- domain . path
366- } `}
367- >
368- < span className = "truncate" >
369- { domain . host }
370- </ span >
371- < ExternalLinkIcon className = "size-4 shrink-0" />
372- </ Link >
373- </ DropdownMenuItem >
374- ) ) }
375- </ DropdownMenuGroup >
376- </ div >
377- ) ) ,
378- ) }
379- </ DropdownMenuGroup >
380- ) }
381- { project . environments . some (
382- ( env ) => env . compose . length > 0 ,
383- ) && (
384- < DropdownMenuGroup >
385- < DropdownMenuLabel >
386- Compose
387- </ DropdownMenuLabel >
388- { project . environments . map ( ( env ) =>
389- env . compose . map ( ( comp ) => (
390- < div key = { comp . composeId } >
391- < DropdownMenuSeparator />
392- < DropdownMenuGroup >
393- < DropdownMenuLabel className = "font-normal capitalize text-xs flex items-center justify-between" >
394- { comp . name }
395- < StatusTooltip
396- status = { comp . composeStatus }
397- />
398- </ DropdownMenuLabel >
399- < DropdownMenuSeparator />
400- { comp . domains . map ( ( domain ) => (
401- < DropdownMenuItem
402- key = { domain . domainId }
403- asChild
404- >
405- < Link
406- className = "space-x-4 text-xs cursor-pointer justify-between"
407- target = "_blank"
408- href = { `${
409- domain . https
410- ? "https"
411- : "http"
412- } ://${ domain . host } ${
413- domain . path
414- } `}
415- >
416- < span className = "truncate" >
417- { domain . host }
418- </ span >
419- < ExternalLinkIcon className = "size-4 shrink-0" />
420- </ Link >
421- </ DropdownMenuItem >
422- ) ) }
423- </ DropdownMenuGroup >
424- </ div >
425- ) ) ,
426- ) }
427- </ DropdownMenuGroup >
428- ) }
429- </ DropdownMenuContent >
430- </ DropdownMenu >
431- ) : null }
432304 < CardHeader >
433305 < CardTitle className = "flex items-center justify-between gap-2 overflow-clip" >
434306 < span className = "flex flex-col gap-1.5 " >
0 commit comments