mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Recognise server notices room(s)
and put them in their own section at the bottom
This commit is contained in:
parent
eb47abc055
commit
b5ce1ac5e1
3 changed files with 16 additions and 1 deletions
|
@ -35,7 +35,7 @@ import RoomListStore from '../../../stores/RoomListStore';
|
|||
import GroupStore from '../../../stores/GroupStore';
|
||||
|
||||
const HIDE_CONFERENCE_CHANS = true;
|
||||
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
||||
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority|server_notice)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
||||
|
||||
function phraseForSection(section) {
|
||||
switch (section) {
|
||||
|
@ -737,6 +737,18 @@ module.exports = React.createClass({
|
|||
searchFilter={self.props.searchFilter}
|
||||
onShowMoreRooms={self.onShowMoreRooms}
|
||||
showEmpty={showEmpty} />
|
||||
|
||||
<RoomSubList list={self.state.lists['m.server_notice']}
|
||||
label={_t('System Alerts')}
|
||||
tagName="m.lowpriority"
|
||||
editable={false}
|
||||
order="recent"
|
||||
incomingCall={self.state.incomingCall}
|
||||
collapsed={self.props.collapsed}
|
||||
searchFilter={self.props.searchFilter}
|
||||
onHeaderClick={self.onSubListHeaderClick}
|
||||
onShowMoreRooms={self.onShowMoreRooms}
|
||||
showEmpty={false} />
|
||||
</div>
|
||||
</GeminiScrollbarWrapper>
|
||||
);
|
||||
|
|
|
@ -464,6 +464,7 @@
|
|||
"People": "People",
|
||||
"Rooms": "Rooms",
|
||||
"Low priority": "Low priority",
|
||||
"System Alerts": "System Alerts",
|
||||
"You have no historical rooms": "You have no historical rooms",
|
||||
"Historical": "Historical",
|
||||
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
|
||||
|
|
|
@ -45,6 +45,7 @@ class RoomListStore extends Store {
|
|||
// Initialise state
|
||||
this._state = {
|
||||
lists: {
|
||||
"m.server_notice": [],
|
||||
"im.vector.fake.invite": [],
|
||||
"m.favourite": [],
|
||||
"im.vector.fake.recent": [],
|
||||
|
@ -158,6 +159,7 @@ class RoomListStore extends Store {
|
|||
|
||||
_generateRoomLists(optimisticRequest) {
|
||||
const lists = {
|
||||
"m.server_notice": [],
|
||||
"im.vector.fake.invite": [],
|
||||
"m.favourite": [],
|
||||
"im.vector.fake.recent": [],
|
||||
|
|
Loading…
Reference in a new issue