diff --git a/patches/user-menu/matrix-react-sdk+3.82.0.patch b/patches/user-menu/matrix-react-sdk+3.82.0.patch index b3717f531c..658c0f256a 100644 --- a/patches/user-menu/matrix-react-sdk+3.82.0.patch +++ b/patches/user-menu/matrix-react-sdk+3.82.0.patch @@ -14,63 +14,21 @@ index f25c15e..3d37fa7 100644 mask-image: url("$(res)/img/element-icons/feedback.svg"); } diff --git a/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx b/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx -<<<<<<<< HEAD:patches/user-menu/matrix-react-sdk+3.82.0.patch index 2d82a5c..be5fa85 100644 -======== -index 12e80d7..701dc43 100644 ->>>>>>>> develop_tchap:patches/user-menu/matrix-react-sdk+3.81.0.patch --- a/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx +++ b/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx -@@ -246,6 +246,28 @@ export default class UserMenu extends React.Component { +@@ -246,6 +246,10 @@ export default class UserMenu extends React.Component { this.setState({ contextMenuPosition: null }); // also close the menu }; + private onOpenFAQPage = () => { + window.open("https://www.tchap.gouv.fr/faq", '_blank'); + }; -+ -+ private onOpenChristmasEgg = (ev: ButtonEvent): void => { -+ ev.preventDefault(); -+ ev.stopPropagation(); -+ -+ const roomId = "!cDKdQyXHeWBEaKDWWV:agent.dinum.tchap.gouv.fr"; -+ -+ defaultDispatcher.dispatch({ -+ action: Action.ViewRoom, -+ show_room_tile: true, // make sure the room is visible in the list -+ room_id: roomId, -+ clear_search: true, -+ metricsTrigger: "RoomList", -+ metricsViaKeyboard: ev.type !== "click", -+ }); -+ -+ this.setState({ contextMenuPosition: null }); // also close the menu -+ }; + private onProvideFeedback = (ev: ButtonEvent): void => { ev.preventDefault(); ev.stopPropagation(); -@@ -344,6 +366,19 @@ export default class UserMenu extends React.Component { - ); - } - -+ let christmasEggButton: JSX.Element | undefined; -+ let now = new Date().getTime(); -+ let endDate = new Date("2024-10-01").getTime(); -+ -+ if (now < endDate) { -+ christmasEggButton = ( -+ -+ ); -+ } -+ - let primaryOptionList = ( - - {homeButton} -@@ -363,6 +398,12 @@ export default class UserMenu extends React.Component { +@@ -363,6 +367,11 @@ export default class UserMenu extends React.Component { onClick={(e) => this.onSettingsOpen(e)} /> {feedbackButton} @@ -79,7 +37,6 @@ index 12e80d7..701dc43 100644 + label={_t("common|help")} + onClick={this.onOpenFAQPage} + /> -+ {christmasEggButton}