diff options
author | 2019-08-28 12:10:34 +0200 | |
---|---|---|
committer | 2019-08-28 12:10:34 +0200 | |
commit | f28399634079ccdcb51d33cb9e3a8a5d75cc6923 (patch) | |
tree | 640aded438ad1e5f586aeb53e190bf59eceb7584 | |
parent | Add more custom branding (diff) | |
download | ferdium-app-f28399634079ccdcb51d33cb9e3a8a5d75cc6923.tar.gz ferdium-app-f28399634079ccdcb51d33cb9e3a8a5d75cc6923.tar.zst ferdium-app-f28399634079ccdcb51d33cb9e3a8a5d75cc6923.zip |
Add suggestion to import Franz account
-rw-r--r-- | src/components/auth/Login.js | 13 | ||||
-rw-r--r-- | src/components/ui/Link.js | 4 | ||||
-rw-r--r-- | src/index.js | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index ef6176110..8777b00f8 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -137,7 +137,18 @@ export default @observer class Login extends Component { | |||
137 | showPasswordToggle | 137 | showPasswordToggle |
138 | /> | 138 | /> |
139 | {error.code === 'invalid-credentials' && ( | 139 | {error.code === 'invalid-credentials' && ( |
140 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> | 140 | <> |
141 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> | ||
142 | { window.ferdi.stores.settings.all.app.server !== 'https://api.franzinfra.com' && ( | ||
143 | <p className="error-message center"> | ||
144 | Using a custom Ferdi server? Try{' '} | ||
145 | <Link | ||
146 | to={ window.ferdi.stores.settings.all.app.server.replace('v1', '') + '/import' } | ||
147 | target="_blank" | ||
148 | style={{ cursor: 'pointer', textDecoration: 'underline' }}>importing your Franz account</Link> | ||
149 | </p> | ||
150 | )} | ||
151 | </> | ||
141 | )} | 152 | )} |
142 | {isSubmitting ? ( | 153 | {isSubmitting ? ( |
143 | <Button | 154 | <Button |
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index b88686d5e..5c5ef9d7d 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js | |||
@@ -25,6 +25,7 @@ export default @inject('stores') @observer class Link extends Component { | |||
25 | className, | 25 | className, |
26 | activeClassName, | 26 | activeClassName, |
27 | strictFilter, | 27 | strictFilter, |
28 | style, | ||
28 | } = this.props; | 29 | } = this.props; |
29 | const { router } = stores; | 30 | const { router } = stores; |
30 | 31 | ||
@@ -44,6 +45,7 @@ export default @inject('stores') @observer class Link extends Component { | |||
44 | <a | 45 | <a |
45 | href={router.history.createHref(to)} | 46 | href={router.history.createHref(to)} |
46 | className={linkClasses} | 47 | className={linkClasses} |
48 | style={style} | ||
47 | onClick={e => this.onClick(e)} | 49 | onClick={e => this.onClick(e)} |
48 | > | 50 | > |
49 | {children} | 51 | {children} |
@@ -65,6 +67,7 @@ Link.wrappedComponent.propTypes = { | |||
65 | activeClassName: PropTypes.string, | 67 | activeClassName: PropTypes.string, |
66 | strictFilter: PropTypes.bool, | 68 | strictFilter: PropTypes.bool, |
67 | target: PropTypes.string, | 69 | target: PropTypes.string, |
70 | style: PropTypes.object, | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | Link.wrappedComponent.defaultProps = { | 73 | Link.wrappedComponent.defaultProps = { |
@@ -72,4 +75,5 @@ Link.wrappedComponent.defaultProps = { | |||
72 | activeClassName: '', | 75 | activeClassName: '', |
73 | strictFilter: false, | 76 | strictFilter: false, |
74 | target: '', | 77 | target: '', |
78 | style: {} | ||
75 | }; | 79 | }; |
diff --git a/src/index.js b/src/index.js index fbb8e1049..e1b4a7cd2 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -177,7 +177,7 @@ const createWindow = () => { | |||
177 | minHeight: 500, | 177 | minHeight: 500, |
178 | titleBarStyle: isMac ? 'hidden' : '', | 178 | titleBarStyle: isMac ? 'hidden' : '', |
179 | frame: isLinux, | 179 | frame: isLinux, |
180 | backgroundColor: !settings.get('darkMode') ? '#3498db' : '#1E1E1E', | 180 | backgroundColor: !settings.get('darkMode') ? '#7367F0' : '#1E1E1E', |
181 | webPreferences: { | 181 | webPreferences: { |
182 | nodeIntegration: true, | 182 | nodeIntegration: true, |
183 | webviewTag: true, | 183 | webviewTag: true, |