Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Hide server options hint when disable_custom_urls is true #7215

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/views/elements/ServerPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 }
Expand Down