aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/auth')
-rw-r--r--src/components/auth/AuthLayout.js97
-rw-r--r--src/components/auth/Import.js3
-rw-r--r--src/components/auth/Invite.js3
-rw-r--r--src/components/auth/Login.js3
-rw-r--r--src/components/auth/Password.js3
-rw-r--r--src/components/auth/Pricing.js3
-rw-r--r--src/components/auth/Signup.js7
-rw-r--r--src/components/auth/Welcome.js3
8 files changed, 62 insertions, 60 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js
index 2741b8a15..4fb0e6a59 100644
--- a/src/components/auth/AuthLayout.js
+++ b/src/components/auth/AuthLayout.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import { RouteTransition } from 'react-router-transition'; 4import { RouteTransition } from 'react-router-transition';
5import { intlShape } from 'react-intl'; 5import { intlShape } from 'react-intl';
6import { TitleBar } from 'electron-react-titlebar';
6 7
7import Link from '../ui/Link'; 8import Link from '../ui/Link';
8import InfoBar from '../ui/InfoBar'; 9import InfoBar from '../ui/InfoBar';
@@ -10,8 +11,9 @@ import InfoBar from '../ui/InfoBar';
10import { oneOrManyChildElements, globalError as globalErrorPropType } from '../../prop-types'; 11import { oneOrManyChildElements, globalError as globalErrorPropType } from '../../prop-types';
11import globalMessages from '../../i18n/globalMessages'; 12import globalMessages from '../../i18n/globalMessages';
12 13
13@observer 14import { isWindows } from '../../environment';
14export default class AuthLayout extends Component { 15
16export default @observer class AuthLayout extends Component {
15 static propTypes = { 17 static propTypes = {
16 children: oneOrManyChildElements.isRequired, 18 children: oneOrManyChildElements.isRequired,
17 pathname: PropTypes.string.isRequired, 19 pathname: PropTypes.string.isRequired,
@@ -20,6 +22,8 @@ export default class AuthLayout extends Component {
20 isAPIHealthy: PropTypes.bool.isRequired, 22 isAPIHealthy: PropTypes.bool.isRequired,
21 retryHealthCheck: PropTypes.func.isRequired, 23 retryHealthCheck: PropTypes.func.isRequired,
22 isHealthCheckLoading: PropTypes.bool.isRequired, 24 isHealthCheckLoading: PropTypes.bool.isRequired,
25 isFullScreen: PropTypes.bool.isRequired,
26 darkMode: PropTypes.bool.isRequired,
23 }; 27 };
24 28
25 static contextTypes = { 29 static contextTypes = {
@@ -35,53 +39,58 @@ export default class AuthLayout extends Component {
35 isAPIHealthy, 39 isAPIHealthy,
36 retryHealthCheck, 40 retryHealthCheck,
37 isHealthCheckLoading, 41 isHealthCheckLoading,
42 isFullScreen,
43 darkMode,
38 } = this.props; 44 } = this.props;
39 const { intl } = this.context; 45 const { intl } = this.context;
40 46
41 return ( 47 return (
42 <div className="auth"> 48 <div className={darkMode ? 'theme__dark' : ''}>
43 {!isOnline && ( 49 {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />}
44 <InfoBar 50 <div className={'auth'}>
45 type="warning" 51 {!isOnline && (
46 > 52 <InfoBar
47 <span className="mdi mdi-flash" /> 53 type="warning"
48 {intl.formatMessage(globalMessages.notConnectedToTheInternet)} 54 >
49 </InfoBar> 55 <span className="mdi mdi-flash" />
50 )} 56 {intl.formatMessage(globalMessages.notConnectedToTheInternet)}
51 {isOnline && !isAPIHealthy && ( 57 </InfoBar>
52 <InfoBar 58 )}
53 type="danger" 59 {isOnline && !isAPIHealthy && (
54 ctaLabel="Try again" 60 <InfoBar
55 ctaLoading={isHealthCheckLoading} 61 type="danger"
56 sticky 62 ctaLabel="Try again"
57 onClick={retryHealthCheck} 63 ctaLoading={isHealthCheckLoading}
58 > 64 sticky
59 <span className="mdi mdi-flash" /> 65 onClick={retryHealthCheck}
60 {intl.formatMessage(globalMessages.APIUnhealthy)} 66 >
61 </InfoBar> 67 <span className="mdi mdi-flash" />
62 )} 68 {intl.formatMessage(globalMessages.APIUnhealthy)}
63 <div className="auth__layout"> 69 </InfoBar>
64 <RouteTransition 70 )}
65 pathname={pathname} 71 <div className="auth__layout">
66 atEnter={{ opacity: 0 }} 72 <RouteTransition
67 atLeave={{ opacity: 0 }} 73 pathname={pathname}
68 atActive={{ opacity: 1 }} 74 atEnter={{ opacity: 0 }}
69 mapStyles={styles => ({ 75 atLeave={{ opacity: 0 }}
70 transform: `translateX(${styles.translateX}%)`, 76 atActive={{ opacity: 1 }}
71 opacity: styles.opacity, 77 mapStyles={styles => ({
72 })} 78 transform: `translateX(${styles.translateX}%)`,
73 component="span" 79 opacity: styles.opacity,
74 > 80 })}
75 {/* Inject globalError into children */} 81 component="span"
76 {React.cloneElement(children, { 82 >
77 error, 83 {/* Inject globalError into children */}
78 })} 84 {React.cloneElement(children, {
79 </RouteTransition> 85 error,
86 })}
87 </RouteTransition>
88 </div>
89 {/* </div> */}
90 <Link to="https://adlk.io" className="auth__adlk" target="_blank">
91 <img src="./assets/images/adlk.svg" alt="" />
92 </Link>
80 </div> 93 </div>
81 {/* </div> */}
82 <Link to="https://adlk.io" className="auth__adlk" target="_blank">
83 <img src="./assets/images/adlk.svg" alt="" />
84 </Link>
85 </div> 94 </div>
86 ); 95 );
87 } 96 }
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js
index 9ba14e768..0d5feb274 100644
--- a/src/components/auth/Import.js
+++ b/src/components/auth/Import.js
@@ -28,8 +28,7 @@ const messages = defineMessages({
28 }, 28 },
29}); 29});
30 30
31@observer 31export default @observer class Import extends Component {
32export default class Import extends Component {
33 static propTypes = { 32 static propTypes = {
34 services: MobxPropTypes.arrayOrObservableArray.isRequired, 33 services: MobxPropTypes.arrayOrObservableArray.isRequired,
35 onSubmit: PropTypes.func.isRequired, 34 onSubmit: PropTypes.func.isRequired,
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js
index f1c16986b..96821a61a 100644
--- a/src/components/auth/Invite.js
+++ b/src/components/auth/Invite.js
@@ -43,8 +43,7 @@ const messages = defineMessages({
43 }, 43 },
44}); 44});
45 45
46@observer 46export default @observer class Invite extends Component {
47export default class Invite extends Component {
48 static propTypes = { 47 static propTypes = {
49 onSubmit: PropTypes.func.isRequired, 48 onSubmit: PropTypes.func.isRequired,
50 embed: PropTypes.bool, 49 embed: PropTypes.bool,
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js
index 4a3cd6776..f465b35a5 100644
--- a/src/components/auth/Login.js
+++ b/src/components/auth/Login.js
@@ -55,8 +55,7 @@ const messages = defineMessages({
55 }, 55 },
56}); 56});
57 57
58@observer 58export default @observer class Login extends Component {
59export default class Login extends Component {
60 static propTypes = { 59 static propTypes = {
61 onSubmit: PropTypes.func.isRequired, 60 onSubmit: PropTypes.func.isRequired,
62 isSubmitting: PropTypes.bool.isRequired, 61 isSubmitting: PropTypes.bool.isRequired,
diff --git a/src/components/auth/Password.js b/src/components/auth/Password.js
index 5bcc80b6e..ad34e39af 100644
--- a/src/components/auth/Password.js
+++ b/src/components/auth/Password.js
@@ -41,8 +41,7 @@ const messages = defineMessages({
41 }, 41 },
42}); 42});
43 43
44@observer 44export default @observer class Password extends Component {
45export default class Password extends Component {
46 static propTypes = { 45 static propTypes = {
47 onSubmit: PropTypes.func.isRequired, 46 onSubmit: PropTypes.func.isRequired,
48 isSubmitting: PropTypes.bool.isRequired, 47 isSubmitting: PropTypes.bool.isRequired,
diff --git a/src/components/auth/Pricing.js b/src/components/auth/Pricing.js
index 3cc8d5f6b..f08129568 100644
--- a/src/components/auth/Pricing.js
+++ b/src/components/auth/Pricing.js
@@ -28,8 +28,7 @@ const messages = defineMessages({
28 }, 28 },
29}); 29});
30 30
31@observer 31export default @observer class Signup extends Component {
32export default class Signup extends Component {
33 static propTypes = { 32 static propTypes = {
34 donor: MobxPropTypes.objectOrObservableObject.isRequired, 33 donor: MobxPropTypes.objectOrObservableObject.isRequired,
35 isLoading: PropTypes.bool.isRequired, 34 isLoading: PropTypes.bool.isRequired,
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js
index 219948274..bbcad8b67 100644
--- a/src/components/auth/Signup.js
+++ b/src/components/auth/Signup.js
@@ -65,8 +65,7 @@ const messages = defineMessages({
65 }, 65 },
66}); 66});
67 67
68@observer 68export default @observer class Signup extends Component {
69export default class Signup extends Component {
70 static propTypes = { 69 static propTypes = {
71 onSubmit: PropTypes.func.isRequired, 70 onSubmit: PropTypes.func.isRequired,
72 isSubmitting: PropTypes.bool.isRequired, 71 isSubmitting: PropTypes.bool.isRequired,
@@ -187,7 +186,7 @@ export default class Signup extends Component {
187 {intl.formatMessage(messages.legalInfo)} 186 {intl.formatMessage(messages.legalInfo)}
188 <br /> 187 <br />
189 <Link 188 <Link
190 to="http://meetfranz.com/terms" 189 to="https://meetfranz.com/terms"
191 target="_blank" 190 target="_blank"
192 className="link" 191 className="link"
193 > 192 >
@@ -195,7 +194,7 @@ export default class Signup extends Component {
195 </Link> 194 </Link>
196 &nbsp;&amp;&nbsp; 195 &nbsp;&amp;&nbsp;
197 <Link 196 <Link
198 to="http://meetfranz.com/privacy" 197 to="https://meetfranz.com/privacy"
199 target="_blank" 198 target="_blank"
200 className="link" 199 className="link"
201 > 200 >
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js
index 9e1c762a5..f6d77f70f 100644
--- a/src/components/auth/Welcome.js
+++ b/src/components/auth/Welcome.js
@@ -16,8 +16,7 @@ const messages = defineMessages({
16 }, 16 },
17}); 17});
18 18
19@observer 19export default @observer class Login extends Component {
20export default class Login extends Component {
21 static propTypes = { 20 static propTypes = {
22 loginRoute: PropTypes.string.isRequired, 21 loginRoute: PropTypes.string.isRequired,
23 signupRoute: PropTypes.string.isRequired, 22 signupRoute: PropTypes.string.isRequired,