Fix visibility of KT in settings

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-02-11 12:41:28 -06:00
committed by GitHub
parent 1b213589b8
commit 2ed29fe5ff
3 changed files with 43 additions and 28 deletions

View File

@@ -454,6 +454,7 @@ export default {
isAutoDownloadUpdatesSupported: true,
isAutoLaunchSupported: true,
isHideMenuBarSupported: true,
isKeyTransparencyAvailable: true,
isNotificationAttentionSupported: true,
isSyncSupported: true,
isSystemTraySupported: true,

View File

@@ -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({
</div>
</FlowingControl>
</SettingsRow>
<SettingsRow>
<Checkbox
checked={!hasKeyTransparencyDisabled}
label={i18n('icu:Preferences__PrivacyPage__KeyTransparency__Label')}
moduleClassName="Preferences__checkbox"
name="keyTransparency"
onChange={() =>
onHasKeyTransparencyDisabledChanged(!hasKeyTransparencyDisabled)
}
/>
<div className="Preferences__padding">
<div className="Preferences__description">
{i18n(
'icu:Preferences__PrivacyPage__KeyTransparency__Description'
{isKeyTransparencyAvailable && (
<SettingsRow>
<Checkbox
checked={!hasKeyTransparencyDisabled}
label={i18n(
'icu:Preferences__PrivacyPage__KeyTransparency__Label'
)}
&ensp;
<a
href={KEY_TRANSPARENCY_URL}
rel="noreferrer"
target="_blank"
className={tw('text-label-primary')}
>
<I18n
i18n={i18n}
id="icu:Preferences__PrivacyPage__KeyTransparency__LearnMore"
/>
</a>
moduleClassName="Preferences__checkbox"
name="keyTransparency"
onChange={() =>
onHasKeyTransparencyDisabledChanged(!hasKeyTransparencyDisabled)
}
/>
<div className="Preferences__padding">
<div className="Preferences__description">
{i18n(
'icu:Preferences__PrivacyPage__KeyTransparency__Description'
)}
&ensp;
<a
href={KEY_TRANSPARENCY_URL}
rel="noreferrer"
target="_blank"
className={tw('text-label-primary')}
>
<I18n
i18n={i18n}
id="icu:Preferences__PrivacyPage__KeyTransparency__LearnMore"
/>
</a>
</div>
</div>
</div>
</SettingsRow>
</SettingsRow>
)}
<SettingsRow>
<FlowingControl>
<div

View File

@@ -590,6 +590,13 @@ export function SmartPreferences(): React.JSX.Element | null {
prodKey: 'desktop.plaintextExport.prod',
});
const isKeyTransparencyAvailable = isFeaturedEnabledSelector({
betaKey: 'desktop.keyTransparency.beta',
prodKey: 'desktop.keyTransparency.prod',
currentVersion: version,
remoteConfig: items.remoteConfig,
});
// Two-way items
function createItemsAccess<K extends keyof StorageAccessType>(
@@ -867,6 +874,7 @@ export function SmartPreferences(): React.JSX.Element | null {
isContentProtectionNeeded={isContentProtectionNeeded}
isContentProtectionSupported={isContentProtectionSupported}
isHideMenuBarSupported={isHideMenuBarSupported}
isKeyTransparencyAvailable={isKeyTransparencyAvailable}
isMinimizeToAndStartInSystemTraySupported={
isMinimizeToAndStartInSystemTraySupported
}