authorgravatar for 73941998+UtkarshUsername@users.noreply.github.comUtkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com> 2026-08-14 01:33:48+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-13 16:03:48-04:00
log2fab18e289bdb2b1b767f05a307729d0a0d1c002
tree2c95acffcc065637eb588d65a18df3441f48301b
parent1b16ed663ffe475490a644d1004873a8aae6bb90
signature Signed by PGP key B5690EEEBB952194

fix(web): show unlinked icon when viewport aspect ratio is unlocked (#6509)


1 files changed, 6 insertions(+), 2 deletions(-)

apps/web/src/browser/BrowserDeviceToolbar.tsx+6-2
...@@ -7,7 +7,7 @@ import {...@@ -7,7 +7,7 @@ import {
7 type PreviewViewportSetting,7 type PreviewViewportSetting,
8} from "@t3tools/contracts";8} from "@t3tools/contracts";
9import { PREVIEW_VIEWPORT_PRESETS, resolvePreviewViewport } from "@t3tools/shared/previewViewport";9import { PREVIEW_VIEWPORT_PRESETS, resolvePreviewViewport } from "@t3tools/shared/previewViewport";
10import { Link2, X } from "lucide-react";10import { Link2, Unlink2, X } from "lucide-react";
11import { useState } from "react";11import { useState } from "react";
1212
13import { Button } from "~/components/ui/button";13import { Button } from "~/components/ui/button";
...@@ -310,7 +310,11 @@ export function BrowserDeviceToolbar({...@@ -310,7 +310,11 @@ export function BrowserDeviceToolbar({
310 onPointerDown={(event) => event.preventDefault()}310 onPointerDown={(event) => event.preventDefault()}
311 onClick={toggleAspectRatio}311 onClick={toggleAspectRatio}
312 >312 >
313 <Link2 className={cn(aspectRatio !== null && "text-foreground")} />313 {aspectRatio === null ? (
314 <Unlink2 className={cn(aspectRatio !== null && "text-foreground")} />
315 ) : (
316 <Link2 className={cn(aspectRatio !== null && "text-foreground")} />
317 )}
314 </Button>318 </Button>
315 <Button319 <Button
316 variant="ghost"320 variant="ghost"