Add console devices UI

Add org admin device management, employee self-service enrollment,
posture views, and owner assignment across console routes.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-07-14 20:40:39 +02:00
parent d0dd87c6c7
commit 6dbbd70229
33 changed files with 3081 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ import {
Value,
Viewport,
} from "@radix-ui/react-select";
import { clsx } from "clsx";
import {
Children,
type ComponentProps,
@@ -211,12 +212,21 @@ export function Select<T>({
);
}
export function Option({ children, ...props }: ComponentProps<typeof Item>) {
export function Option({
children,
className,
...props
}: ComponentProps<typeof Item>) {
const hasSingleChildren = Children.count(children) <= 1;
return (
<Item
{...props}
className="flex gap-2 items-center min-h-8 py-1 text-sm font-medium text-txt-primary hover:bg-tertiary-hover active:bg-tertiary-pressed cursor-pointer px-[10px] text-start"
className={clsx(
"flex gap-2 items-center min-h-8 py-1 text-sm font-medium text-txt-primary outline-none cursor-pointer px-[10px] text-start",
"data-[highlighted]:bg-tertiary-hover data-[highlighted]:outline-none",
"active:bg-tertiary-pressed",
className,
)}
>
<ItemText asChild>
<span

View File

@@ -72,6 +72,7 @@ type Props = {
className?: string;
ref?: DialogRef;
onClose?: () => void;
onOpenChange?: (open: boolean) => void;
closable?: boolean;
};
@@ -89,6 +90,7 @@ export function Dialog({
ref,
defaultOpen,
onClose,
onOpenChange: onOpenChangeProp,
closable = true,
}: Props) {
const { overlay, content, header, title: titleClassname } = dialog();
@@ -100,9 +102,11 @@ export function Dialog({
ref.current = {
open() {
setOpen(true);
onOpenChangeProp?.(true);
},
close() {
setOpen(false);
onOpenChangeProp?.(false);
},
};
}
@@ -113,6 +117,7 @@ export function Dialog({
return;
}
setOpen(open);
onOpenChangeProp?.(open);
if (!open) {
onClose?.();
}