Skip to content
Open
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 @@ -10,6 +10,7 @@ import {
FolderInput,
GlobeIcon,
Loader2,
MoreHorizontalIcon,
Play,
PlusIcon,
Search,
Expand Down Expand Up @@ -79,6 +80,7 @@ import {
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
Expand Down Expand Up @@ -1098,10 +1100,18 @@ const EnvironmentPage = (
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Move Services</DialogTitle>
<DialogTitle>
Move{" "}
{selectedServices.length === 1
? "Service"
: "Services"}
</DialogTitle>
<DialogDescription>
Select the target project and environment to
move {selectedServices.length} services
move{" "}
{selectedServices.length === 1
? "this service"
: `${selectedServices.length} services`}
</DialogDescription>
</DialogHeader>
<div className="flex flex-col gap-4">
Expand Down Expand Up @@ -1206,7 +1216,10 @@ const EnvironmentPage = (
!selectedTargetEnvironment
}
>
Move Services
Move{" "}
{selectedServices.length === 1
? "Service"
: "Services"}
</Button>
</DialogFooter>
</DialogContent>
Expand Down Expand Up @@ -1511,42 +1524,69 @@ const EnvironmentPage = (
</div>

<CardHeader>
<CardTitle className="flex items-center justify-between">
<div className="flex flex-row items-center gap-2 justify-between w-full">
<div className="flex flex-col gap-2">
<span className="text-base flex items-center gap-2 font-medium leading-none flex-wrap">
<CardTitle className="flex items-center justify-between gap-2">
<span className="flex flex-col gap-1.5">
<div className="flex items-center gap-2">
<span className="text-muted-foreground">
{service.type === "postgres" && (
<PostgresqlIcon className="size-4" />
)}
{service.type === "redis" && (
<RedisIcon className="size-4" />
)}
{service.type === "mariadb" && (
<MariadbIcon className="size-4" />
)}
{service.type === "mongo" && (
<MongodbIcon className="size-4" />
)}
{service.type === "mysql" && (
<MysqlIcon className="size-4" />
)}
{service.type === "application" && (
<GlobeIcon className="size-4" />
)}
{service.type === "compose" && (
<CircuitBoard className="size-4" />
)}
</span>
<span className="text-base font-medium leading-none">
{service.name}
</span>
{service.description && (
<span className="text-sm font-medium text-muted-foreground">
{service.description}
</span>
)}
</div>

<span className="text-sm font-medium text-muted-foreground self-start">
{service.type === "postgres" && (
<PostgresqlIcon className="h-7 w-7" />
)}
{service.type === "redis" && (
<RedisIcon className="h-7 w-7" />
)}
{service.type === "mariadb" && (
<MariadbIcon className="h-7 w-7" />
)}
{service.type === "mongo" && (
<MongodbIcon className="h-7 w-7" />
)}
{service.type === "mysql" && (
<MysqlIcon className="h-7 w-7" />
)}
{service.type === "application" && (
<GlobeIcon className="h-6 w-6" />
)}
{service.type === "compose" && (
<CircuitBoard className="h-6 w-6" />
)}
</span>
{service.description && (
<span className="text-sm font-medium text-muted-foreground">
{service.description}
</span>
)}
</span>
<div className="flex self-start">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon"
className="px-2"
onClick={(e) => e.stopPropagation()}
>
<MoreHorizontalIcon className="size-5" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
onClick={(e) => e.stopPropagation()}
>
<DropdownMenuItem
onSelect={() => {
setSelectedServices([service.id]);
setIsMoveDialogOpen(true);
}}
>
<FolderInput className="mr-2 h-4 w-4" />
Move
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
</CardTitle>
</CardHeader>
Expand Down