diff --git a/res/css/views/settings/tabs/_SettingsTab.pcss b/res/css/views/settings/tabs/_SettingsTab.pcss index e0abf08e83..51c28297fb 100644 --- a/res/css/views/settings/tabs/_SettingsTab.pcss +++ b/res/css/views/settings/tabs/_SettingsTab.pcss @@ -77,10 +77,6 @@ Please see LICENSE files in the repository root for full details. } } -.mx_SettingsTab_toggleWithDescription { - margin-top: $spacing-24; -} - .mx_SettingsTab_sections { display: grid; grid-template-columns: 1fr; diff --git a/src/components/views/dialogs/DevtoolsDialog.tsx b/src/components/views/dialogs/DevtoolsDialog.tsx index 98cb4c5edb..3d6ca3754c 100644 --- a/src/components/views/dialogs/DevtoolsDialog.tsx +++ b/src/components/views/dialogs/DevtoolsDialog.tsx @@ -98,7 +98,12 @@ const DevtoolsDialog: React.FC = ({ roomId, threadRootId, onFinished }) })} ))} - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + >

{_t("common|options")}

diff --git a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx index aeb5ca48f5..caaf41eaaa 100644 --- a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx +++ b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx @@ -104,7 +104,12 @@ export default class RoomUpgradeWarningDialog extends React.Component {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > { }, ) : description; + if (this.props.name === "sendReadReceipts") { + console.log( + "Fully disabled", + this.props.name, + SettingsStore.disabledMessage(this.props.name), + description, + helpMessage, + ); + } + const disabledMessage = SettingsStore.disabledMessage(this.props.name); return ( ); } diff --git a/src/components/views/location/EnableLiveShare.tsx b/src/components/views/location/EnableLiveShare.tsx index ed40311e45..9f6de880b7 100644 --- a/src/components/views/location/EnableLiveShare.tsx +++ b/src/components/views/location/EnableLiveShare.tsx @@ -36,6 +36,8 @@ export const EnableLiveShare: React.FC = ({ onSubmit }) => { [isEnabled, onSubmit], ); + console.log("EnableLiveShare", isEnabled); + return (
@@ -50,12 +52,7 @@ export const EnableLiveShare: React.FC = ({ onSubmit }) => { onChange={onEnabledChanged} label={_t("location_sharing|live_toggle_label")} /> - diff --git a/src/components/views/room_settings/RoomPublishSetting.tsx b/src/components/views/room_settings/RoomPublishSetting.tsx index a940e0591b..cac8a55e24 100644 --- a/src/components/views/room_settings/RoomPublishSetting.tsx +++ b/src/components/views/room_settings/RoomPublishSetting.tsx @@ -9,13 +9,13 @@ Please see LICENSE files in the repository root for full details. import React, { type ChangeEventHandler } from "react"; import { JoinRule, Visibility } from "matrix-js-sdk/src/matrix"; import { SettingsToggleInput } from "@vector-im/compound-web"; +import { logger } from "matrix-js-sdk/src/logger"; import { _t } from "../../../languageHandler"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import DirectoryCustomisations from "../../../customisations/Directory"; import Modal from "../../../Modal"; import ErrorDialog from "../dialogs/ErrorDialog"; -import { logger } from "matrix-js-sdk/src/logger"; interface IProps { roomId: string; diff --git a/src/components/views/settings/Notifications.tsx b/src/components/views/settings/Notifications.tsx index 359acfdb9a..d0d9980854 100644 --- a/src/components/views/settings/Notifications.tsx +++ b/src/components/views/settings/Notifications.tsx @@ -191,7 +191,12 @@ const maximumVectorState = ( const NotificationActivitySettings = (): JSX.Element => { return ( - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > @@ -815,7 +820,12 @@ export default class Notifications extends React.PureComponent {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > {this.renderTopSection()} {this.renderCategory(RuleClass.VectorGlobal)} {this.renderCategory(RuleClass.VectorMentions)} diff --git a/src/components/views/settings/SetIntegrationManager.tsx b/src/components/views/settings/SetIntegrationManager.tsx index 006ef22458..44507067ad 100644 --- a/src/components/views/settings/SetIntegrationManager.tsx +++ b/src/components/views/settings/SetIntegrationManager.tsx @@ -66,11 +66,20 @@ export default class SetIntegrationManager extends React.Component {evt.preventDefault(); evt.stopPropagation();}} className="mx_SetIntegrationManager" data-testid="mx_SetIntegrationManager"> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + className="mx_SetIntegrationManager" + data-testid="mx_SetIntegrationManager" + >
{_t("integration_manager|manage_title")} - {managerName} + + {managerName} +
{bodyText} diff --git a/src/components/views/settings/notifications/NotificationSettings2.tsx b/src/components/views/settings/notifications/NotificationSettings2.tsx index 360a0e66b0..3d1273bd87 100644 --- a/src/components/views/settings/notifications/NotificationSettings2.tsx +++ b/src/components/views/settings/notifications/NotificationSettings2.tsx @@ -93,7 +93,6 @@ export default function NotificationSettings2(): JSX.Element { return (
- {hasPendingChanges && model !== null && ( } @@ -111,252 +110,257 @@ export default function NotificationSettings2(): JSX.Element { )} - {evt.preventDefault(); evt.stopPropagation();}}> -
- { - reconcile({ - ...model!, - globalMute: !evt.target.checked, - }); - }} - /> - - - -
- { + evt.preventDefault(); + evt.stopPropagation(); + }} > - { - reconcile({ - ...model!, - defaultLevels: { - ...model!.defaultLevels, - dm: - value !== NotificationDefaultLevels.MentionsKeywords - ? RoomNotifState.AllMessages - : RoomNotifState.MentionsOnly, - room: - value === NotificationDefaultLevels.AllMessages - ? RoomNotifState.AllMessages - : RoomNotifState.MentionsOnly, - }, - }); - }} - /> - - - { - reconcile({ - ...model!, - sound: { - ...model!.sound, - people: value ? "default" : undefined, - }, - }); - }} - /> - { - reconcile({ - ...model!, - sound: { - ...model!.sound, - mentions: value ? "default" : undefined, - }, - }); - }} - /> - { - reconcile({ - ...model!, - sound: { - ...model!.sound, - calls: value ? "ring" : undefined, - }, - }); - }} - /> - - - { - reconcile({ - ...model!, - activity: { - ...model!.activity, - invite: value, - }, - }); - }} - /> - { - reconcile({ - ...model!, - activity: { - ...model!.activity, - status_event: value, - }, - }); - }} - /> - { - reconcile({ - ...model!, - activity: { - ...model!.activity, - bot_notices: value, - }, - }); - }} - /> - - - ), - }, - )} - > - { - reconcile({ - ...model!, - mentions: { - ...model!.mentions, - room: value, - }, - }); - }} - /> - { - reconcile({ - ...model!, - mentions: { - ...model!.mentions, - user: value, - }, - }); - }} - /> - { - reconcile({ - ...model!, - mentions: { - ...model!.mentions, - keywords: value, - }, - }); - }} - /> - { - reconcile({ - ...model!, - keywords: [keyword, ...model!.keywords], - }); - }} - onRemove={(keyword) => { - reconcile({ - ...model!, - keywords: model!.keywords.filter((it) => it !== keyword), - }); - }} - label={_t("notifications|keyword")} - placeholder={_t("notifications|keyword_new")} - /> +
+ { + reconcile({ + ...model!, + globalMute: !evt.target.checked, + }); + }} + /> + + + +
+ + { + reconcile({ + ...model!, + defaultLevels: { + ...model!.defaultLevels, + dm: + value !== NotificationDefaultLevels.MentionsKeywords + ? RoomNotifState.AllMessages + : RoomNotifState.MentionsOnly, + room: + value === NotificationDefaultLevels.AllMessages + ? RoomNotifState.AllMessages + : RoomNotifState.MentionsOnly, + }, + }); + }} + /> + + + { + reconcile({ + ...model!, + sound: { + ...model!.sound, + people: value ? "default" : undefined, + }, + }); + }} + /> + { + reconcile({ + ...model!, + sound: { + ...model!.sound, + mentions: value ? "default" : undefined, + }, + }); + }} + /> + { + reconcile({ + ...model!, + sound: { + ...model!.sound, + calls: value ? "ring" : undefined, + }, + }); + }} + /> + + + { + reconcile({ + ...model!, + activity: { + ...model!.activity, + invite: value, + }, + }); + }} + /> + { + reconcile({ + ...model!, + activity: { + ...model!.activity, + status_event: value, + }, + }); + }} + /> + { + reconcile({ + ...model!, + activity: { + ...model!.activity, + bot_notices: value, + }, + }); + }} + /> + + + ), + }, + )} + > + { + reconcile({ + ...model!, + mentions: { + ...model!.mentions, + room: value, + }, + }); + }} + /> + { + reconcile({ + ...model!, + mentions: { + ...model!.mentions, + user: value, + }, + }); + }} + /> + { + reconcile({ + ...model!, + mentions: { + ...model!.mentions, + keywords: value, + }, + }); + }} + /> + { + reconcile({ + ...model!, + keywords: [keyword, ...model!.keywords], + }); + }} + onRemove={(keyword) => { + reconcile({ + ...model!, + keywords: model!.keywords.filter((it) => it !== keyword), + }); + }} + label={_t("notifications|keyword")} + placeholder={_t("notifications|keyword_new")} + /> - - - - - - {hasUnreadNotifications && ( + + + + + + {hasUnreadNotifications && ( + { + setUpdatingUnread(true); + await clearAllNotifications(cli); + setUpdatingUnread(false); + }} + > + {_t("settings|notifications|quick_actions_mark_all_read")} + + )} { - setUpdatingUnread(true); - await clearAllNotifications(cli); - setUpdatingUnread(false); + kind="danger_outline" + disabled={model === null} + onClick={() => { + reconcile(DefaultNotificationSettings); }} > - {_t("settings|notifications|quick_actions_mark_all_read")} + {_t("settings|notifications|quick_actions_reset")} - )} - { - reconcile(DefaultNotificationSettings); - }} - > - {_t("settings|notifications|quick_actions_reset")} - - +
diff --git a/src/components/views/settings/shared/SettingsSubsection.tsx b/src/components/views/settings/shared/SettingsSubsection.tsx index 6f7fdde1f0..ac4872f598 100644 --- a/src/components/views/settings/shared/SettingsSubsection.tsx +++ b/src/components/views/settings/shared/SettingsSubsection.tsx @@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details. import classNames from "classnames"; import React, { type HTMLAttributes } from "react"; -import { Separator } from "@vector-im/compound-web"; +import { Form, Separator } from "@vector-im/compound-web"; import { SettingsSubsectionHeading } from "./SettingsSubsectionHeading"; @@ -23,6 +23,11 @@ export interface SettingsSubsectionProps extends HTMLAttributes * @default true */ legacy?: boolean; + + /** + * Wrap in a Form Root component, for compatibility with compound components. + */ + formWrap?: boolean; } export const SettingsSubsectionText: React.FC> = ({ children, ...rest }) => ( @@ -37,31 +42,48 @@ export const SettingsSubsection: React.FC = ({ children, stretchContent, legacy = true, + formWrap, ...rest -}) => ( -
- {typeof heading === "string" ? : <>{heading}} - {!!description && ( -
- {description} -
- )} - {!!children && ( -
{ + const content = ( +
+ {typeof heading === "string" ? : <>{heading}} + {!!description && ( +
+ {description} +
+ )} + {!!children && ( +
+ {children} +
+ )} + {!legacy && } +
+ ); + + if (formWrap) { + return ( + { + evt.preventDefault(); + evt.stopPropagation(); + }} > - {children} -
- )} - {!legacy && } -
-); + {content} +
+ ); + } + return content; +}; diff --git a/src/components/views/settings/tabs/SettingsTab.tsx b/src/components/views/settings/tabs/SettingsTab.tsx index c7a9f9a212..d9f5d17788 100644 --- a/src/components/views/settings/tabs/SettingsTab.tsx +++ b/src/components/views/settings/tabs/SettingsTab.tsx @@ -7,7 +7,6 @@ Please see LICENSE files in the repository root for full details. */ import React, { type HTMLAttributes } from "react"; import classNames from "classnames"; -import { Form } from "@vector-im/compound-web"; export interface SettingsTabProps extends HTMLAttributes { children?: React.ReactNode; @@ -37,7 +36,6 @@ export interface SettingsTabProps extends HTMLAttributes { */ const SettingsTab: React.FC = ({ children, className, ...rest }) => (
- {/* Prevent settings from doing any accidental submits. */}
{children}
); diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx index 18d7693038..4b04e4bcf3 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx @@ -8,6 +8,7 @@ Please see LICENSE files in the repository root for full details. import React, { type ContextType } from "react"; import { type Room } from "matrix-js-sdk/src/matrix"; import { KnownMembership } from "matrix-js-sdk/src/types"; +import { Form } from "@vector-im/compound-web"; import { _t } from "../../../../../languageHandler"; import RoomProfileSettings from "../../../room_settings/RoomProfileSettings"; @@ -23,7 +24,6 @@ import SettingsTab from "../SettingsTab"; import { SettingsSection } from "../../shared/SettingsSection"; import { UrlPreviewSettings } from "../../../room_settings/UrlPreviewSettings"; import { MediaPreviewAccountSettings } from "../user/MediaPreviewAccountSettings"; -import { Form } from "@vector-im/compound-web"; interface IProps { room: Room; @@ -79,7 +79,12 @@ export default class GeneralRoomSettingsTab extends React.Component - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index 9f434cb4b6..43bd88aa33 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -446,35 +446,40 @@ export default class SecurityRoomSettingsTab extends React.Component - {evt.preventDefault(); evt.stopPropagation();}}> - { + evt.preventDefault(); + evt.stopPropagation(); + }} > - {isEncryptionLoading ? ( - - ) : ( - <> - - {isEncryptionForceDisabled && !isEncrypted && ( - {_t("room_settings|security|encryption_forced")} - )} - {encryptionSettings} - - )} - - {this.renderJoinRule()} - {historySection} + + {isEncryptionLoading ? ( + + ) : ( + <> + + {isEncryptionForceDisabled && !isEncrypted && ( + {_t("room_settings|security|encryption_forced")} + )} + {encryptionSettings} + + )} + + {this.renderJoinRule()} + {historySection} diff --git a/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx index b314b0a84d..06a5d89b74 100644 --- a/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx @@ -76,6 +76,7 @@ const ElementCallSwitch: React.FC = ({ room }) => { return ( = ({ room }) => { return ( - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx index 489d1a2e87..c896b62697 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx @@ -9,6 +9,7 @@ Please see LICENSE files in the repository root for full details. import React, { type ChangeEvent, type ReactNode } from "react"; import { type EmptyObject } from "matrix-js-sdk/src/matrix"; +import { Form } from "@vector-im/compound-web"; import { _t } from "../../../../../languageHandler"; import SettingsStore from "../../../../../settings/SettingsStore"; @@ -24,7 +25,6 @@ import ImageSizePanel from "../../ImageSizePanel"; import SettingsTab from "../SettingsTab"; import { SettingsSection } from "../../shared/SettingsSection"; import { SettingsSubsection } from "../../shared/SettingsSubsection"; -import { Form } from "@vector-im/compound-web"; interface IState { useBundledEmojiFont: boolean; @@ -103,7 +103,12 @@ export default class AppearanceUserSettingsTab extends React.Component - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > diff --git a/src/components/views/settings/tabs/user/InviteRulesAccountSettings.tsx b/src/components/views/settings/tabs/user/InviteRulesAccountSettings.tsx index 0ee0be2a5b..a16cceb7c1 100644 --- a/src/components/views/settings/tabs/user/InviteRulesAccountSettings.tsx +++ b/src/components/views/settings/tabs/user/InviteRulesAccountSettings.tsx @@ -32,7 +32,13 @@ export const InviteRulesAccountSetting: FC = () => { } }, []); return ( - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > { return SdkConfig.get("show_labs_settings") || SettingsStore.getValue("developerMode"); @@ -107,38 +107,43 @@ export default class LabsUserSettingsTab extends React.Component { return ( - {evt.preventDefault(); evt.stopPropagation();}}> - - - {_t("labs|beta_description", { brand: SdkConfig.get("brand") })} - - {betaSection} - - - {labsSections && ( - + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > + - {_t( - "labs|experimental_description", - {}, - { - a: (sub) => { - return ( - - {sub} - - ); - }, - }, - )} + {_t("labs|beta_description", { brand: SdkConfig.get("brand") })} - {labsSections} + {betaSection} - )} + + {labsSections && ( + + + {_t( + "labs|experimental_description", + {}, + { + a: (sub) => { + return ( + + {sub} + + ); + }, + }, + )} + + {labsSections} + + )} ); diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx index c1cb7674f5..448e33464d 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx @@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details. */ import React, { type ChangeEventHandler, type JSX, type ReactElement, useCallback, useEffect, useState } from "react"; -import { Form, SettingsToggleControl } from "@vector-im/compound-web"; +import { Form, SettingsToggleInput } from "@vector-im/compound-web"; import { type NonEmptyArray } from "../../../../../@types/common"; import { _t, getCurrentLanguage } from "../../../../../languageHandler"; @@ -105,12 +105,14 @@ const SpellCheckSection: React.FC = () => { return ( <> - + + + {spellCheckEnabled && spellCheckLanguages !== undefined && !IS_MAC && ( )} @@ -258,15 +260,13 @@ export default class PreferencesUserSettingsTab extends React.Component - {evt.preventDefault(); evt.stopPropagation();}}> {/* The heading string is still 'general' from where it was moved, but this section should become 'general' */} - - + {this.renderGroup(PreferencesUserSettingsTab.ROOM_LIST_SETTINGS)} {/* The settings is on device level where the other room list settings are on account level */} {newRoomListEnabled && ( @@ -274,12 +274,13 @@ export default class PreferencesUserSettingsTab extends React.Component - + {this.renderGroup(PreferencesUserSettingsTab.SPACES_SETTINGS, SettingLevel.ACCOUNT)} - +
{_t("settings|preferences|user_timezone")} {this.renderGroup(PreferencesUserSettingsTab.PRESENCE_SETTINGS)} - + {this.renderGroup(PreferencesUserSettingsTab.COMPOSER_SETTINGS)} - + {this.renderGroup(PreferencesUserSettingsTab.CODE_BLOCKS_SETTINGS)} - + {this.renderGroup(PreferencesUserSettingsTab.IMAGES_AND_VIDEOS_SETTINGS)} - + {this.renderGroup(PreferencesUserSettingsTab.TIMELINE_SETTINGS)} - + - + {this.renderGroup(PreferencesUserSettingsTab.ROOM_DIRECTORY_SETTINGS)} - + {this.renderGroup(PreferencesUserSettingsTab.GENERAL_SETTINGS)} @@ -391,7 +393,6 @@ export default class PreferencesUserSettingsTab extends React.Component - ); } diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx index e8d645c6a1..e17a6be227 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx @@ -11,6 +11,7 @@ import { sleep } from "matrix-js-sdk/src/utils"; import { type Room, RoomEvent, type IServerVersions } from "matrix-js-sdk/src/matrix"; import { KnownMembership, type Membership } from "matrix-js-sdk/src/types"; import { logger } from "matrix-js-sdk/src/logger"; +import { Form } from "@vector-im/compound-web"; import { _t } from "../../../../../languageHandler"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; @@ -32,7 +33,6 @@ import { SettingsSubsection, SettingsSubsectionText } from "../../shared/Setting import { useOwnDevices } from "../../devices/useOwnDevices"; import { DiscoverySettings } from "../../discovery/DiscoverySettings"; import SetIntegrationManager from "../../SetIntegrationManager"; -import { Form } from "@vector-im/compound-web"; interface IIgnoredUserProps { userId: string; @@ -356,21 +356,31 @@ export default class SecurityUserSettingsTab extends React.Component - {warning} - - {evt.preventDefault(); evt.stopPropagation();}}> - - {secureBackup} - {eventIndex} - - - - - {evt.preventDefault(); evt.stopPropagation();}}> - {posthogSection} - + {warning} + + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > + + {secureBackup} + {eventIndex} - {advancedSection} + + + + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > + {posthogSection} + + + {advancedSection} ); } diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx index bf1c80ba50..b1b47788a5 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx @@ -187,7 +187,12 @@ export default class VoiceUserSettingsTab extends React.Component - {evt.preventDefault(); evt.stopPropagation();}}> + { + evt.preventDefault(); + evt.stopPropagation(); + }} + > {requestButton} diff --git a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx index ebf550f1bf..a148608790 100644 --- a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx +++ b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx @@ -108,17 +108,15 @@ const SpaceSettingsVisibilityTab: React.FC = ({ matrixClient: cli, space {showAdvancedSection && ( -
- -
+ )}
); @@ -158,29 +156,32 @@ const SpaceSettingsVisibilityTab: React.FC = ({ matrixClient: cli, space onError={(): void => setError(_t("room_settings|visibility|error_failed_save"))} closeSettingsFn={closeSettingsFn} /> - {advancedSection} -
- {evt.preventDefault(); evt.stopPropagation();}}> - { - setHistoryVisibility( - evt.target.checked ? HistoryVisibility.WorldReadable : HistoryVisibility.Shared, - ); - }} - helpMessage={_t("room_settings|visibility|history_visibility_anyone_space_description")} - disabled={!canSetHistoryVisibility} - disabledMessage={_t("room_settings|visibility|history_visibility_anyone_space_disabled")} - label={_t("room_settings|visibility|history_visibility_anyone_space")} - /> -

- - {_t("room_settings|visibility|history_visibility_anyone_space_recommendation")} - -

-
-
+ { + evt.preventDefault(); + evt.stopPropagation(); + }} + > + {advancedSection} + { + setHistoryVisibility( + evt.target.checked ? HistoryVisibility.WorldReadable : HistoryVisibility.Shared, + ); + }} + helpMessage={_t("room_settings|visibility|history_visibility_anyone_space_description")} + disabled={!canSetHistoryVisibility} + disabledMessage={_t("room_settings|visibility|history_visibility_anyone_space_disabled")} + label={_t("room_settings|visibility|history_visibility_anyone_space")} + /> +

+ + {_t("room_settings|visibility|history_visibility_anyone_space_recommendation")} + +

+
{addressesSection}