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

Commit 618be34

Browse files
committed
wip: implement new notification settings
1 parent e6cddcb commit 618be34

21 files changed

+1441
-10
lines changed

res/css/_components.pcss

+2
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@
323323
@import "./views/settings/_KeyboardShortcut.pcss";
324324
@import "./views/settings/_LayoutSwitcher.pcss";
325325
@import "./views/settings/_Notifications.pcss";
326+
@import "./views/settings/_Notifications2.pcss";
326327
@import "./views/settings/_PhoneNumbers.pcss";
327328
@import "./views/settings/_ProfileSettings.pcss";
328329
@import "./views/settings/_SecureBackupPanel.pcss";
@@ -332,6 +333,7 @@
332333
@import "./views/settings/_SpellCheckLanguages.pcss";
333334
@import "./views/settings/_ThemeChoicePanel.pcss";
334335
@import "./views/settings/_UpdateCheckButton.pcss";
336+
@import "./views/settings/tabs/_SettingsIndent.pcss";
335337
@import "./views/settings/tabs/_SettingsSection.pcss";
336338
@import "./views/settings/tabs/_SettingsTab.pcss";
337339
@import "./views/settings/tabs/room/_NotificationSettingsTab.pcss";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.mx_Notifications2 {
2+
.mx_SettingsSection_subSections {
3+
color: #17191c;
4+
gap: 32px;
5+
display: flex;
6+
flex-direction: column;
7+
}
8+
9+
.mx_Notifications2_banner {
10+
background: #F4F8FF;
11+
line-height: 2.25rem;
12+
border-radius: 8px;
13+
padding: 12px 16px;
14+
gap: 12px;
15+
display: flex;
16+
flex-direction: row;
17+
align-items: center;
18+
19+
p {
20+
margin: 0;
21+
}
22+
23+
.mx_AccessibleButton {
24+
align-self: initial;
25+
white-space: nowrap;
26+
}
27+
}
28+
29+
.mx_Notifications2_list {
30+
display: flex;
31+
flex-direction: column;
32+
gap: 12px;
33+
34+
.mx_SettingsFlag {
35+
margin: 0;
36+
}
37+
}
38+
39+
.mx_SettingsSubsection_description .mx_SettingsSubsection_text {
40+
font-size: 1.2rem;
41+
42+
.mx_NotificationBadge {
43+
vertical-align: bottom;
44+
display: inline-flex;
45+
margin: 0 2px;
46+
}
47+
}
48+
49+
.mx_SettingsSubsection_content {
50+
margin-top: 12px;
51+
grid-gap: 12px;
52+
justify-items: stretch;
53+
justify-content: stretch;
54+
}
55+
56+
.mx_StyledRadioButton_content {
57+
margin-left: 10px;
58+
margin-right: 10px;
59+
}
60+
61+
.mx_Notifications2_CombinedInput {
62+
display: flex;
63+
flex-direction: row;
64+
}
65+
66+
.mx_TagComposer {
67+
margin-top: 16px;
68+
69+
&.mx_TagComposer_disabled {
70+
opacity: 0.7;
71+
}
72+
73+
.mx_TagComposer_tags {
74+
margin-top: 16px;
75+
gap: 8px;
76+
77+
.mx_Tag {
78+
border-radius: 18px;
79+
line-height: 2.4rem;
80+
padding: 6px 12px;
81+
background: rgba(141, 151, 165, 0.15);
82+
margin: 0;
83+
84+
.mx_Tag_delete {
85+
background: #8D97A5;
86+
color: #fff;
87+
align-self: initial;
88+
}
89+
}
90+
}
91+
}
92+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Copyright 2023 New Vector Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
.mx_SettingsIndent {
17+
padding-left: 16px;
18+
display: flex;
19+
flex-direction: column;
20+
gap: 12px;
21+
}

src/components/views/elements/TagComposer.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
import classNames from "classnames";
1718
import React, { ChangeEvent, FormEvent } from "react";
1819

1920
import Field from "./Field";
@@ -67,7 +68,11 @@ export default class TagComposer extends React.PureComponent<IProps, IState> {
6768

6869
public render(): React.ReactNode {
6970
return (
70-
<div className="mx_TagComposer">
71+
<div
72+
className={classNames("mx_TagComposer", {
73+
mx_TagComposer_disabled: this.props.disabled,
74+
})}
75+
>
7176
<form className="mx_TagComposer_input" onSubmit={this.onAdd}>
7277
<Field
7378
value={this.state.newTag}

0 commit comments

Comments
 (0)