Hide server options hint when disable_custom_urls is true (#7215)

This commit is contained in:
Michael Telatynski 2021-11-29 11:06:11 +00:00 committed by GitHub
parent 3a2aa9d96c
commit dbd148489d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,8 +53,10 @@ const onHelpClick = () => {
};
const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange }: IProps) => {
const disableCustomUrls = SdkConfig.get()["disable_custom_urls"];
let editBtn;
if (!SdkConfig.get()["disable_custom_urls"] && onServerConfigChange) {
if (!disableCustomUrls && onServerConfigChange) {
const onClick = () => {
showPickerDialog(dialogTitle, serverConfig, (config?: ValidatedServerConfig) => {
if (config) {
@ -83,7 +85,7 @@ const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange }
return <div className="mx_ServerPicker">
<h3>{ title || _t("Homeserver") }</h3>
<AccessibleButton className="mx_ServerPicker_help" onClick={onHelpClick} />
{ !disableCustomUrls ? <AccessibleButton className="mx_ServerPicker_help" onClick={onHelpClick} /> : null }
<span className="mx_ServerPicker_server">{ serverName }</span>
{ editBtn }
{ desc }