@@ -9,6 +9,7 @@ import PopupHOC from './PopupHOC';
99import ForgotPasswordPopup from './ForgotPasswordPopup' ;
1010import DialogPopup , { DialogTypes } from './DialogPopup' ;
1111import { ButtonState } from './Button' ;
12+ import { toCapitalize } from './../utils/StringUtils' ;
1213import {
1314 createTemporalAccount ,
1415 deleteTemporalAccount ,
@@ -21,6 +22,7 @@ import {
2122 closeLoginWindow ,
2223 getAccountByParams ,
2324 getComputerName ,
25+ getOsAndArch ,
2426 linkAuth ,
2527 linkBegin ,
2628 linkStatus ,
@@ -33,6 +35,7 @@ import { DEVICE_TYPE, appDomain } from '../utils/const';
3335import DeviceNotApproved from './DeviceNotApproved' ;
3436import { hashPassword } from '../utils/HashUtils' ;
3537import string , { getLang } from './../lang' ;
38+ import { version } from './../../package.json' ;
3639import './panelwrapper.scss' ;
3740
3841const { errors, help, signIn, signUp } = string ;
@@ -92,6 +95,7 @@ class PanelWrapper extends Component {
9295 super ( ) ;
9396 this . state = {
9497 buttonSignInState : ButtonState . DISABLED ,
98+ contactURL : '' ,
9599 currentStep : mode . SIGNIN ,
96100 lastStep : [ mode . SIGNIN ] ,
97101 mode : mode . SIGNIN ,
@@ -126,14 +130,19 @@ class PanelWrapper extends Component {
126130 ) ;
127131 }
128132
133+ async componentDidMount ( ) {
134+ const contactURL = await this . defineContactURL ( ) ;
135+ this . setState ( { contactURL } ) ;
136+ }
137+
129138 renderFooter = ( ) => (
130139 < footer >
131140 < span >
132141 { help . need_help }
133142
134143 < a
135144 className = "footer-link"
136- href = { `https://criptext.com/ ${ getLang } /contact/` }
145+ href = { this . state . contactURL }
137146 // eslint-disable-next-line react/jsx-no-target-blank
138147 target = "_blank"
139148 >
@@ -540,6 +549,13 @@ class PanelWrapper extends Component {
540549 : `${ usernameOrEmailAddress } @${ appDomain } ` ;
541550 } ;
542551
552+ defineContactURL = async ( ) => {
553+ const { os, arch, installerType } = await getOsAndArch ( ) ;
554+ return `https://criptext.com/${ getLang } /contact?version=${ version } &os=${ toCapitalize (
555+ os
556+ ) } &installer=${ installerType } &arch=${ arch } `;
557+ } ;
558+
543559 goToPasswordLogin = ( ) => {
544560 this . setState ( state => ( {
545561 buttonSignInState : ButtonState . ENABLED ,
0 commit comments