Fix discrepancies with style

pull/21833/head
Jorik Schellekens 2020-07-08 16:07:38 +01:00
parent f4e05142db
commit 53bdddfcdd
3 changed files with 8 additions and 5 deletions

View File

@ -225,7 +225,6 @@ limitations under the License.
}
.mx_RoomTile2_iconFavorite::before {
background-color: $accent-color;
mask-image: url('$(res)/img/feather-customised/favourites.svg');
}

View File

@ -364,7 +364,9 @@ export default class RoomTile2 extends React.Component<IProps, IState> {
const roomTags = RoomListStore.instance.getTagsForRoom(this.props.room);
const isFavorite = roomTags.includes(DefaultTagID.Favourite);
const favoriteClassName = isFavorite ? "mx_RoomTile2_iconFavorite" : "mx_RoomTile2_iconStar";
const favouriteIconClassName = isFavorite ? "mx_RoomTile2_iconFavorite" : "mx_RoomTile2_iconStar";
const favouriteLabelClassName = isFavorite ? "mx_RoomTile2_contextMenu_activeRow" : "";
const favouriteLabel = isFavorite ? _t("Favourited") : _t("Favourite");
let contextMenu = null;
if (this.state.generalMenuPosition) {
@ -373,12 +375,13 @@ export default class RoomTile2 extends React.Component<IProps, IState> {
<div className="mx_IconizedContextMenu mx_IconizedContextMenu_compact mx_RoomTile2_contextMenu">
<div className="mx_IconizedContextMenu_optionList">
<MenuItemCheckbox
className={favouriteLabelClassName}
onClick={(e) => this.onTagRoom(e, DefaultTagID.Favourite)}
active={isFavorite}
label={_t("Favourite")}
label={favouriteLabel}
>
<span className={classNames("mx_IconizedContextMenu_icon", favoriteClassName)} />
<span className="mx_IconizedContextMenu_label">{_t("Favourite")}</span>
<span className={classNames("mx_IconizedContextMenu_icon", favouriteIconClassName)} />
<span className="mx_IconizedContextMenu_label">{favouriteLabel}</span>
</MenuItemCheckbox>
<MenuItem onClick={this.onOpenRoomSettings} label={_t("Settings")}>
<span className="mx_IconizedContextMenu_icon mx_RoomTile2_iconSettings" />

View File

@ -1226,6 +1226,7 @@
"All messages": "All messages",
"Mentions & Keywords": "Mentions & Keywords",
"Notification options": "Notification options",
"Favourited": "Favourited",
"Favourite": "Favourite",
"Leave Room": "Leave Room",
"Room options": "Room options",