diff --git a/apps/web/src/components/settings/IntegrationsSettings.tsx b/apps/web/src/components/settings/IntegrationsSettings.tsx index 8aa0b15708..379e20623c 100644 --- a/apps/web/src/components/settings/IntegrationsSettings.tsx +++ b/apps/web/src/components/settings/IntegrationsSettings.tsx @@ -20,8 +20,10 @@ import { type PreviewViewportSetting, } from "@t3tools/contracts"; import { PREVIEW_VIEWPORT_PRESETS } from "@t3tools/shared/previewViewport"; +import { InfoIcon } from "lucide-react"; import { ScreenRotationIcon } from "~/browser/ScreenRotationIcon"; +import { isElectron } from "../../env"; import { Button } from "../ui/button"; import { NumberField, NumberFieldGroup, NumberFieldInput } from "../ui/number-field"; @@ -108,7 +110,7 @@ const rotateViewport = ( height: viewport.width, }); -function BrowserViewportSetting() { +function BrowserViewportSetting({ disabled }: { readonly disabled: boolean }) { const viewport = useClientSettings((settings) => settings.browserDefaultViewport); const updateSettings = useUpdatePrimarySettings(); @@ -162,7 +164,7 @@ function BrowserViewportSetting() { {...searchableSetting("browser-default-viewport")} description="The viewport a browser tab opens at, for both you and agents. Fill sizes the page to the panel; any other choice opens the device toolbar at that size." resetAction={ - viewport._tag !== DEFAULT_BROWSER_VIEWPORT._tag ? ( + !disabled && viewport._tag !== DEFAULT_BROWSER_VIEWPORT._tag ? ( updateSettings({ browserDefaultViewport: DEFAULT_BROWSER_VIEWPORT })} @@ -171,7 +173,11 @@ function BrowserViewportSetting() { } control={
- {viewportSelectLabel(viewport)} @@ -200,6 +206,7 @@ function BrowserViewportSetting() { value={presentedSize.width} min={PREVIEW_VIEWPORT_MIN_DIMENSION} max={PREVIEW_VIEWPORT_MAX_DIMENSION} + disabled={disabled} // Pixel counts read as raw numbers; grouping would show "1,024". format={NO_GROUPING} size="sm" @@ -215,6 +222,7 @@ function BrowserViewportSetting() { value={presentedSize.height} min={PREVIEW_VIEWPORT_MIN_DIMENSION} max={PREVIEW_VIEWPORT_MAX_DIMENSION} + disabled={disabled} format={NO_GROUPING} size="sm" className="w-24" @@ -230,6 +238,7 @@ function BrowserViewportSetting() {