Allow specifying help URLs in config.json (#11070)

* Allow specifying help URLs in config.json

* Fix test
This commit is contained in:
Michael Telatynski 2023-06-14 08:45:19 +01:00 committed by GitHub
parent ba28174ac0
commit ea0e9abc2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 3 deletions

View file

@ -43,6 +43,7 @@ import PosthogTrackers from "../../../../../PosthogTrackers";
import MatrixClientContext from "../../../../../contexts/MatrixClientContext";
import { SettingsSection } from "../../shared/SettingsSection";
import SettingsTab from "../SettingsTab";
import SdkConfig from "../../../../../SdkConfig";
interface IProps {
room: Room;
@ -163,7 +164,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
"may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
{},
{
a: (sub) => <ExternalLink href="https://element.io/help#encryption">{sub}</ExternalLink>,
a: (sub) => <ExternalLink href={SdkConfig.get("help_encryption_url")}>{sub}</ExternalLink>,
},
),
onFinished: (confirm) => {

View file

@ -251,7 +251,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
brand,
},
{
a: (sub) => <ExternalLink href="https://element.io/help">{sub}</ExternalLink>,
a: (sub) => <ExternalLink href={SdkConfig.get("help_url")}>{sub}</ExternalLink>,
},
);
if (SdkConfig.get("welcome_user_id") && getCurrentLanguage().startsWith("en")) {
@ -265,7 +265,11 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
},
{
a: (sub) => (
<ExternalLink href="https://element.io/help" rel="noreferrer noopener" target="_blank">
<ExternalLink
href={SdkConfig.get("help_url")}
rel="noreferrer noopener"
target="_blank"
>
{sub}
</ExternalLink>
),