TypeScript
fix(web): restore mobile app store links in settings (#20422)
Julius Marminge51f7382aff30
diff --git a/apps/web/src/components/settings/MobileAppSettingsRow.tsx b/apps/web/src/components/settings/MobileAppSettingsRow.tsxnew file mode 100644index 00000000000..62f4332a40c--- /dev/null+++ b/apps/web/src/components/settings/MobileAppSettingsRow.tsx@@ -0,0 +1,64 @@+import { AndroidIcon, AppleIcon } from "../Icons";+import { Button } from "../ui/button";+import { Popover, PopoverPopup, PopoverTitle, PopoverTrigger } from "../ui/popover";+import { QRCodeSvg } from "../ui/qr-code";+import { SettingsRow } from "./settingsLayout";+import { searchableSetting } from "./settingsSearch";++const stores = [+ {+ label: "iPhone and iPad",+ store: "App Store",+ url: "https://apps.apple.com/us/app/t3-code-remote-claude-more/id6787819824",+ Icon: AppleIcon,+ },+ {+ label: "Android",+ store: "Google Play",+ url: "https://play.google.com/store/apps/details?id=com.t3tools.t3code",+ Icon: AndroidIcon,+ },+];++export function MobileAppSettingsRow() {+ return (+ <SettingsRow+ {...searchableSetting("mobile-app")}+ description="Connect to your server from your phone or tablet."+ control={+ <div className="flex items-center gap-2">+ {stores.map(({ label, store, url, Icon }) => (+ <Popover key={store}>+ <PopoverTrigger render={<Button size="sm" variant="outline" />}>+ <Icon />+ {label}+ </PopoverTrigger>+ <PopoverPopup align="end">+ <div className="flex flex-col items-center gap-3">+ <PopoverTitle>{store}</PopoverTitle>+ <p className="text-xs text-muted-foreground">Scan with your phone camera.</p>+ <div className="rounded-lg bg-white p-1.5">+ <QRCodeSvg+ value={url}+ size={128}+ level="M"+ marginSize={1}+ title={`${store} link`}+ />+ </div>+ <Button+ size="sm"+ variant="outline"+ render={<a href={url} target="_blank" rel="noreferrer noopener" />}+ >+ Open {store}+ </Button>+ </div>+ </PopoverPopup>+ </Popover>+ ))}+ </div>+ }+ />+ );+}diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsxindex fcdc35b3c10..fcb561b27b8 100644--- a/apps/web/src/components/settings/SettingsPanels.tsx+++ b/apps/web/src/components/settings/SettingsPanels.tsx@@ -56,6 +56,7 @@ import * as Equal from "effect/Equal";import * as Schema from "effect/Schema";import { APP_VERSION, HOSTED_APP_CHANNEL, HOSTED_APP_CHANNEL_LABEL } from "../../branding";import { CliCommandSettingsRow } from "./CliCommandSettingsRow";+import { MobileAppSettingsRow } from "./MobileAppSettingsRow";import {canCheckForUpdate,getDesktopUpdateButtonTooltip,@@ -3316,6 +3317,7 @@ export function GeneralSettingsPanel() {/></>)}+ <MobileAppSettingsRow /><SettingsRow{...searchableSetting("privacy-policy")}description="How we handle your data, including the anonymous usage data T3 Code collects."diff --git a/apps/web/src/components/settings/settingsSearch.ts b/apps/web/src/components/settings/settingsSearch.tsindex 53032977f5a..1999ff83d30 100644--- a/apps/web/src/components/settings/settingsSearch.ts+++ b/apps/web/src/components/settings/settingsSearch.ts@@ -531,6 +531,12 @@ export const SETTINGS_SEARCH_ITEMS = [searchTerms: ["cli terminal shell path install command line"],desktopOnly: true,},+ {+ id: "mobile-app",+ title: "Mobile app",+ to: "/settings/general",+ searchTerms: ["phone tablet iPhone iPad iOS Android App Store Google Play QR"],+ },{id: "privacy-policy",title: "Privacy policy",diff --git a/docs/user/install.md b/docs/user/install.mdindex 9f3871f2a25..59c8648934c 100644--- a/docs/user/install.md+++ b/docs/user/install.md@@ -114,7 +114,8 @@ Install T3 Code from theThe phone connects to a server on another machine. Follow[remote access](./remote-access.md) to link it through T3 Connect or a pairing URL.-The store apps work with both stable and Nightly servers. Test builds are optional:+Store links and QR codes are also available in **Settings → General → Mobile app**+on web and desktop. The store apps work with both stable and Nightly servers. Test builds are optional:- **iPhone and iPad:** TestFlight is invite-only.- **Android:** download an APK from the