fix(desktop): remove unsupported asChild prop from AlertDialogDescription

Radix UI version in this project doesn't support asChild on
AlertDialogDescription. Use inline spans with block display instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yushen 2026-02-04 14:12:14 +08:00
parent 240f25b2be
commit db69e0d08d

View file

@ -64,18 +64,14 @@ export function DeviceConfirmDialog() {
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>New Device Connection</AlertDialogTitle>
<AlertDialogDescription asChild>
<div className="space-y-2">
<p>
<span className="font-medium">{deviceLabel}</span> wants to connect.
</p>
{parsed && (
<p className="text-xs font-mono text-muted-foreground truncate">
{pending?.deviceId}
</p>
)}
<p>Allow this device?</p>
</div>
<AlertDialogDescription>
<span className="font-medium">{deviceLabel}</span> wants to connect.
{parsed && (
<span className="block text-xs font-mono text-muted-foreground truncate mt-1">
{pending?.deviceId}
</span>
)}
<span className="block mt-1">Allow this device?</span>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>