Skip to content

Commit 3387dc7

Browse files
author
Erika Perugachi
authored
Merge pull request #1099 from erikaperugachi/contact
Contact
2 parents 42dedb8 + 6827857 commit 3387dc7

File tree

6 files changed

+58
-5
lines changed

6 files changed

+58
-5
lines changed

email_login/src/components/PanelWrapper.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import { validateEmail, validateUsername } from './../validators/validators';
3232
import { DEVICE_TYPE, appDomain } from '../utils/const';
3333
import DeviceNotApproved from './DeviceNotApproved';
3434
import { hashPassword } from '../utils/HashUtils';
35-
import string from './../lang';
35+
import string, { getLang } from './../lang';
3636
import './panelwrapper.scss';
3737

38-
const { errors, signIn, signUp } = string;
38+
const { errors, help, signIn, signUp } = string;
3939

4040
const mode = {
4141
SIGNUP: 'SIGNUP',
@@ -112,15 +112,37 @@ class PanelWrapper extends Component {
112112
}
113113

114114
render() {
115+
const showFooter =
116+
this.state.mode === mode.SIGNIN ||
117+
this.state.mode === mode.SIGNINPASSWORD ||
118+
this.state.mode === mode.CHANGEPASSWORD;
115119
return (
116120
<div className="panel-wrapper">
117121
{this.renderPopup()}
118122
{this.renderHeader()}
119123
<section>{this.renderSection()}</section>
124+
{showFooter && this.renderFooter()}
120125
</div>
121126
);
122127
}
123128

129+
renderFooter = () => (
130+
<footer>
131+
<span>
132+
{help.need_help}
133+
&nbsp;
134+
<a
135+
className="footer-link"
136+
href={`https://criptext.com/${getLang}/contact/`}
137+
// eslint-disable-next-line react/jsx-no-target-blank
138+
target="_blank"
139+
>
140+
{help.contact_support}
141+
</a>
142+
</span>
143+
</footer>
144+
);
145+
124146
renderHeader = () => (
125147
<header className={this.defineHeaderClass()}>
126148
<div className="button-section">

email_login/src/components/panelwrapper.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,23 @@
6262
height: 454px;
6363
position: relative;
6464
}
65+
66+
footer {
67+
bottom: 0;
68+
margin-bottom: 20px;
69+
position: absolute;
70+
text-align: center;
71+
width: 100%;
72+
73+
span {
74+
color: #99d9ff;
75+
font-size: 14px;
76+
font-weight: 300;
77+
78+
.footer-link {
79+
color: white;
80+
text-decoration: none;
81+
}
82+
}
83+
}
6584
}

email_login/src/components/signin.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@
6868
.error-message {
6969
font-size: 12px;
7070
color: #000;
71-
left: 7px;
71+
left: 0px;
72+
position: absolute;
7273
}
7374

7475
.buttons {
7576
bottom: 0;
76-
margin: 10% 0% 0% 0%;
77+
margin: 15% 0% 0% 0%;
7778
padding: 0px;
7879
width: 100%;
7980
}
@@ -91,8 +92,9 @@
9192
text-align: center;
9293

9394
span {
94-
font-weight: 300;
95+
font-weight: 200;
9596
strong {
97+
font-weight: 400;
9698
cursor: pointer;
9799
}
98100
}

email_login/src/lang/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
"Incorrect username or password. Check credentials and try again."
5050
}
5151
},
52+
"help": {
53+
"need_help": "Need help?",
54+
"contact_support": "Contact Support"
55+
},
5256
"last_activity": "Last activity",
5357
"over_time": "Over 2 month ago",
5458
"popUp": {

email_login/src/lang/es.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
"description": "Usuario o contraseña incorrectos. Verifica tus credenciales e intenta de nuevo"
4949
}
5050
},
51+
"help": {
52+
"need_help": "¿Necesitas ayuda?",
53+
"contact_support": "Contáctanos"
54+
},
5155
"last_activity": "Última actividad",
5256
"over_time": "Hace más de 2 meses",
5357
"popUp": {

email_login/src/lang/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ export const setLang = lang => {
1414
string.setLanguage(lang);
1515
};
1616

17+
export const getLang = mySettings.language;
18+
1719
export default string;

0 commit comments

Comments
 (0)