2020-06-05 01:34:04 +03:00
|
|
|
/*
|
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2020-06-05 06:21:04 +03:00
|
|
|
// Note: the room tile expects to be in a flexbox column container
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile {
|
2020-06-05 23:08:20 +03:00
|
|
|
margin-bottom: 4px;
|
|
|
|
padding: 4px;
|
2020-06-05 06:21:04 +03:00
|
|
|
|
2021-06-03 18:26:20 +03:00
|
|
|
contain: content; // Not strict as it will break when resizing a sublist vertically
|
2021-06-01 13:21:59 +03:00
|
|
|
height: 40px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
2020-06-05 06:21:04 +03:00
|
|
|
// The tile is also a flexbox row itself
|
|
|
|
display: flex;
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
&.mx_RoomTile_selected,
|
2020-07-03 00:21:10 +03:00
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
2020-07-18 00:43:29 +03:00
|
|
|
&.mx_RoomTile_hasMenuOpen {
|
2021-08-25 10:17:22 +03:00
|
|
|
background-color: $panel-actions;
|
2020-07-09 20:17:47 +03:00
|
|
|
border-radius: 8px;
|
2020-06-05 23:08:20 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_DecoratedRoomAvatar, .mx_RoomTile_avatarContainer {
|
2020-06-05 06:21:04 +03:00
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_nameContainer {
|
2020-06-10 08:09:15 +03:00
|
|
|
flex-grow: 1;
|
2020-07-02 14:18:48 +03:00
|
|
|
min-width: 0; // allow flex to shrink it
|
|
|
|
margin-right: 8px; // spacing to buttons/badges
|
2020-06-10 08:09:15 +03:00
|
|
|
|
2020-06-05 06:21:04 +03:00
|
|
|
// Create a new column layout flexbox for the name parts
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_name,
|
|
|
|
.mx_RoomTile_messagePreview {
|
2020-06-05 06:21:04 +03:00
|
|
|
margin: 0 2px;
|
2020-06-10 08:09:15 +03:00
|
|
|
width: 100%;
|
2020-06-05 06:21:04 +03:00
|
|
|
|
2020-06-10 08:09:15 +03:00
|
|
|
// Ellipsize any text overflow
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2020-06-05 06:21:04 +03:00
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_name {
|
2020-06-05 06:21:04 +03:00
|
|
|
font-size: $font-14px;
|
2020-06-10 06:12:49 +03:00
|
|
|
line-height: $font-18px;
|
2020-06-05 06:21:04 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_name.mx_RoomTile_nameHasUnreadEvents {
|
2020-07-13 22:57:24 +03:00
|
|
|
font-weight: 600;
|
2020-06-08 22:42:18 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_messagePreview {
|
2020-06-05 06:21:04 +03:00
|
|
|
font-size: $font-13px;
|
|
|
|
line-height: $font-18px;
|
2021-10-16 19:27:43 +03:00
|
|
|
color: $secondary-content;
|
2020-06-05 06:21:04 +03:00
|
|
|
}
|
2020-06-10 06:12:49 +03:00
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_nameWithPreview {
|
2020-06-10 06:12:49 +03:00
|
|
|
margin-top: -4px; // shift the name up a bit more
|
|
|
|
}
|
2020-06-05 06:21:04 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_notificationsButton {
|
2020-07-02 14:18:48 +03:00
|
|
|
margin-left: 4px; // spacing between buttons
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_badgeContainer {
|
2020-07-02 14:35:06 +03:00
|
|
|
height: 16px;
|
|
|
|
// don't set width so that it takes no space when there is no badge to show
|
|
|
|
margin: auto 0; // vertically align
|
2020-06-05 06:21:04 +03:00
|
|
|
|
2020-07-02 22:39:20 +03:00
|
|
|
// Create a flexbox to make aligning dot badges easier
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2020-07-02 14:18:48 +03:00
|
|
|
.mx_NotificationBadge {
|
2020-07-02 14:35:06 +03:00
|
|
|
margin-right: 2px; // centering
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_dot {
|
|
|
|
// make the smaller dot occupy the same width for centering
|
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: 7px;
|
2020-07-02 14:18:48 +03:00
|
|
|
}
|
2020-06-05 06:21:04 +03:00
|
|
|
}
|
2020-06-10 08:09:15 +03:00
|
|
|
|
2020-07-01 15:59:50 +03:00
|
|
|
// The context menu buttons are hidden by default
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_menuButton,
|
|
|
|
.mx_RoomTile_notificationsButton {
|
2020-07-02 14:35:06 +03:00
|
|
|
width: 20px;
|
|
|
|
min-width: 20px; // yay flex
|
|
|
|
height: 20px;
|
2020-07-07 14:03:16 +03:00
|
|
|
margin-top: auto;
|
|
|
|
margin-bottom: auto;
|
2020-06-10 08:09:15 +03:00
|
|
|
position: relative;
|
2020-06-30 02:16:51 +03:00
|
|
|
display: none;
|
2020-06-10 08:09:15 +03:00
|
|
|
|
|
|
|
&::before {
|
2020-06-30 02:16:51 +03:00
|
|
|
top: 2px;
|
|
|
|
left: 2px;
|
2020-06-10 08:09:15 +03:00
|
|
|
content: '';
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
position: absolute;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
2021-08-12 12:27:12 +03:00
|
|
|
background: $primary-content;
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-01 15:59:50 +03:00
|
|
|
// If the room has an overriden notification setting then we always show the notifications menu button
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_notificationsButton.mx_RoomTile_notificationsButton_show {
|
2020-06-30 02:16:51 +03:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_menuButton::before {
|
2020-07-06 19:28:54 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/context-menu.svg');
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
&:not(.mx_RoomTile_minimized) {
|
2020-07-03 00:21:10 +03:00
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
2020-07-18 00:43:29 +03:00
|
|
|
&.mx_RoomTile_hasMenuOpen {
|
2020-06-11 23:39:28 +03:00
|
|
|
// Hide the badge container on hover because it'll be a menu button
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_badgeContainer {
|
2020-06-11 23:39:28 +03:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2020-07-02 14:18:48 +03:00
|
|
|
display: none;
|
2020-06-11 23:39:28 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_notificationsButton,
|
|
|
|
.mx_RoomTile_menuButton {
|
2020-06-30 02:16:51 +03:00
|
|
|
display: block;
|
2020-06-11 23:39:28 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
&.mx_RoomTile_minimized {
|
2020-06-11 23:39:28 +03:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_DecoratedRoomAvatar, .mx_RoomTile_avatarContainer {
|
2020-06-11 23:39:28 +03:00
|
|
|
margin-right: 0;
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-30 02:16:51 +03:00
|
|
|
// We use these both in context menus and the room tiles
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconBell::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/notifications.svg');
|
2020-06-30 02:16:51 +03:00
|
|
|
}
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconBellDot::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/notifications-default.svg');
|
2020-06-30 02:16:51 +03:00
|
|
|
}
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconBellCrossed::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/notifications-off.svg');
|
2020-06-30 02:16:51 +03:00
|
|
|
}
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconBellMentions::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/notifications-dm.svg');
|
2020-07-01 15:59:50 +03:00
|
|
|
}
|
2020-06-30 02:16:51 +03:00
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_contextMenu {
|
|
|
|
.mx_RoomTile_iconStar::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/favorite.svg');
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconArrowDown::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/low-priority.svg');
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconSettings::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/settings.svg');
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
2021-02-15 18:22:19 +03:00
|
|
|
|
2021-07-16 11:07:52 +03:00
|
|
|
.mx_RoomTile_iconCopyLink::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/link.svg');
|
|
|
|
}
|
|
|
|
|
2021-02-15 16:43:09 +03:00
|
|
|
.mx_RoomTile_iconInvite::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/room/invite.svg');
|
|
|
|
}
|
2020-06-10 08:09:15 +03:00
|
|
|
|
2020-07-18 00:43:29 +03:00
|
|
|
.mx_RoomTile_iconSignOut::before {
|
2020-07-06 16:56:52 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/leave.svg');
|
2020-06-10 08:09:15 +03:00
|
|
|
}
|
2020-06-05 01:34:04 +03:00
|
|
|
}
|