Skip to content

Commit

Permalink
TCHAP: add proconnect instance faq welcome page
Browse files Browse the repository at this point in the history
  • Loading branch information
marc.sirisak committed Dec 18, 2024
1 parent 45e81e8 commit b9bee89
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions modules/tchap-translations/tchap_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,10 @@
"en": "-> What is ProConnect ?",
"fr": "-> Qu'est-ce que ProConnect ?"
},
"welcome|sso|proconnect_instance_availability": {
"en": "-> Is ProConnect available for my administration ?",
"fr": "-> Est-ce que ProConnect est activé pour mon administration ?"
},
"auth|proconnect|error": {
"en": "An error occured during SSO login",
"fr": "Une erreur est survenue lors de la connexion"
Expand Down
11 changes: 8 additions & 3 deletions res/welcome_sso.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,14 @@ <h1 class="mx_Header_title">_t("Welcome to Tchap")<br />
<a href="#/email-precheck-sso" class="tc_ButtonParent tc_ButtonProconnect tc_Button_iconPC">
<div class="mx_ButtonLabel">_t("auth|proconnect|email_title")</div>
</a>
<a href="https://www.proconnect.gouv.fr/" class="tc_ButtonProconnect_explanation ">
<div>_t("welcome|sso|proconnect_explanation")</div>
</a>
<div>
<a href="https://www.proconnect.gouv.fr/" target="_blank" rel="noopener" class="tc_ButtonProconnect_explanation">
<div>_t("welcome|sso|proconnect_explanation")</div>
</a>
<a href="$proconnectFaq" target="_blank" rel="noopener" class="tc_ButtonProconnect_explanation ">
_t("welcome|sso|proconnect_instance_availability")
</a>
</div>
<a href="#/login" class="tc_ButtonParent tc_Button tc_ButtonBorder">
<div>_t("auth|proconnect|sign_in_password_instead")</div>
</a>
Expand Down
3 changes: 3 additions & 0 deletions src/components/views/auth/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import { UIFeature } from "../../../settings/UIFeature";
import LanguageSelector from "./LanguageSelector";
import EmbeddedPage from "../../structures/EmbeddedPage";
import { MATRIX_LOGO_HTML } from "../../structures/static-page-vars";

import TchapUIFeature from "~tchap-web/src/tchap/util/TchapUIFeature";
import TchapUrls from "~tchap-web/src/tchap/util/TchapUrls";

interface IProps {}

Expand All @@ -41,6 +43,7 @@ export default class Welcome extends React.PureComponent<IProps> {
replaceMap["$logoUrl"] = logoUrl;
// :TCHAP: sso-agentconnect-flow - pageUrl = "welcome.html";
pageUrl = TchapUIFeature.isSSOFlowActive() ? "welcome_sso.html" : "welcome.html";
replaceMap["$proconnectFaq"] = TchapUrls.helpProconnectInstances;
// end :TCHAP:
}

Expand Down
2 changes: 2 additions & 0 deletions src/tchap/util/TchapUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ export default class TchapUrls {

// help manually import tchap keys
public static helpManuallyImportKeys= "https://aide.tchap.beta.gouv.fr/fr/article/comment-importer-manuellement-mes-cles-tchap-cles-de-chiffrement-web-xh376r"

public static helpProconnectInstances = "https://aide.tchap.beta.gouv.fr/fr/article/se-connecter-a-tchap-avec-proconnect-1dh1peg";
}

0 comments on commit b9bee89

Please sign in to comment.