From 77e9845dba6db0a738f06b6590ffedb9bf83c2e2 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:41:42 -0600 Subject: [PATCH] Fix visibility of KT in settings Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- ts/components/Preferences.dom.stories.tsx | 1 + ts/components/Preferences.dom.tsx | 62 +++++++++++++---------- ts/state/smart/Preferences.preload.tsx | 8 +++ 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/ts/components/Preferences.dom.stories.tsx b/ts/components/Preferences.dom.stories.tsx index f63b68160f..70bcbf4bbe 100644 --- a/ts/components/Preferences.dom.stories.tsx +++ b/ts/components/Preferences.dom.stories.tsx @@ -458,6 +458,7 @@ export default { isAutoDownloadUpdatesSupported: true, isAutoLaunchSupported: true, isHideMenuBarSupported: true, + isKeyTransparencyAvailable: true, isNotificationAttentionSupported: true, isSyncSupported: true, isSystemTraySupported: true, diff --git a/ts/components/Preferences.dom.tsx b/ts/components/Preferences.dom.tsx index 61cec32698..367832128c 100644 --- a/ts/components/Preferences.dom.tsx +++ b/ts/components/Preferences.dom.tsx @@ -196,6 +196,7 @@ export type PropsDataType = { isContentProtectionNeeded: boolean; isContentProtectionSupported: boolean; isHideMenuBarSupported: boolean; + isKeyTransparencyAvailable: boolean; isNotificationAttentionSupported: boolean; isPlaintextExportEnabled: boolean; isSyncSupported: boolean; @@ -441,6 +442,7 @@ export function Preferences({ isContentProtectionNeeded, isContentProtectionSupported, isHideMenuBarSupported, + isKeyTransparencyAvailable, isNotificationAttentionSupported, isPlaintextExportEnabled, isSyncSupported, @@ -1820,36 +1822,40 @@ export function Preferences({ - - - onHasKeyTransparencyDisabledChanged(!hasKeyTransparencyDisabled) - } - /> -
-
- {i18n( - 'icu:Preferences__PrivacyPage__KeyTransparency__Description' + {isKeyTransparencyAvailable && ( + + - - + moduleClassName="Preferences__checkbox" + name="keyTransparency" + onChange={() => + onHasKeyTransparencyDisabledChanged(!hasKeyTransparencyDisabled) + } + /> +
+
+ {i18n( + 'icu:Preferences__PrivacyPage__KeyTransparency__Description' + )} +   + + + +
-
- + + )}
( @@ -867,6 +874,7 @@ export function SmartPreferences(): React.JSX.Element | null { isContentProtectionNeeded={isContentProtectionNeeded} isContentProtectionSupported={isContentProtectionSupported} isHideMenuBarSupported={isHideMenuBarSupported} + isKeyTransparencyAvailable={isKeyTransparencyAvailable} isMinimizeToAndStartInSystemTraySupported={ isMinimizeToAndStartInSystemTraySupported }