Fix identity server settings visibility (#29083)
* Fix identity server settings visibility The IS settings got confused with the posthog settings and were only shown if analytics were enabled. * Update snapshot
This commit is contained in:
@@ -319,7 +319,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let privacySection;
|
let posthogSection;
|
||||||
if (PosthogAnalytics.instance.isEnabled()) {
|
if (PosthogAnalytics.instance.isEnabled()) {
|
||||||
const onClickAnalyticsLearnMore = (): void => {
|
const onClickAnalyticsLearnMore = (): void => {
|
||||||
showAnalyticsLearnMoreDialog({
|
showAnalyticsLearnMoreDialog({
|
||||||
@@ -327,9 +327,8 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||||||
hasCancel: false,
|
hasCancel: false,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
privacySection = (
|
posthogSection = (
|
||||||
<SettingsSection heading={_t("common|privacy")}>
|
<>
|
||||||
<DiscoverySettings />
|
|
||||||
<SettingsSubsection
|
<SettingsSubsection
|
||||||
heading={_t("common|analytics")}
|
heading={_t("common|analytics")}
|
||||||
description={_t("settings|security|analytics_description")}
|
description={_t("settings|security|analytics_description")}
|
||||||
@@ -344,7 +343,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||||||
<SettingsSubsection heading={_t("settings|sessions|title")}>
|
<SettingsSubsection heading={_t("settings|sessions|title")}>
|
||||||
<SettingsFlag name="deviceClientInformationOptIn" level={SettingLevel.ACCOUNT} />
|
<SettingsFlag name="deviceClientInformationOptIn" level={SettingLevel.ACCOUNT} />
|
||||||
</SettingsSubsection>
|
</SettingsSubsection>
|
||||||
</SettingsSection>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +372,10 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||||||
{crossSigning}
|
{crossSigning}
|
||||||
<CryptographyPanel />
|
<CryptographyPanel />
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
{privacySection}
|
<SettingsSection heading={_t("common|privacy")}>
|
||||||
|
<DiscoverySettings />
|
||||||
|
{posthogSection}
|
||||||
|
</SettingsSection>
|
||||||
{advancedSection}
|
{advancedSection}
|
||||||
</SettingsTab>
|
</SettingsTab>
|
||||||
);
|
);
|
||||||
|
|||||||
+83
@@ -390,6 +390,89 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSection"
|
||||||
|
>
|
||||||
|
<h2
|
||||||
|
class="mx_Heading_h3"
|
||||||
|
>
|
||||||
|
Privacy
|
||||||
|
</h2>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSection_subSections"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSubsection"
|
||||||
|
data-testid="discoverySection"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSubsectionHeading"
|
||||||
|
>
|
||||||
|
<h3
|
||||||
|
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||||
|
>
|
||||||
|
How to find you
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSubsection_content mx_SettingsSubsection_contentStretch"
|
||||||
|
>
|
||||||
|
<fieldset
|
||||||
|
class="mx_SettingsFieldset"
|
||||||
|
>
|
||||||
|
<legend
|
||||||
|
class="mx_SettingsFieldset_legend"
|
||||||
|
>
|
||||||
|
Identity server
|
||||||
|
</legend>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsFieldset_description"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsSubsection_text"
|
||||||
|
>
|
||||||
|
You are not currently using an identity server. To discover and be discoverable by existing contacts you know, add one below.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="mx_SettingsFieldset_content"
|
||||||
|
>
|
||||||
|
<form
|
||||||
|
class="mx_SetIdServer"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="mx_Field mx_Field_input"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
id="mx_Field_1"
|
||||||
|
label="Enter a new identity server"
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
for="mx_Field_1"
|
||||||
|
>
|
||||||
|
Enter a new identity server
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
aria-disabled="true"
|
||||||
|
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_sm mx_AccessibleButton_disabled"
|
||||||
|
disabled=""
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
Change
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mx_SettingsSection"
|
class="mx_SettingsSection"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user