From 49be954d315ea81b51f842dc12f87305cddfc42c Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Mar 2017 17:03:16 +0000 Subject: [PATCH] Better CSS for redactions See https://github.com/vector-im/riot-web/issues/3390 Also: The "Redact" option in the MessageContextMenu no longer appears for redacted events. --- .../views/context_menus/MessageContextMenu.js | 2 +- .../matrix-react-sdk/views/rooms/_EventTile.scss | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index e3640f775c..e56a3e2f6f 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -121,7 +121,7 @@ module.exports = React.createClass({ ); } - if (!eventStatus) { // sent + if (!eventStatus && !this.props.mxEvent.isRedacted()) { // sent and not redacted redactButton = (
Redact diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index f241d2c5cc..0926a11a74 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -130,14 +130,13 @@ limitations under the License. color: $event-notsent-color; } -.mx_EventTile_redacted { - padding-top: 0px; -} - -.mx_EventTile_redacted .mx_EventTile_line, -.mx_EventTile_redacted:hover .mx_EventTile_line, -.mx_EventTile_redacted.menu .mx_EventTile_line { - background-color: $primary-fg-color; +.mx_EventTile_redacted .mx_EventTile_line .mx_UnknownBody { + display: block; + width: 100%; + max-width: 300px; + height: 24px; + border-radius: 4px; + background-color: black; } .mx_EventTile_highlight,