mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:35:04 +08:00
Merge pull request #1753 from matrix-org/luke/fix-room-list-drop-target-bg
Give emptySubListTip a container for correct bg colour
This commit is contained in:
commit
3552800d19
@ -544,17 +544,20 @@ module.exports = React.createClass({
|
|||||||
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
|
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
|
||||||
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
|
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
|
||||||
|
|
||||||
|
let tip = null;
|
||||||
|
|
||||||
switch (section) {
|
switch (section) {
|
||||||
case 'im.vector.fake.direct':
|
case 'im.vector.fake.direct':
|
||||||
return <div className="mx_RoomList_emptySubListTip">
|
tip = <div className="mx_RoomList_emptySubListTip">
|
||||||
{ _t(
|
{ _t(
|
||||||
"Press <StartChatButton> to start a chat with someone",
|
"Press <StartChatButton> to start a chat with someone",
|
||||||
{},
|
{},
|
||||||
{ 'StartChatButton': <StartChatButton size="16" callout={true} /> },
|
{ 'StartChatButton': <StartChatButton size="16" callout={true} /> },
|
||||||
) }
|
) }
|
||||||
</div>;
|
</div>;
|
||||||
|
break;
|
||||||
case 'im.vector.fake.recent':
|
case 'im.vector.fake.recent':
|
||||||
return <div className="mx_RoomList_emptySubListTip">
|
tip = <div className="mx_RoomList_emptySubListTip">
|
||||||
{ _t(
|
{ _t(
|
||||||
"You're not in any rooms yet! Press <CreateRoomButton> to make a room or"+
|
"You're not in any rooms yet! Press <CreateRoomButton> to make a room or"+
|
||||||
" <RoomDirectoryButton> to browse the directory",
|
" <RoomDirectoryButton> to browse the directory",
|
||||||
@ -565,6 +568,13 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
) }
|
) }
|
||||||
</div>;
|
</div>;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tip) {
|
||||||
|
return <div className="mx_RoomList_emptySubListTip_container">
|
||||||
|
{ tip }
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't want to display drop targets if there are no room tiles to drag'n'drop
|
// We don't want to display drop targets if there are no room tiles to drag'n'drop
|
||||||
|
Loading…
Reference in New Issue
Block a user