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

Commit

Permalink
Improve security room settings tab style rules (#8844)
Browse files Browse the repository at this point in the history
* Fix position of 'Show Advanced' on security room settings tab

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use flex to ensure alignment of the warning icon and message

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove an obsolete style block

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* yarn run lint:style --fix

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Jul 5, 2022
1 parent bdc05ec commit f45e8ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
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 {
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

0 comments on commit f45e8ad

Please sign in to comment.