diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 4ca3dded9c..d2b36cf4e1 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -26,9 +26,16 @@ var rate_limited_func = require('matrix-react-sdk/lib/ratelimitedfunc'); module.exports = React.createClass({ displayName: 'RightPanel', + propTypes: { + userId: React.PropTypes.string, // if showing an orphaned MemberInfo page, this is set + roomId: React.PropTypes.string, // if showing panels for a given room, this is set + collapsed: React.PropTypes.bool, + }, + Phase : { MemberList: 'MemberList', - FileList: 'FileList', + FilePanel: 'FilePanel', + NotificationPanel: 'NotificationPanel', MemberInfo: 'MemberInfo', }, @@ -61,7 +68,7 @@ module.exports = React.createClass({ }, onMemberListButtonClick: function() { - if (this.props.collapsed) { + if (this.props.collapsed || this.state.phase !== this.Phase.MemberList) { this.setState({ phase: this.Phase.MemberList }); dis.dispatch({ action: 'show_right_panel', @@ -74,6 +81,34 @@ module.exports = React.createClass({ } }, + onFileListButtonClick: function() { + if (this.props.collapsed || this.state.phase !== this.Phase.FilePanel) { + this.setState({ phase: this.Phase.FilePanel }); + dis.dispatch({ + action: 'show_right_panel', + }); + } + else { + dis.dispatch({ + action: 'hide_right_panel', + }); + } + }, + + onNotificationListButtonClick: function() { + if (this.props.collapsed || this.state.phase !== this.Phase.NotificationPanel) { + this.setState({ phase: this.Phase.NotificationPanel }); + dis.dispatch({ + action: 'show_right_panel', + }); + } + else { + dis.dispatch({ + action: 'hide_right_panel', + }); + } + }, + onRoomStateMember: function(ev, state, member) { // redraw the badge on the membership list if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) { @@ -118,19 +153,25 @@ module.exports = React.createClass({ render: function() { var MemberList = sdk.getComponent('rooms.MemberList'); + var NotificationPanel = sdk.getComponent('structures.NotificationPanel'); + var FilePanel = sdk.getComponent('structures.FilePanel'); var TintableSvg = sdk.getComponent("elements.TintableSvg"); var buttonGroup; var panel; var filesHighlight; var membersHighlight; + var notificationsHighlight; if (!this.props.collapsed) { if (this.state.phase == this.Phase.MemberList || this.state.phase === this.Phase.MemberInfo) { membersHighlight =
; } - else if (this.state.phase == this.Phase.FileList) { + else if (this.state.phase == this.Phase.FilePanel) { filesHighlight =
; } + else if (this.state.phase == this.Phase.NotificationPanel) { + notificationsHighlight =
; + } } var membersBadge; @@ -138,7 +179,7 @@ module.exports = React.createClass({ var cli = MatrixClientPeg.get(); var room = cli.getRoom(this.props.roomId); if (room) { - membersBadge =
{ room.getJoinedMembers().length }
; + membersBadge = room.getJoinedMembers().length; } } @@ -146,14 +187,20 @@ module.exports = React.createClass({ buttonGroup =
- { membersBadge } +
{ membersBadge ? membersBadge :  }
{ membersHighlight }
-
- +
+
 
+ { filesHighlight }
+
+
 
+ + { notificationsHighlight } +
; } @@ -165,6 +212,12 @@ module.exports = React.createClass({ var MemberInfo = sdk.getComponent('rooms.MemberInfo'); panel = } + else if (this.state.phase == this.Phase.NotificationPanel) { + panel = + } + else if (this.state.phase == this.Phase.FilePanel) { + panel = + } } if (!panel) { diff --git a/src/skins/vector/css/hide.css b/src/skins/vector/css/hide.css deleted file mode 100644 index f84a35b313..0000000000 --- a/src/skins/vector/css/hide.css +++ /dev/null @@ -1,6 +0,0 @@ -.mx_RoomSettings_encrypt, -.mx_CreateRoom_encrypt, -.mx_RightPanel_filebutton -{ - display: none !important; -} diff --git a/src/skins/vector/css/matrix-react-sdk/structures/FilePanel.css b/src/skins/vector/css/matrix-react-sdk/structures/FilePanel.css new file mode 100644 index 0000000000..2d2fe31c85 --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/structures/FilePanel.css @@ -0,0 +1,118 @@ +/* +Copyright 2016 OpenMarket Ltd + +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_FilePanel { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; + + -webkit-flex: 1 1 0; + flex: 1 1 0; + + width: 100%; + + overflow-y: auto; +} + +.mx_FilePanel .mx_RoomView_messageListWrapper { + margin-right: 20px; +} + +.mx_FilePanel .mx_RoomView_MessageList h2 { + display: none; +} + +/* FIXME: rather than having EventTile's default CSS be for MessagePanel, + we should make EventTile a base CSS class and customise it specifically + for usage in {Message,File,Notification}Panel. */ + +.mx_FilePanel .mx_EventTile_avatar { + display: none; +} + +/* Overrides for the attachment body tiles */ + +.mx_FilePanel .mx_EventTile .mx_MImageBody { + margin-right: 0px; +} + +.mx_FilePanel .mx_EventTile .mx_MImageBody_download { + display: flex; + font-size: 14px; + color: #acacac; +} + +.mx_FilePanel .mx_EventTile .mx_MImageBody_downloadLink { + flex: 1 1 auto; + color: #747474; + word-wrap: break-word; +} + +.mx_FilePanel .mx_EventTile .mx_MImageBody_size { + flex: 1 0 0; + font-size: 11px; + text-align: right; + white-space: nowrap; +} + +/* Overides for the sender details line */ + +.mx_FilePanel .mx_EventTile_senderDetails { + display: flex; + margin-top: -2px; +} + +.mx_FilePanel .mx_EventTile_senderDetailsLink { + text-decoration: none; +} + +.mx_FilePanel .mx_EventTile .mx_SenderProfile { + flex: 1 1 auto; + line-height: initial; + padding: 0px; + font-size: 11px; + opacity: 1.0; + color: #acacac; + word-wrap: break-word; +} + +.mx_FilePanel .mx_EventTile .mx_MessageTimestamp { + flex: 1 0 0; + text-align: right; + visibility: visible; + position: initial; + font-size: 11px; + opacity: 1.0; + color: #acacac; +} + +/* Overrides for the wrappers around the body tile */ + +.mx_FilePanel .mx_EventTile_line { + margin-right: 0px; + padding-left: 0px; +} + +.mx_FilePanel .mx_EventTile:hover .mx_EventTile_line { + background-color: #fff; +} + +.mx_FilePanel .mx_EventTile_selected .mx_EventTile_line { + padding-left: 0px; +} + diff --git a/src/skins/vector/css/matrix-react-sdk/structures/NotificationPanel.css b/src/skins/vector/css/matrix-react-sdk/structures/NotificationPanel.css new file mode 100644 index 0000000000..36d62a8177 --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/structures/NotificationPanel.css @@ -0,0 +1,104 @@ +/* +Copyright 2015, 2016 OpenMarket Ltd + +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_NotificationPanel { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; + + -webkit-flex: 1 1 0; + flex: 1 1 0; + + width: 100%; + + overflow-y: auto; +} + +.mx_NotificationPanel .mx_RoomView_messageListWrapper { + margin-right: 20px; +} + +.mx_NotificationPanel .mx_RoomView_MessageList h2 { + margin-left: 0px; +} + +/* FIXME: rather than having EventTile's default CSS be for MessagePanel, + we should make EventTile a base CSS class and customise it specifically + for usage in {Message,File,Notification}Panel. */ + +.mx_NotificationPanel .mx_EventTile_roomName { + font-weight: bold; + font-size: 14px; + word-wrap: break-word; +} + +.mx_NotificationPanel .mx_EventTile_roomName a { + color: #4a4a4a; +} + +.mx_NotificationPanel .mx_EventTile_avatar { + top: 8px; + left: 0px; +} + +.mx_NotificationPanel .mx_EventTile .mx_SenderProfile, +.mx_NotificationPanel .mx_EventTile .mx_MessageTimestamp { + color: #000; + opacity: 0.3; + font-size: 12px; + display: inline; + padding-left: 0px; + word-wrap: break-word; +} + +.mx_NotificationPanel .mx_EventTile_senderDetails { + padding-left: 32px; + padding-top: 8px; + position: relative; +} + +.mx_NotificationPanel .mx_EventTile_roomName a, +.mx_NotificationPanel .mx_EventTile_senderDetails a { + text-decoration: none ! important; +} + +.mx_NotificationPanel .mx_EventTile .mx_MessageTimestamp { + visibility: visible; + position: initial; + display: inline; +} + +.mx_NotificationPanel .mx_EventTile_line { + margin-right: 0px; + padding-left: 32px; + padding-top: 0px; + padding-bottom: 0px; + padding-right: 0px; +} + +.mx_NotificationPanel .mx_EventTile:hover .mx_EventTile_line { + background-color: #fff; +} + +.mx_NotificationPanel .mx_EventTile_selected .mx_EventTile_line { + padding-left: 0px; +} + +.mx_NotificationPanel .mx_EventTile_content { + margin-right: 0px; +} \ No newline at end of file diff --git a/src/skins/vector/css/matrix-react-sdk/views/dialogs/EncryptedEventDialog.css b/src/skins/vector/css/matrix-react-sdk/views/dialogs/EncryptedEventDialog.css new file mode 100644 index 0000000000..5e72d7f8bf --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/views/dialogs/EncryptedEventDialog.css @@ -0,0 +1,39 @@ +/* +Copyright 2016 OpenMarket Ltd + +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_EncryptedEventDialog .mx_MemberDeviceInfo { + float: right; + padding: 0px; + margin-right: 42px; +} + +.mx_EncryptedEventDialog .mx_MemberDeviceInfo_textButton { + border: 0px; + height: 36px; + border-radius: 40px; + border: solid 1px #76cfa6; + font-weight: 600; + font-size: 14px; + font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; + margin-left: 0px; + margin-right: 8px; + padding-left: 1.5em; + padding-right: 1.5em; + outline: none; + cursor: pointer; + color: #76cfa6; + background-color: #fff; +} \ No newline at end of file diff --git a/src/skins/vector/css/matrix-react-sdk/views/messages/MImageBody.css b/src/skins/vector/css/matrix-react-sdk/views/messages/MImageBody.css index 0b43a81b09..1134f2f6ff 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/messages/MImageBody.css +++ b/src/skins/vector/css/matrix-react-sdk/views/messages/MImageBody.css @@ -30,7 +30,6 @@ limitations under the License. .mx_MImageBody_download { color: #76cfa6; - cursor: pointer; } .mx_MImageBody_download a { diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css index 432bdc2851..fd3f486b7d 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css @@ -36,21 +36,13 @@ limitations under the License. .mx_EventTile.mx_EventTile_info .mx_EventTile_avatar { top: 8px; - left: 44px; + left: 65px; } .mx_EventTile_continuation { padding-top: 0px ! important; } -.mx_EventTile_verified { - background-color: #eaf5f0; -} - -.mx_EventTile_unverified { - background-color: #ffa0a0; -} - .mx_EventTile .mx_SenderProfile { color: #454545; opacity: 0.5; @@ -87,6 +79,10 @@ limitations under the License. line-height: 22px; } +.mx_EventTile_info .mx_EventTile_line { + padding-left: 83px; +} + /* HACK to override line-height which is already marked important elsewhere */ .mx_EventTile_bigEmoji.mx_EventTile_bigEmoji { font-size: 48px ! important; @@ -122,6 +118,10 @@ limitations under the License. color: #fff; } +.mx_EventTile_encrypting { + color: #abddbc ! important; +} + .mx_EventTile_sending { color: #ddd; } @@ -227,6 +227,46 @@ limitations under the License. overflow-y: hidden; } +/* End to end encryption stuff */ + +.mx_EventTile_e2eIcon { + display: block; + position: absolute; + top: 9px; + left: 46px; + z-index: 2; + cursor: pointer; +} + +.mx_EventTile:hover.mx_EventTile_verified .mx_EventTile_line, +.mx_EventTile:hover.mx_EventTile_unverified .mx_EventTile_line { + padding-left: 60px; +} + +.mx_EventTile:hover.mx_EventTile_verified .mx_EventTile_line { + border-left: #76cfa5 5px solid; +} +.mx_EventTile:hover.mx_EventTile_unverified .mx_EventTile_line { + border-left: #e8bf37 5px solid; +} + +.mx_EventTile:hover.mx_EventTile_verified .mx_MessageTimestamp, +.mx_EventTile:hover.mx_EventTile_unverified .mx_MessageTimestamp { + left: 3px; +} + +/* +.mx_EventTile_verified .mx_EventTile_e2eIcon { + display: none; +} +*/ + +.mx_EventTile:hover.mx_EventTile_verified .mx_EventTile_e2eIcon, +.mx_EventTile:hover.mx_EventTile_unverified .mx_EventTile_e2eIcon { + display: block; + left: 41px; +} + /* Various markdown overrides */ .mx_EventTile_content .markdown-body { diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/LinkPreviewWidget.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/LinkPreviewWidget.css index ed470c0039..2e2d9f8046 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/LinkPreviewWidget.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/LinkPreviewWidget.css @@ -50,7 +50,7 @@ limitations under the License. .mx_LinkPreviewWidget_description { margin-top: 8px; white-space: normal; - word-break: break-word; + word-wrap: break-word; } .mx_LinkPreviewWidget_cancel { diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css index 45bc39cf3b..6c76dc00d7 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css @@ -19,6 +19,7 @@ limitations under the License. vertical-align: middle; margin: auto; border-top: 1px solid #e5e5e5; + position: relative; } .mx_MessageComposer_autocomplete_wrapper { @@ -46,6 +47,11 @@ limitations under the License. width: 100%; } +.mx_MessageComposer_e2eIcon { + position: absolute; + left: 44px; +} + .mx_MessageComposer_noperm_error { width: 100%; height: 60px; diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomSettings.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomSettings.css index 68f02f7c1a..78a8790b5e 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomSettings.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomSettings.css @@ -88,12 +88,14 @@ limitations under the License. height: 37px; border: 1px solid #979797; margin-right: 13px; + cursor: pointer; } .mx_RoomSettings .mx_RoomSettings_roomColor_selected { position: absolute; left: 10px; top: 4px; + cursor: default ! important; } .mx_RoomSettings .mx_RoomSettings_roomColorPrimary { diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css index 87ce4abba9..623d578632 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css @@ -63,7 +63,7 @@ limitations under the License. z-index: 2; } -.mx_RoomTile_avatar_container:hover:before, +.mx_RoomTile:hover .mx_RoomTile_avatar_container:before, .mx_RoomTile_avatar_container.mx_RoomTile_avatar_roomTagMenu:before { display: block; position: absolute; @@ -76,7 +76,7 @@ limitations under the License. z-index: 4; } -.mx_RoomTile_avatar_container:hover:after, +.mx_RoomTile:hover .mx_RoomTile_avatar_container:after, .mx_RoomTile_avatar_container.mx_RoomTile_avatar_roomTagMenu:after { display: block; position: absolute; @@ -90,11 +90,11 @@ limitations under the License. z-index: 1; } -.collapsed .mx_RoomTile_avatar_container:hover:before { +.collapsed .mx_RoomTile:hover .mx_RoomTile_avatar_container:before { display: none; } -.collapsed .mx_RoomTile_avatar_container:hover:after { +.collapsed .mx_RoomTile:hover .mx_RoomTile_avatar_container:after { display: none; } diff --git a/src/skins/vector/css/vector-web/structures/RightPanel.css b/src/skins/vector/css/vector-web/structures/RightPanel.css index 9567869e7d..211848f54e 100644 --- a/src/skins/vector/css/vector-web/structures/RightPanel.css +++ b/src/skins/vector/css/vector-web/structures/RightPanel.css @@ -46,15 +46,15 @@ limitations under the License. margin-top: 6px; float: left; background-color: #fff; - margin-left: -4px; + margin-left: 0px; } .mx_RightPanel_headerButton { cursor: pointer; display: table-cell; - vertical-align: middle; - padding-left: 15px; - padding-right: 15px; + vertical-align: top; + padding-left: 4px; + padding-right: 5px; text-align: center; position: relative; } diff --git a/src/skins/vector/img/e2e-blocked.svg b/src/skins/vector/img/e2e-blocked.svg new file mode 100644 index 0000000000..0ab2c6efbe --- /dev/null +++ b/src/skins/vector/img/e2e-blocked.svg @@ -0,0 +1,12 @@ + + + + 2805649B-D39D-43EA-A357-659EF9B97BA4 + Created with sketchtool. + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/e2e-unencrypted.svg b/src/skins/vector/img/e2e-unencrypted.svg new file mode 100644 index 0000000000..1467223638 --- /dev/null +++ b/src/skins/vector/img/e2e-unencrypted.svg @@ -0,0 +1,23 @@ + + + + 16F5F38E-A6A3-472A-BC13-13F0F12876CF + Created with sketchtool. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/e2e-verified.svg b/src/skins/vector/img/e2e-verified.svg new file mode 100644 index 0000000000..b65f50b2b6 --- /dev/null +++ b/src/skins/vector/img/e2e-verified.svg @@ -0,0 +1,12 @@ + + + + 48BF5D32-306C-4B20-88EB-24B1F743CAC9 + Created with sketchtool. + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/e2e-warning.svg b/src/skins/vector/img/e2e-warning.svg new file mode 100644 index 0000000000..8a55f199ba --- /dev/null +++ b/src/skins/vector/img/e2e-warning.svg @@ -0,0 +1,12 @@ + + + + CCDDE6F6-B552-48FD-AD54-6939841CA2DD + Created with sketchtool. + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/icons-files.svg b/src/skins/vector/img/icons-files.svg new file mode 100644 index 0000000000..97ba4228e3 --- /dev/null +++ b/src/skins/vector/img/icons-files.svg @@ -0,0 +1,29 @@ + + + + 7C98C075-AB4D-45A3-85F9-CCD46F84DA7F + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/icons-notifications.svg b/src/skins/vector/img/icons-notifications.svg new file mode 100644 index 0000000000..66a49d6c0c --- /dev/null +++ b/src/skins/vector/img/icons-notifications.svg @@ -0,0 +1,19 @@ + + + + 5E723325-BD0B-454D-BE25-638AF09A97AC + Created with sketchtool. + + + + + + + + + + + + + + \ No newline at end of file