diff --git a/src/renderer/src/components/mobile/MobileHero.tsx b/src/renderer/src/components/mobile/MobileHero.tsx index f0688ee404c..29c2ff13099 100644 --- a/src/renderer/src/components/mobile/MobileHero.tsx +++ b/src/renderer/src/components/mobile/MobileHero.tsx @@ -206,41 +206,36 @@ export function HeroFlow({ compact /> - {connectionMode === 'local-only' ? ( -
- - {translate('auto.components.mobile.MobileHero.dfd2aa9d5d', 'Network')} - - - -
- ) : null} +
+ + {translate('auto.components.mobile.MobileHero.dfd2aa9d5d', 'Network')} + + + +
diff --git a/src/renderer/src/components/settings/MobilePairingConnectionOptions.tsx b/src/renderer/src/components/settings/MobilePairingConnectionOptions.tsx index f28abcf2491..28cb98dae05 100644 --- a/src/renderer/src/components/settings/MobilePairingConnectionOptions.tsx +++ b/src/renderer/src/components/settings/MobilePairingConnectionOptions.tsx @@ -36,6 +36,135 @@ function relayStatusLabel(status: MobileRelayStatus): string { ) } +type CompactConnectionOptionsProps = { + value: MobilePairingConnectionMode + onChange: (value: MobilePairingConnectionMode) => void + signedIn: boolean + configured: boolean + connecting: boolean + connect: () => Promise + relayStatus: MobileRelayStatus +} + +function CompactConnectionOptions({ + value, + onChange, + signedIn, + configured, + connecting, + connect, + relayStatus +}: CompactConnectionOptionsProps): React.JSX.Element { + return ( +
+

+ {translate( + 'auto.components.settings.MobilePairingConnectionOptions.title', + 'How should the new phone connect?' + )} +

+
+ + + +
+ +
+

+ {!signedIn + ? translate( + 'auto.components.settings.MobilePairingConnectionOptions.signInDescription', + 'Sign in on this desktop to use Orca Relay.' + ) + : value === 'automatic' + ? translate( + 'auto.components.settings.MobilePairingConnectionOptions.automaticDescription', + 'Orca uses a direct connection when available and Relay otherwise.' + ) + : translate( + 'auto.components.settings.MobilePairingConnectionOptions.localDescription', + 'Uses LAN or Tailscale without connecting this phone through Orca Relay.' + )} +

+ {!signedIn && configured ? ( + + ) : null} +
+
+ ) +} + export function MobilePairingConnectionOptions({ value, onChange, @@ -75,8 +204,22 @@ export function MobilePairingConnectionOptions({ } }, []) + if (compact) { + return ( + + ) + } + return ( -
+

{translate( 'auto.components.settings.MobilePairingConnectionOptions.title', @@ -87,7 +230,7 @@ export function MobilePairingConnectionOptions({
@@ -160,7 +303,7 @@ export function MobilePairingConnectionOptions({