This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 819
Notification settings UI refresh #6352
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
59e48ee
Convert NotificationUserSettingsTab to TS
turt2live 436563b
Change label on notification dropdown for a room
turt2live 5a834fb
Convert Spinner to TS
turt2live 9556b61
Crude conversion of Notifications.js to TS + cut out legacy code
turt2live 5b9fca3
Migrate to js-sdk types for push rules
turt2live 0e749e3
Clarify that vectorState is a VectorState
turt2live fd5a36f
Fix more types around notifications
turt2live 3ae76c8
Add a simple TagComposer for the keywords entry
turt2live ff7a18d
Rewrite Notifications component for modern UI & processing
turt2live 4444ccb
Appease the linter
turt2live 9d60d29
Clean up i18n
turt2live 8278b22
Copy over the whole feature of changing the state for keywords entirely
turt2live 2690bb5
Remove code we don't seem to need
turt2live 942cadc
Merge branch 'develop' into travis/notifications-2
turt2live 60bcdd3
Fix types from js-sdk
turt2live d2de9b4
Apply suggestions from code review
turt2live e3e7d94
Remove useless spread operator
turt2live File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
Copyright 2021 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
.mx_TagComposer { | ||
.mx_TagComposer_input { | ||
display: flex; | ||
|
||
.mx_Field { | ||
flex: 1; | ||
margin: 0; // override from field styles | ||
} | ||
|
||
.mx_AccessibleButton { | ||
min-width: 70px; | ||
padding: 0; // override from button styles | ||
margin-left: 16px; // distance from <Field> | ||
} | ||
|
||
.mx_Field, .mx_Field input, .mx_AccessibleButton { | ||
// So they look related to each other by feeling the same | ||
border-radius: 8px; | ||
} | ||
} | ||
|
||
.mx_TagComposer_tags { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin-top: 12px; // this plus 12px from the tags makes 24px from the input | ||
|
||
.mx_TagComposer_tag { | ||
padding: 6px 8px 8px 12px; | ||
position: relative; | ||
margin-right: 12px; | ||
margin-top: 12px; | ||
|
||
// Cheaty way to get an opacified variable colour background | ||
&::before { | ||
content: ''; | ||
border-radius: 20px; | ||
background-color: $tertiary-fg-color; | ||
opacity: 0.15; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
|
||
// Pass through the pointer otherwise we have effectively put a whole div | ||
// on top of the component, which makes it hard to interact with buttons. | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.mx_AccessibleButton { | ||
background-image: url('$(res)/img/subtract.svg'); | ||
width: 16px; | ||
height: 16px; | ||
margin-left: 8px; | ||
display: inline-block; | ||
vertical-align: middle; | ||
cursor: pointer; | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright 2015-2021 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from "react"; | ||
import { _t } from "../../../languageHandler"; | ||
|
||
interface IProps { | ||
w?: number; | ||
h?: number; | ||
message?: string; | ||
} | ||
|
||
export default class Spinner extends React.PureComponent<IProps> { | ||
public static defaultProps: Partial<IProps> = { | ||
w: 32, | ||
h: 32, | ||
}; | ||
|
||
public render() { | ||
const { w, h, message } = this.props; | ||
return ( | ||
<div className="mx_Spinner"> | ||
{ message && <React.Fragment><div className="mx_Spinner_Msg">{ message }</div> </React.Fragment> } | ||
<div | ||
className="mx_Spinner_icon" | ||
style={{ width: w, height: h }} | ||
aria-label={_t("Loading...")} | ||
/> | ||
</div> | ||
); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.