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

Improve security room settings tab style rules #8844

Merged
merged 6 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
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
22 changes: 5 additions & 17 deletions res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,12 @@ limitations under the License.

.mx_SecurityRoomSettingsTab {
.mx_SettingsTab_showAdvanced {
padding: 0;
margin-bottom: 16px;
margin-bottom: $spacing-16;
}
}

.mx_SecurityRoomSettingsTab_warning {
display: block;

img {
vertical-align: middle;
margin-right: 5px;
margin-left: 3px;
margin-bottom: 5px;
.mx_SecurityRoomSettingsTab_warning {
display: flex;
align-items: center;
column-gap: $spacing-4;
}
}

.mx_SecurityRoomSettingsTab_encryptionSection {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

padding-bottom: 24px;
border-bottom: 1px solid $quinary-content;
margin-bottom: 32px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
const state = client.getRoom(this.props.roomId).currentState;
const canSetGuestAccess = state.mayClientSendStateEvent(EventType.RoomGuestAccess, client);

return <div className="mx_SettingsTab_section">
return <>
<LabelledToggleSwitch
value={guestAccess === GuestAccess.CanJoin}
onChange={this.onGuestAccessChange}
Expand All @@ -366,7 +366,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
{ _t("People with supported clients will be able to join " +
"the room without having a registered account.") }
</p>
</div>;
</>;
}

render() {
Expand All @@ -391,7 +391,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
let advanced;
if (room.getJoinRule() === JoinRule.Public) {
advanced = (
<>
<div className="mx_SettingsTab_section">
<AccessibleButton
onClick={this.toggleAdvancedSection}
kind="link"
Expand All @@ -400,7 +400,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
{ this.state.showAdvancedSection ? _t("Hide advanced") : _t("Show advanced") }
</AccessibleButton>
{ this.state.showAdvancedSection && this.renderAdvanced() }
</>
</div>
);
}

Expand Down