diff --git a/apps/dashboard/app/(app)/projects/[projectId]/details/active-deployment-card/status-indicator.tsx b/apps/dashboard/app/(app)/projects/[projectId]/details/active-deployment-card/status-indicator.tsx index 275d88b56b..27407051b9 100644 --- a/apps/dashboard/app/(app)/projects/[projectId]/details/active-deployment-card/status-indicator.tsx +++ b/apps/dashboard/app/(app)/projects/[projectId]/details/active-deployment-card/status-indicator.tsx @@ -1,21 +1,27 @@ import { Cloud } from "@unkey/icons"; import { cn } from "@unkey/ui/src/lib/utils"; -export function StatusIndicator({ - withSignal = false, -}: { +type StatusIndicatorProps = { withSignal?: boolean; -}) { + className?: string; +}; + +export function StatusIndicator({ withSignal = false, className }: StatusIndicatorProps) { return (
-
+
{withSignal && (
{[0, 0.15, 0.3, 0.45].map((delay, index) => (
+ // biome-ignore lint/suspicious/noArrayIndexKey: its okay to use index as key key={index} className={cn( "absolute inset-0 size-2 rounded-full", diff --git a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/detail-section.tsx b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/detail-section.tsx index a358894a2e..505f2d6d42 100644 --- a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/detail-section.tsx +++ b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/detail-section.tsx @@ -2,8 +2,8 @@ import type { ReactNode } from "react"; import type { DetailItem } from "./sections"; type DetailRowProps = { - icon: ReactNode; - label: string; + icon: ReactNode | null; + label: string | null; children: ReactNode; alignment?: "center" | "start"; }; @@ -11,13 +11,24 @@ type DetailRowProps = { function DetailRow({ icon, label, children, alignment = "center" }: DetailRowProps) { const alignmentClass = alignment === "start" ? "items-start" : "items-center"; + // If both icon and label are missing, let children take full space + if (!icon && !label) { + return ( +
+
{children}
+
+ ); + } + return (
-
- {icon} -
- {label} + {icon && ( +
+ {icon} +
+ )} + {label && {label}}
{children}
diff --git a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/index.tsx b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/index.tsx index 972ef07cb6..913baa12b8 100644 --- a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/index.tsx +++ b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/index.tsx @@ -34,6 +34,15 @@ export const ProjectDetailsExpandable = ({ const data = query.data.at(0); + const project = query.data.at(0)?.project; + const { data: domains } = useLiveQuery( + (q) => + q + .from({ domain: collections.domains }) + .where(({ domain }) => eq(domain.deploymentId, project?.liveDeploymentId)), + [project?.liveDeploymentId], + ); + if (!data?.deployment) { return null; } @@ -100,36 +109,36 @@ export const ProjectDetailsExpandable = ({ > -
- dashboard +
+ {project?.name}
- api.gateway.com + {domains.at(0)?.domain} - {["staging.gateway.com", "dev.gateway.com"].map((region) => ( +
+ {domains.slice(1).map((d) => (
))} @@ -137,7 +146,7 @@ export const ProjectDetailsExpandable = ({ } >
- +2 + +{domains.slice(1).length}
diff --git a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/sections.tsx b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/sections.tsx index 8a497e61d7..3663efe25e 100644 --- a/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/sections.tsx +++ b/apps/dashboard/app/(app)/projects/[projectId]/details/project-details-expandables/sections.tsx @@ -1,5 +1,6 @@ import type { Deployment } from "@/lib/collections"; import { + ArrowRight, Bolt, ChartActivity, CircleHalfDottedClock, @@ -17,10 +18,11 @@ import { import { Badge, TimestampInfo } from "@unkey/ui"; import type { ReactNode } from "react"; import { Avatar } from "../active-deployment-card/git-avatar"; +import { StatusIndicator } from "../active-deployment-card/status-indicator"; export type DetailItem = { - icon: ReactNode; - label: string; + icon: ReactNode | null; + label: string | null; content: ReactNode; alignment?: "center" | "start"; }; @@ -31,6 +33,39 @@ export type DetailSection = { }; export const createDetailSections = (details: Deployment): DetailSection[] => [ + { + title: "OpenAPI changes", + items: [ + { + icon: null, + label: null, + alignment: "start", + content: ( +
+
+
+ +
+
+
from
+
v_charlie042
+
+
+ +
+
+ +
+
+
from
+
v_oz
+
+
+
+ ), + }, + ], + }, { title: "Active deployment", items: [