diff options
Diffstat (limited to 'src/components/auth')
-rw-r--r-- | src/components/auth/AuthLayout.js | 4 | ||||
-rw-r--r-- | src/components/auth/Import.js | 4 | ||||
-rw-r--r-- | src/components/auth/Login.js | 26 | ||||
-rw-r--r-- | src/components/auth/Signup.js | 9 | ||||
-rw-r--r-- | src/components/auth/Welcome.js | 15 |
5 files changed, 49 insertions, 9 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 75a8cfc61..641b754ed 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js | |||
@@ -52,7 +52,7 @@ export default @observer class AuthLayout extends Component { | |||
52 | 52 | ||
53 | return ( | 53 | return ( |
54 | <> | 54 | <> |
55 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} | 55 | {isWindows && !isFullScreen && <TitleBar menu={window.ferdi.menu.template} icon="assets/images/logo.svg" />} |
56 | <div className="auth"> | 56 | <div className="auth"> |
57 | {!isOnline && ( | 57 | {!isOnline && ( |
58 | <InfoBar | 58 | <InfoBar |
@@ -87,7 +87,7 @@ export default @observer class AuthLayout extends Component { | |||
87 | })} | 87 | })} |
88 | </div> | 88 | </div> |
89 | {/* </div> */} | 89 | {/* </div> */} |
90 | <Link to="https://adlk.io" className="auth__adlk" target="_blank"> | 90 | <Link to="https://github.com/kytwb/ferdi" className="auth__adlk" target="_blank"> |
91 | <img src="./assets/images/adlk.svg" alt="" /> | 91 | <img src="./assets/images/adlk.svg" alt="" /> |
92 | </Link> | 92 | </Link> |
93 | </div> | 93 | </div> |
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js index 0d5feb274..3e34c3162 100644 --- a/src/components/auth/Import.js +++ b/src/components/auth/Import.js | |||
@@ -12,11 +12,11 @@ import Button from '../ui/Button'; | |||
12 | const messages = defineMessages({ | 12 | const messages = defineMessages({ |
13 | headline: { | 13 | headline: { |
14 | id: 'import.headline', | 14 | id: 'import.headline', |
15 | defaultMessage: '!!!Import your Franz 4 services', | 15 | defaultMessage: '!!!Import your Ferdi 4 services', |
16 | }, | 16 | }, |
17 | notSupportedHeadline: { | 17 | notSupportedHeadline: { |
18 | id: 'import.notSupportedHeadline', | 18 | id: 'import.notSupportedHeadline', |
19 | defaultMessage: '!!!Services not yet supported in Franz 5', | 19 | defaultMessage: '!!!Services not yet supported in Ferdi 5', |
20 | }, | 20 | }, |
21 | submitButtonLabel: { | 21 | submitButtonLabel: { |
22 | id: 'import.submit.label', | 22 | id: 'import.submit.label', |
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index 5d21f8b60..270dff30b 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -34,6 +34,14 @@ const messages = defineMessages({ | |||
34 | id: 'login.invalidCredentials', | 34 | id: 'login.invalidCredentials', |
35 | defaultMessage: '!!!Email or password not valid', | 35 | defaultMessage: '!!!Email or password not valid', |
36 | }, | 36 | }, |
37 | customServerQuestion: { | ||
38 | id: 'login.customServerQuestion', | ||
39 | defaultMessage: '!!!Using a custom Ferdi server?', | ||
40 | }, | ||
41 | customServerSuggestion: { | ||
42 | id: 'login.customServerSuggestion', | ||
43 | defaultMessage: '!!!Try importing your Franz account', | ||
44 | }, | ||
37 | tokenExpired: { | 45 | tokenExpired: { |
38 | id: 'login.tokenExpired', | 46 | id: 'login.tokenExpired', |
39 | defaultMessage: '!!!Your session expired, please login again.', | 47 | defaultMessage: '!!!Your session expired, please login again.', |
@@ -137,7 +145,22 @@ export default @observer class Login extends Component { | |||
137 | showPasswordToggle | 145 | showPasswordToggle |
138 | /> | 146 | /> |
139 | {error.code === 'invalid-credentials' && ( | 147 | {error.code === 'invalid-credentials' && ( |
140 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> | 148 | <> |
149 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> | ||
150 | { window.ferdi.stores.settings.all.app.server !== 'https://api.franzinfra.com' && ( | ||
151 | <p className="error-message center"> | ||
152 | {intl.formatMessage(messages.customServerQuestion)} | ||
153 | {' '} | ||
154 | <Link | ||
155 | to={`${window.ferdi.stores.settings.all.app.server.replace('v1', '')}/import`} | ||
156 | target="_blank" | ||
157 | style={{ cursor: 'pointer', textDecoration: 'underline' }} | ||
158 | > | ||
159 | {intl.formatMessage(messages.customServerSuggestion)} | ||
160 | </Link> | ||
161 | </p> | ||
162 | )} | ||
163 | </> | ||
141 | )} | 164 | )} |
142 | {isSubmitting ? ( | 165 | {isSubmitting ? ( |
143 | <Button | 166 | <Button |
@@ -156,6 +179,7 @@ export default @observer class Login extends Component { | |||
156 | )} | 179 | )} |
157 | </form> | 180 | </form> |
158 | <div className="auth__links"> | 181 | <div className="auth__links"> |
182 | <Link to="/settings/app">Change server</Link> | ||
159 | <Link to={signupRoute}>{intl.formatMessage(messages.signupLink)}</Link> | 183 | <Link to={signupRoute}>{intl.formatMessage(messages.signupLink)}</Link> |
160 | <Link to={passwordRoute}>{intl.formatMessage(messages.passwordLink)}</Link> | 184 | <Link to={passwordRoute}>{intl.formatMessage(messages.passwordLink)}</Link> |
161 | </div> | 185 | </div> |
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js index 0499d764b..b36e71ce1 100644 --- a/src/components/auth/Signup.js +++ b/src/components/auth/Signup.js | |||
@@ -40,7 +40,7 @@ const messages = defineMessages({ | |||
40 | }, | 40 | }, |
41 | legalInfo: { | 41 | legalInfo: { |
42 | id: 'signup.legal.info', | 42 | id: 'signup.legal.info', |
43 | defaultMessage: '!!!By creating a Franz account you accept the', | 43 | defaultMessage: '!!!By creating a Ferdi account you accept the', |
44 | }, | 44 | }, |
45 | terms: { | 45 | terms: { |
46 | id: 'signup.legal.terms', | 46 | id: 'signup.legal.terms', |
@@ -117,6 +117,8 @@ export default @observer class Signup extends Component { | |||
117 | const { intl } = this.context; | 117 | const { intl } = this.context; |
118 | const { isSubmitting, loginRoute, error } = this.props; | 118 | const { isSubmitting, loginRoute, error } = this.props; |
119 | 119 | ||
120 | const termsBase = window.ferdi.stores.settings.all.app.server !== 'https://api.franzinfra.com' ? window.ferdi.stores.settings.all.app.server : 'https://meetfranz.com'; | ||
121 | |||
120 | return ( | 122 | return ( |
121 | <div className="auth__scroll-container"> | 123 | <div className="auth__scroll-container"> |
122 | <div className="auth__container auth__container--signup"> | 124 | <div className="auth__container auth__container--signup"> |
@@ -163,7 +165,7 @@ export default @observer class Signup extends Component { | |||
163 | {intl.formatMessage(messages.legalInfo)} | 165 | {intl.formatMessage(messages.legalInfo)} |
164 | <br /> | 166 | <br /> |
165 | <Link | 167 | <Link |
166 | to="https://meetfranz.com/terms" | 168 | to={`${termsBase}/terms`} |
167 | target="_blank" | 169 | target="_blank" |
168 | className="link" | 170 | className="link" |
169 | > | 171 | > |
@@ -171,7 +173,7 @@ export default @observer class Signup extends Component { | |||
171 | </Link> | 173 | </Link> |
172 | & | 174 | & |
173 | <Link | 175 | <Link |
174 | to="https://meetfranz.com/privacy" | 176 | to={`${termsBase}/privacy`} |
175 | target="_blank" | 177 | target="_blank" |
176 | className="link" | 178 | className="link" |
177 | > | 179 | > |
@@ -181,6 +183,7 @@ export default @observer class Signup extends Component { | |||
181 | </p> | 183 | </p> |
182 | </form> | 184 | </form> |
183 | <div className="auth__links"> | 185 | <div className="auth__links"> |
186 | <Link to="/settings/app">Change server</Link> | ||
184 | <Link to={loginRoute}>{intl.formatMessage(messages.loginLink)}</Link> | 187 | <Link to={loginRoute}>{intl.formatMessage(messages.loginLink)}</Link> |
185 | </div> | 188 | </div> |
186 | </div> | 189 | </div> |
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js index f6d77f70f..ef917e336 100644 --- a/src/components/auth/Welcome.js +++ b/src/components/auth/Welcome.js | |||
@@ -41,7 +41,7 @@ export default @observer class Login extends Component { | |||
41 | <img src="./assets/images/logo.svg" className="welcome__logo" alt="" /> | 41 | <img src="./assets/images/logo.svg" className="welcome__logo" alt="" /> |
42 | {/* <img src="./assets/images/welcome.png" className="welcome__services" alt="" /> */} | 42 | {/* <img src="./assets/images/welcome.png" className="welcome__services" alt="" /> */} |
43 | <div className="welcome__text"> | 43 | <div className="welcome__text"> |
44 | <h1>Franz</h1> | 44 | <h1>Ferdi</h1> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | <div className="welcome__buttons"> | 47 | <div className="welcome__buttons"> |
@@ -51,6 +51,19 @@ export default @observer class Login extends Component { | |||
51 | <Link to={loginRoute} className="button"> | 51 | <Link to={loginRoute} className="button"> |
52 | {intl.formatMessage(messages.loginButton)} | 52 | {intl.formatMessage(messages.loginButton)} |
53 | </Link> | 53 | </Link> |
54 | <br /> | ||
55 | <br /> | ||
56 | |||
57 | <Link to="settings/app"> | ||
58 | <span style={{ | ||
59 | textAlign: 'center', | ||
60 | width: '100%', | ||
61 | cursor: 'pointer', | ||
62 | }} | ||
63 | > | ||
64 | Change server | ||
65 | </span> | ||
66 | </Link> | ||
54 | </div> | 67 | </div> |
55 | <div className="welcome__featured-services"> | 68 | <div className="welcome__featured-services"> |
56 | {recipes.map(recipe => ( | 69 | {recipes.map(recipe => ( |