From 79c63fc9fb88739c131a697b2643dfbc4d16e164 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Thu, 19 Jan 2023 20:31:15 -0500 Subject: [PATCH] Show the room name in the room header during calls --- res/css/views/rooms/_RoomHeader.pcss | 2 +- src/components/views/rooms/RoomHeader.tsx | 18 ++++++++---------- src/i18n/strings/en_EN.json | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/res/css/views/rooms/_RoomHeader.pcss b/res/css/views/rooms/_RoomHeader.pcss index f1636055b17..c6ab2add227 100644 --- a/res/css/views/rooms/_RoomHeader.pcss +++ b/res/css/views/rooms/_RoomHeader.pcss @@ -108,7 +108,7 @@ limitations under the License. display: flex; user-select: none; - &:not(.mx_RoomHeader_name--textonly):hover { + &:hover { background-color: $quinary-content; } diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index 4dbec26caf6..605298391fc 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -743,6 +743,13 @@ export default class RoomHeader extends React.Component { const buttons = this.props.showButtons ? this.renderButtons(isVideoRoom) : null; + let oobName = _t("Join Room"); + if (this.props.oobData && this.props.oobData.name) { + oobName = this.props.oobData.name; + } + + const name = this.renderName(oobName); + if (this.props.viewingCall && !isVideoRoom) { return (
@@ -752,9 +759,7 @@ export default class RoomHeader extends React.Component { >
{roomAvatar}
{icon} -
- {_t("Video call")} -
+ {name} {this.props.activeCall instanceof ElementCall && ( )} @@ -779,13 +784,6 @@ export default class RoomHeader extends React.Component { ); } - let oobName = _t("Join Room"); - if (this.props.oobData && this.props.oobData.name) { - oobName = this.props.oobData.name; - } - - const name = this.renderName(oobName); - const topicElement = ; const viewLabs = (): void => diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f3768067cd3..c932fab0c33 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1997,9 +1997,9 @@ "Close call": "Close call", "View chat timeline": "View chat timeline", "Room options": "Room options", + "Join Room": "Join Room", "(~%(count)s results)|other": "(~%(count)s results)", "(~%(count)s results)|one": "(~%(count)s result)", - "Join Room": "Join Room", "Video rooms are a beta feature": "Video rooms are a beta feature", "Video room": "Video room", "Public space": "Public space",