Extract message options button to action bar
This adds a new action bar component to hold multiple per-message actions. This existing options button has moved to this new component, and is currently the only action.
This commit is contained in:
parent
530c92e03d
commit
ed8bbc7082
6 changed files with 148 additions and 61 deletions
|
@ -113,6 +113,7 @@
|
|||
@import "./views/messages/_MNoticeBody.scss";
|
||||
@import "./views/messages/_MStickerBody.scss";
|
||||
@import "./views/messages/_MTextBody.scss";
|
||||
@import "./views/messages/_MessageActionBar.scss";
|
||||
@import "./views/messages/_MessageTimestamp.scss";
|
||||
@import "./views/messages/_RoomAvatarEvent.scss";
|
||||
@import "./views/messages/_SenderProfile.scss";
|
||||
|
|
37
res/css/views/messages/_MessageActionBar.scss
Normal file
37
res/css/views/messages/_MessageActionBar.scss
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
Copyright 2019 New Vector 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_MessageActionBar {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
cursor: pointer;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mx_MessageActionBar_optionsButton {
|
||||
display: inline-block;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
background-image: url($edit-button-url);
|
||||
}
|
||||
|
||||
.mx_MatrixChat_useCompactLayout {
|
||||
.mx_MessageActionBar {
|
||||
top: 3px;
|
||||
}
|
||||
}
|
|
@ -121,7 +121,7 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_EventTile:hover .mx_EventTile_line,
|
||||
.mx_EventTile.menu .mx_EventTile_line
|
||||
.mx_EventTile.mx_EventTile_actionBarFocused .mx_EventTile_line
|
||||
{
|
||||
background-color: $event-selected-color;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ limitations under the License.
|
|||
// Explicit relationships so that it doesn't apply to nested EventTile components (e.g in Replies)
|
||||
.mx_EventTile_last > div > a > .mx_MessageTimestamp,
|
||||
.mx_EventTile:hover > div > a > .mx_MessageTimestamp,
|
||||
.mx_EventTile.menu > div > a > .mx_MessageTimestamp {
|
||||
.mx_EventTile.mx_EventTile_actionBarFocused > div > a > .mx_MessageTimestamp {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
|
@ -219,21 +219,8 @@ limitations under the License.
|
|||
width: auto;
|
||||
}
|
||||
|
||||
.mx_EventTile_optionsButton {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
visibility: hidden;
|
||||
cursor: pointer;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
background-image: url($edit-button-url);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mx_EventTile:hover .mx_EventTile_optionsButton,
|
||||
.mx_EventTile.menu .mx_EventTile_optionsButton {
|
||||
.mx_EventTile:hover .mx_MessageActionBar,
|
||||
.mx_EventTile.mx_EventTile_actionBarFocused .mx_MessageActionBar {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
|
@ -551,10 +538,6 @@ limitations under the License.
|
|||
top: 3px;
|
||||
}
|
||||
|
||||
.mx_EventTile_optionsButton {
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
.mx_EventTile_readAvatars {
|
||||
top: 27px;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue