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

Commit f45e8ad

Browse files
authored
Improve security room settings tab style rules (#8844)
* Fix position of 'Show Advanced' on security room settings tab Signed-off-by: Suguru Hirahara <[email protected]> * Use flex to ensure alignment of the warning icon and message Signed-off-by: Suguru Hirahara <[email protected]> * Remove an obsolete style block Signed-off-by: Suguru Hirahara <[email protected]> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <[email protected]>
1 parent bdc05ec commit f45e8ad

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,12 @@ limitations under the License.
1616

1717
.mx_SecurityRoomSettingsTab {
1818
.mx_SettingsTab_showAdvanced {
19-
padding: 0;
20-
margin-bottom: 16px;
19+
margin-bottom: $spacing-16;
2120
}
22-
}
23-
24-
.mx_SecurityRoomSettingsTab_warning {
25-
display: block;
2621

27-
img {
28-
vertical-align: middle;
29-
margin-right: 5px;
30-
margin-left: 3px;
31-
margin-bottom: 5px;
22+
.mx_SecurityRoomSettingsTab_warning {
23+
display: flex;
24+
align-items: center;
25+
column-gap: $spacing-4;
3226
}
3327
}
34-
35-
.mx_SecurityRoomSettingsTab_encryptionSection {
36-
padding-bottom: 24px;
37-
border-bottom: 1px solid $quinary-content;
38-
margin-bottom: 32px;
39-
}

src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
355355
const state = client.getRoom(this.props.roomId).currentState;
356356
const canSetGuestAccess = state.mayClientSendStateEvent(EventType.RoomGuestAccess, client);
357357

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

372372
render() {
@@ -391,7 +391,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
391391
let advanced;
392392
if (room.getJoinRule() === JoinRule.Public) {
393393
advanced = (
394-
<>
394+
<div className="mx_SettingsTab_section">
395395
<AccessibleButton
396396
onClick={this.toggleAdvancedSection}
397397
kind="link"
@@ -400,7 +400,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
400400
{ this.state.showAdvancedSection ? _t("Hide advanced") : _t("Show advanced") }
401401
</AccessibleButton>
402402
{ this.state.showAdvancedSection && this.renderAdvanced() }
403-
</>
403+
</div>
404404
);
405405
}
406406

0 commit comments

Comments
 (0)