Skip to content

Commit b8acfd5

Browse files
committed
Show a clear message when you have unallocated concurrency
1 parent 552fde2 commit b8acfd5

File tree

1 file changed

+20
-2
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency

1 file changed

+20
-2
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency/route.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { conform, useFieldList, useForm } from "@conform-to/react";
22
import { parse } from "@conform-to/zod";
33
import {
4+
ArrowDownIcon,
45
EnvelopeIcon,
56
ExclamationTriangleIcon,
67
InformationCircleIcon,
@@ -379,8 +380,15 @@ function Upgradable({
379380
)}
380381
</TableCell>
381382
</TableRow>
382-
<TableRow className={allocationModified ? undefined : "after:bg-transparent"}>
383-
<TableCell colSpan={2} className="py-0">
383+
<TableRow
384+
className={
385+
allocationModified || unallocated > 0 ? undefined : "after:bg-transparent"
386+
}
387+
>
388+
<TableCell
389+
colSpan={2}
390+
className={cn("py-0", (unallocated > 0 || allocationModified) && "pr-0")}
391+
>
384392
<div className="flex h-10 items-center">
385393
{allocationModified ? (
386394
unallocated < 0 ? (
@@ -419,6 +427,16 @@ function Upgradable({
419427
</Button>
420428
</div>
421429
)
430+
) : unallocated > 0 ? (
431+
<div className="flex h-full w-full items-center justify-between bg-success/10 px-2.5">
432+
<div className="flex items-center justify-start gap-1">
433+
<InformationCircleIcon className="size-4 text-success" />
434+
<span className="text-success">
435+
You have {unallocated} extra concurrency available to allocate below.
436+
</span>
437+
</div>
438+
<ArrowDownIcon className="size-4 animate-bounce text-success" />
439+
</div>
422440
) : (
423441
<></>
424442
)}

0 commit comments

Comments
 (0)