-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a help tab in menu to redirect to external tchap faq (#452)
* Add a help tab in menu to redirect to external tchap faq * Remove useless code * Change to faq url https://www.tchap.gouv.fr/faq
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...es/add-a-help-tab-in-menu-to-redirect-to-external-tchap-faq/matrix-react-sdk+3.63.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/node_modules/matrix-react-sdk/res/css/structures/_UserMenu.pcss b/node_modules/matrix-react-sdk/res/css/structures/_UserMenu.pcss | ||
index 08ef894..4e33170 100644 | ||
--- a/node_modules/matrix-react-sdk/res/css/structures/_UserMenu.pcss | ||
+++ b/node_modules/matrix-react-sdk/res/css/structures/_UserMenu.pcss | ||
@@ -206,6 +206,10 @@ limitations under the License. | ||
mask-image: url("$(res)/img/element-icons/settings.svg"); | ||
} | ||
|
||
+ .mx_UserMenu_iconInfo::before { | ||
+ mask-image: url("$(res)/img/element-icons/info.svg"); | ||
+ } | ||
+ | ||
.mx_UserMenu_iconMessage::before { | ||
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 | ||
index 5e6970f..9497bc8 100644 | ||
--- a/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx | ||
+++ b/node_modules/matrix-react-sdk/src/components/structures/UserMenu.tsx | ||
@@ -245,6 +245,10 @@ export default class UserMenu extends React.Component<IProps, IState> { | ||
this.setState({ contextMenuPosition: null }); // also close the menu | ||
}; | ||
|
||
+ private onOpenFAQPage = () => { | ||
+ window.open("https://www.tchap.gouv.fr/faq", '_blank'); | ||
+ }; | ||
+ | ||
private onProvideFeedback = (ev: ButtonEvent) => { | ||
ev.preventDefault(); | ||
ev.stopPropagation(); | ||
@@ -370,6 +374,11 @@ export default class UserMenu extends React.Component<IProps, IState> { | ||
onClick={(e) => this.onSettingsOpen(e, null)} | ||
/> | ||
{feedbackButton} | ||
+ <IconizedContextMenuOption | ||
+ iconClassName="mx_UserMenu_iconInfo" | ||
+ label={_t("Help")} | ||
+ onClick={this.onOpenFAQPage} | ||
+ /> | ||
<IconizedContextMenuOption | ||
className="mx_IconizedContextMenu_option_red" | ||
iconClassName="mx_UserMenu_iconSignOut" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters