diff --git a/packages/ui/src/components/device-pairing.tsx b/packages/ui/src/components/device-pairing.tsx index 89dc79af..e9171575 100644 --- a/packages/ui/src/components/device-pairing.tsx +++ b/packages/ui/src/components/device-pairing.tsx @@ -16,6 +16,29 @@ import { QrScannerView } from "@multica/ui/components/qr-scanner-view"; import { MulticaIcon } from "@multica/ui/components/multica-icon"; import { parseConnectionCode } from "@multica/store"; +function StatusWrapper({ fullscreen, children }: { fullscreen?: boolean; children: React.ReactNode }) { + return ( +
+ {children} +
+ ); +} + +function PairingHeader({ title, description }: { title: string; description: string }) { + return ( +
+
+ +

{title}

+
+

{description}

+
+ ); +} + export interface ConnectionIdentity { gateway: string; hubId: string; @@ -44,12 +67,8 @@ function ConnectionStatus({ }) { const isVerifying = connectionState === "verifying"; - const wrapper = fullscreen - ? "fixed inset-0 z-50 bg-background flex flex-col items-center justify-center gap-5 px-6" - : "flex flex-col items-center justify-center h-full gap-5 px-4"; - return ( -
+

@@ -69,7 +88,7 @@ function ConnectionStatus({ > Cancel -

+
); } @@ -86,12 +105,8 @@ function RejectedStatus({ return () => clearTimeout(timer); }, [onDismiss]); - const wrapper = fullscreen - ? "fixed inset-0 z-50 bg-background flex flex-col items-center justify-center gap-5 px-6" - : "flex flex-col items-center justify-center h-full gap-5 px-4"; - return ( -
+
-
+ ); } @@ -207,15 +222,10 @@ export function DevicePairing({ if (isMobile) { return (
-
-
- -

Scan to connect

-
-

- Scan a Multica QR code to connect to your agent -

-
+
); @@ -223,20 +233,13 @@ export function DevicePairing({ // Desktop: tab toggle (scan / paste) return ( -
-
-
- -

- {mode === "scan" ? "Scan to connect" : "Paste to connect"} -

-
-

- {mode === "scan" - ? "Scan a Multica QR code to connect to your agent" - : "Paste a Multica connection code to connect to your agent"} -

-
+
+ {/* Mode toggle */}