From afd14719efe4db1ec0486a83be68f9647bd25a01 Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Fri, 25 Sep 2026 15:50:22 -0400 Subject: [PATCH] fix(settings): say when GIF search isn't set up instead of a dead switch The GIF button needs a Giphy key in the client config. Without one (the desktop app until now), switching "GIF Picker" on did nothing and nothing said why. With no key the tile now explains it and the switch is disabled; with a key it is unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA --- src/app/features/settings/general/General.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index 9f276a166..4601e9e88 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -49,6 +49,7 @@ import { Edge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge'; import { useAtom } from 'jotai'; +import { useClientConfig } from '../../../hooks/useClientConfig'; import { HexColorPickerPopOut } from '../../../components/HexColorPickerPopOut'; import { BgSwatch as BgSwatchStyle } from './BgSwatch.css'; import { Page, PageContent, PageHeader } from '../../../components/page'; @@ -2581,6 +2582,8 @@ function Messages() { ); const [autoTranslate, setAutoTranslate] = useSetting(settingsAtom, 'autoTranslate'); const [gifPickerEnabled, setGifPickerEnabled] = useSetting(settingsAtom, 'gifPickerEnabled'); + // No Giphy key in this build's config: the switch can't show a GIF button. + const gifAvailable = !!useClientConfig().gifApiKey; const translationSupported = chromeTranslationEngine.isSupported(); const selectedTargetLang = isSupportedTargetLang(translateTargetLang) ? normalizeLang(translateTargetLang) @@ -2686,9 +2689,18 @@ function Messages() { + } />