Skip to content

Commit

Permalink
Upgrade conflicted patch customize-room-header-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Feb 5, 2024
1 parent addb9b6 commit de66591
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 110 deletions.
110 changes: 0 additions & 110 deletions patches/customize-room-header-bar/matrix-react-sdk+3.82.0.patch

This file was deleted.

113 changes: 113 additions & 0 deletions patches/customize-room-header-bar/matrix-react-sdk+3.88.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
diff --git a/node_modules/matrix-react-sdk/res/css/views/rooms/_RoomHeader.pcss b/node_modules/matrix-react-sdk/res/css/views/rooms/_RoomHeader.pcss
index a93366f..95b62a0 100644
--- a/node_modules/matrix-react-sdk/res/css/views/rooms/_RoomHeader.pcss
+++ b/node_modules/matrix-react-sdk/res/css/views/rooms/_RoomHeader.pcss
@@ -116,3 +116,17 @@ limitations under the License.
.mx_RoomHeader .mx_BaseAvatar {
flex-shrink: 0;
}
+
+/* :tchap: largely inspired from ;mx_RoomHeader_topic but I couldn't get this add-on to work with $variable */
+.tc_RoomHeader_external {
+ color: var(--external-color);
+ width: 80px;
+ font-weight: 400;
+ font-size: 0.8125rem;
+ line-height: 0.8125rem;
+ max-height: calc(0.8125rem * 2);
+ overflow: hidden;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ display: -webkit-box;
+}
diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
index 92d7c78..ffef8fe 100644
--- a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
@@ -52,6 +52,10 @@ import { Linkify, topicToHtml } from "../../../HtmlUtils";
import PosthogTrackers from "../../../PosthogTrackers";
import { VideoRoomChatButton } from "./RoomHeader/VideoRoomChatButton";

+import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature";
+import TchapExternalRoomHeader from "../../../../../../src/tchap/components/views/rooms/TchapExternalRoomHeader";
+import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; // :TCHAP:
+
/**
* A helper to transform a notification color to the what the Compound Icon Button
* expects
@@ -125,7 +129,14 @@ export default function RoomHeader({
}}
className="mx_RoomHeader_infoWrapper"
>
+ {/* :TCHAP: RoomAvatar -> DecoratedRoomAvatar
<RoomAvatar room={room} size="40px" />
+ */}
+ <DecoratedRoomAvatar room={room} size="40px" />
+ {/* end :TCHAP: */}
+ {/* :tchap: Add external caption when room is open to external */}
+ <TchapExternalRoomHeader room={room}></TchapExternalRoomHeader>
+ {/* :tchap: end */}
<Box flex="1" className="mx_RoomHeader_info">
<BodyText
as="div"
@@ -138,6 +149,7 @@ export default function RoomHeader({
>
<span className="mx_RoomHeader_truncated mx_lineClamp">{roomName}</span>

+ {/* :tchap: remove public forum icon
{!isDirectMessage && roomState.getJoinRule() === JoinRule.Public && (
<Tooltip label={_t("common|public_room")} side="right">
<PublicIcon
@@ -148,7 +160,9 @@ export default function RoomHeader({
/>
</Tooltip>
)}
+ */}

+ {/* :tchap: do not show e2eStatus
{isDirectMessage && e2eStatus === E2EStatus.Verified && (
<Tooltip label={_t("common|verified")} side="right">
<VerifiedIcon
@@ -159,7 +173,9 @@ export default function RoomHeader({
/>
</Tooltip>
)}
+ */}

+ {/* :tchap: do not show E2EStatus.Warning
{isDirectMessage && e2eStatus === E2EStatus.Warning && (
<Tooltip label={_t("room|header_untrusted_label")} side="right">
<ErrorIcon
@@ -170,6 +186,7 @@ export default function RoomHeader({
/>
</Tooltip>
)}
+ */}
</BodyText>
{roomTopic && (
<BodyText
@@ -200,6 +217,10 @@ export default function RoomHeader({
</Tooltip>
);
})}
+
+ { /*:tchap: activate video call only if directmessage and if feature is activated on homeserver */}
+ isDirectMessage && TchapUIFeature.isFeatureActiveForHomeserver("feature_video_call") && (
+ {/* end :TCHAP: */}
<Tooltip label={!videoCallDisabledReason ? _t("voip|video_call") : videoCallDisabledReason!}>
<IconButton
disabled={!!videoCallDisabledReason}
@@ -209,7 +230,13 @@ export default function RoomHeader({
<VideoCallIcon />
</IconButton>
</Tooltip>
+ ) {/* :TCHAP: close bracket !*/}
+
+ {/*:TCHAP: activate audio call only if directmessage and if feature is activated on homeserver
{!useElementCallExclusively && (
+ */}
+ {!useElementCallExclusively && isDirectMessage && TchapUIFeature.isFeatureActiveForHomeserver("feature_audio_call") && (
+ // end :TCHAP:
<Tooltip label={!voiceCallDisabledReason ? _t("voip|voice_call") : voiceCallDisabledReason!}>
<IconButton
disabled={!!voiceCallDisabledReason}

0 comments on commit de66591

Please sign in to comment.