-
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 status page link in the error message when Tchap is down (#636)
* Change error message when tchap service is down * update labels * update err messages * fix labels
- Loading branch information
Showing
7 changed files
with
191 additions
and
18 deletions.
There are no files selected for viewing
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/src/components/structures/RoomSearchView.tsx b/node_modules/matrix-react-sdk/src/components/structures/RoomSearchView.tsx | ||
index 00b9284..e55da17 100644 | ||
--- a/node_modules/matrix-react-sdk/src/components/structures/RoomSearchView.tsx | ||
+++ b/node_modules/matrix-react-sdk/src/components/structures/RoomSearchView.tsx | ||
@@ -34,6 +34,7 @@ import ResizeNotifier from "../../utils/ResizeNotifier"; | ||
import MatrixClientContext from "../../contexts/MatrixClientContext"; | ||
import { RoomPermalinkCreator } from "../../utils/permalinks/Permalinks"; | ||
import RoomContext from "../../contexts/RoomContext"; | ||
+import Tchapi18nUtils from "../../../../../src/tchap/i18n/Tchapi18nUtils"; | ||
|
||
const DEBUG = false; | ||
let debuglog = function (msg: string): void {}; | ||
@@ -129,7 +130,7 @@ export const RoomSearchView = forwardRef<ScrollPanel, Props>( | ||
title: _t("Search failed"), | ||
description: | ||
error?.message ?? | ||
- _t("Server may be unavailable, overloaded, or search timed out :("), | ||
+ Tchapi18nUtils.getServerDownMessage(), | ||
}); | ||
return false; | ||
}, | ||
diff --git a/node_modules/matrix-react-sdk/src/components/structures/RoomStatusBar.tsx b/node_modules/matrix-react-sdk/src/components/structures/RoomStatusBar.tsx | ||
index 24530d4..2f8f555 100644 | ||
--- a/node_modules/matrix-react-sdk/src/components/structures/RoomStatusBar.tsx | ||
+++ b/node_modules/matrix-react-sdk/src/components/structures/RoomStatusBar.tsx | ||
@@ -30,6 +30,7 @@ import AccessibleButton from "../views/elements/AccessibleButton"; | ||
import InlineSpinner from "../views/elements/InlineSpinner"; | ||
import MatrixClientContext from "../../contexts/MatrixClientContext"; | ||
import { RoomStatusBarUnsentMessages } from "./RoomStatusBarUnsentMessages"; | ||
+import Tchapi18nUtils from '../../../../../src/tchap/i18n/Tchapi18nUtils'; // :TCHAP: | ||
|
||
const STATUS_BAR_HIDDEN = 0; | ||
const STATUS_BAR_EXPANDED = 1; | ||
@@ -286,7 +287,7 @@ export default class RoomStatusBar extends React.PureComponent<IProps, IState> { | ||
/> | ||
<div> | ||
<div className="mx_RoomStatusBar_connectionLostBar_title"> | ||
- {_t("Connectivity to the server has been lost.")} | ||
+ {Tchapi18nUtils.getServerDownMessage()} | ||
</div> | ||
<div className="mx_RoomStatusBar_connectionLostBar_desc"> | ||
{_t("Sent messages will be stored until your connection has returned.")} |
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
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
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
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,23 @@ | ||
import React from "react"; | ||
import { _t } from "matrix-react-sdk/src/languageHandler"; | ||
import TchapUrls from "../util/TchapUrls"; | ||
|
||
|
||
export default class Tchapi18nUtils { | ||
|
||
public static getServerDownMessage(errCode? : string){ | ||
return _t( | ||
"Review Tchap services status : url", | ||
errCode ? {errCode} : {"errCode": ""}, | ||
{ | ||
a: (sub) => ( | ||
<a target="_blank" rel="noreferrer noopener" href={TchapUrls.statusPage}> | ||
{sub} | ||
</a> | ||
), | ||
}, | ||
) | ||
} | ||
} | ||
|
||
|
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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
export default class TchapUrls { | ||
//url to request the opening of a new domain on Tchap | ||
public static requestDomainUrl = "https://www.demarches-simplifiees.fr/commencer/utiliser-tchap"; | ||
|
||
//tchap status page | ||
public static statusPage = "https://status.tchap.numerique.gouv.fr" | ||
|
||
} |