diff --git a/src/components/connection/InstallationGuide.tsx b/src/components/connection/InstallationGuide.tsx index 53c3092..b5c6b9b 100644 --- a/src/components/connection/InstallationGuide.tsx +++ b/src/components/connection/InstallationGuide.tsx @@ -150,11 +150,11 @@ export default function InstallationGuide({ ); const userIsOnTv = detectedPlatform === 'androidTV' || detectedPlatform === 'appleTV'; - // Happ's TV quick-connect (check.happ.su/sendtv, 5-digit code) is an ANDROID TV - // -only API. Apple TV uses a different mechanism (tv.happ.su temporary code), so - // the block must NOT show there — it would POST to the wrong endpoint. - const isAndroidTvLayout = - (activePlatformKey || availablePlatforms[0]) === 'androidTV' && !userIsOnTv; + // Happ's TV quick-connect (check.happ.su/sendtv) is ONE API serving BOTH + // Android TV and Apple TV — show the widget on either. + const selectedPlatform = activePlatformKey || availablePlatforms[0]; + const isTvLayout = + (selectedPlatform === 'androidTV' || selectedPlatform === 'appleTV') && !userIsOnTv; const currentPlatformKey = activePlatformKey || availablePlatforms[0]; const currentPlatformData = currentPlatformKey @@ -194,11 +194,11 @@ export default function InstallationGuide({ const blockType = appConfig.uiConfig?.installationGuidesBlockType || 'cards'; const Renderer = RENDERERS[blockType] || CardsBlock; - // For the Happ Android TV app, inject the TV connect widget into a step as + // For the Happ TV app (Android TV / Apple TV), inject the TV connect widget as // customNode so it renders THROUGH the active block style (cards/timeline/ // accordion/minimal) instead of as separate clashing cards that break it. const showTvConnect = Boolean( - selectedApp && isAndroidTvLayout && isHappApp(selectedApp) && appConfig.subscriptionUrl, + selectedApp && isTvLayout && isHappApp(selectedApp) && appConfig.subscriptionUrl, ); let renderBlocks: RenderBlock[] = selectedApp?.blocks ?? []; if (selectedApp && showTvConnect && appConfig.subscriptionUrl) { diff --git a/src/components/connection/TvQuickConnect.tsx b/src/components/connection/TvQuickConnect.tsx index 8400d40..56eb4e4 100644 --- a/src/components/connection/TvQuickConnect.tsx +++ b/src/components/connection/TvQuickConnect.tsx @@ -213,9 +213,9 @@ export default function TvQuickConnect({ subscriptionUrl, isLight }: Props) { maxLength={5} value={code} onChange={(e) => setCode(e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, ''))} - placeholder="12345" + placeholder="A1B2C" autoComplete="one-time-code" - inputMode="numeric" + inputMode="text" className={inputClass} />