diff options
author | 2019-11-30 16:10:15 +0100 | |
---|---|---|
committer | 2019-11-30 16:10:15 +0100 | |
commit | 03c47ae39eb82d812bbeda9f0c3f56be220337d1 (patch) | |
tree | c1b46ebf41d9ea1a19c9bab204be2ad1c92d956e | |
parent | New translations en-US.json (French) (diff) | |
parent | Prevent Password Lock to trigger while not logged in (diff) | |
download | ferdium-app-03c47ae39eb82d812bbeda9f0c3f56be220337d1.tar.gz ferdium-app-03c47ae39eb82d812bbeda9f0c3f56be220337d1.tar.zst ferdium-app-03c47ae39eb82d812bbeda9f0c3f56be220337d1.zip |
Merge branch 'develop' into l10n_develop
30 files changed, 167 insertions, 124 deletions
diff --git a/.eslintignore b/.eslintignore index 00ae892aa..52fde4c3e 100644 --- a/.eslintignore +++ b/.eslintignore | |||
@@ -1,5 +1,5 @@ | |||
1 | build/ | 1 | build/ |
2 | out/ | 2 | out/ |
3 | packages/*/lib | 3 | packages/*/lib |
4 | src/server | 4 | src/internal-server |
5 | recipes/ \ No newline at end of file | 5 | recipes/ \ No newline at end of file |
diff --git a/.gitmodules b/.gitmodules index 78e0c5221..81b6b6246 100644 --- a/.gitmodules +++ b/.gitmodules | |||
@@ -3,8 +3,8 @@ | |||
3 | url = https://github.com/getferdi/recipes.git | 3 | url = https://github.com/getferdi/recipes.git |
4 | ignore = all | 4 | ignore = all |
5 | branch = master | 5 | branch = master |
6 | [submodule "src/server"] | 6 | [submodule "src/internal-server"] |
7 | path = src/server | 7 | path = src/internal-server |
8 | url = https://github.com/getferdi/internal-server.git | 8 | url = https://github.com/getferdi/internal-server.git |
9 | ignore = all | 9 | ignore = all |
10 | branch = master | 10 | branch = master |
@@ -16,7 +16,7 @@ | |||
16 | ### Table of contents | 16 | ### Table of contents |
17 | 17 | ||
18 | <details> | 18 | <details> |
19 | <summary>Ferdi</summary> | 19 | <summary>Toggle navigation</summary> |
20 | <ul> | 20 | <ul> |
21 | <li><a href="#what-is-ferdi-">What is Ferdi ?</a></li> | 21 | <li><a href="#what-is-ferdi-">What is Ferdi ?</a></li> |
22 | <li><a href="#what-ferdi-looks-like-">What Ferdi looks like ?</a></li> | 22 | <li><a href="#what-ferdi-looks-like-">What Ferdi looks like ?</a></li> |
@@ -49,7 +49,7 @@ Ferdi is a messaging browser that allows you to combine your favorite messaging | |||
49 | ### What Ferdi looks like ? | 49 | ### What Ferdi looks like ? |
50 | 50 | ||
51 | <details> | 51 | <details> |
52 | <summary>Screenshots</summary> | 52 | <summary>Toggle screenshots</summary> |
53 | <p align="center"> | 53 | <p align="center"> |
54 | <img alt="Keep all your messaging services in one place." src="./branding/screenshots/hero.png"> | 54 | <img alt="Keep all your messaging services in one place." src="./branding/screenshots/hero.png"> |
55 | <em>"Keep all your messaging services in one place."</em> | 55 | <em>"Keep all your messaging services in one place."</em> |
@@ -95,8 +95,8 @@ If you use a AUR Helper e.g. yay, simply install it via ´yay -S ferdi-bin´ | |||
95 | - [x] Add "Private Notification"-Mode, that hides message content from notifications ([franz#879](https://github.com/meetfranz/franz/issues/879)) | 95 | - [x] Add "Private Notification"-Mode, that hides message content from notifications ([franz#879](https://github.com/meetfranz/franz/issues/879)) |
96 | - [x] Add Password Lock feature to keep your messages protected ([#41](https://github.com/getferdi/ferdi/issues/41), [franz#810](https://github.com/meetfranz/franz/issues/810), [franz#950](https://github.com/meetfranz/franz/issues/950), [franz#1430](https://github.com/meetfranz/franz/issues/1430)) | 96 | - [x] Add Password Lock feature to keep your messages protected ([#41](https://github.com/getferdi/ferdi/issues/41), [franz#810](https://github.com/meetfranz/franz/issues/810), [franz#950](https://github.com/meetfranz/franz/issues/950), [franz#1430](https://github.com/meetfranz/franz/issues/1430)) |
97 | - [x] Add an option to keep individual workspaces always loaded ([#37](https://github.com/getferdi/ferdi/issues/37)) | 97 | - [x] Add an option to keep individual workspaces always loaded ([#37](https://github.com/getferdi/ferdi/issues/37)) |
98 | - [x] Add universal Dark-Mode via the [DarkReader extension](https://github.com/darkreader/darkreader) ([#71](https://github.com/getferdi/ferdi/issues/71)) | 98 | - [x] Add Universal Dark Mode via the [DarkReader extension](https://github.com/darkreader/darkreader) ([#71](https://github.com/getferdi/ferdi/issues/71)) |
99 | - [x] Add adaptable Dark Mode that will respect the system's darkmode setting ([#173](https://github.com/getferdi/ferdi/issues/173)) | 99 | - [x] Add adaptable Dark Mode that will respect the system's Dark Mode setting ([#173](https://github.com/getferdi/ferdi/issues/173)) |
100 | - [x] Add an option to auto-hide the menubar ([#7](https://github.com/getferdi/ferdi/issues/7), [franz#833](https://github.com/meetfranz/franz/issues/833)) | 100 | - [x] Add an option to auto-hide the menubar ([#7](https://github.com/getferdi/ferdi/issues/7), [franz#833](https://github.com/meetfranz/franz/issues/833)) |
101 | - [x] Add "Quick Switch" feature to help you navigate a long list of services (similar to Rambox's [Quick Switcher](https://rambox.pro/#feature-details/quick_switcher)) | 101 | - [x] Add "Quick Switch" feature to help you navigate a long list of services (similar to Rambox's [Quick Switcher](https://rambox.pro/#feature-details/quick_switcher)) |
102 | - [x] Add "Service Hibernation" that will automatically unload services when they are unused | 102 | - [x] Add "Service Hibernation" that will automatically unload services when they are unused |
diff --git a/appveyor.yml b/appveyor.yml index 95b7c9c22..a0b33d1e1 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
@@ -1,7 +1,7 @@ | |||
1 | environment: | 1 | environment: |
2 | APPVEYOR_CACHE_SKIP_RESTORE: true | 2 | APPVEYOR_CACHE_SKIP_RESTORE: true |
3 | 3 | ||
4 | version: 5.4.1-beta.1.{build} | 4 | version: 5.4.1-beta.2.{build} |
5 | 5 | ||
6 | install: | 6 | install: |
7 | - git submodule update --init --recursive | 7 | - git submodule update --init --recursive |
@@ -22,14 +22,4 @@ branches: | |||
22 | except: | 22 | except: |
23 | - i18n | 23 | - i18n |
24 | - l10n_master | 24 | - l10n_master |
25 | - l10n_develop | 25 | - l10n_develop \ No newline at end of file |
26 | |||
27 | for: | ||
28 | - branches: | ||
29 | only: | ||
30 | - master | ||
31 | - /v\d*\.\d*\.\d*/ | ||
32 | - /v\d*\.\d*\.\d*-beta\.\d*/ | ||
33 | artifacts: | ||
34 | - path: out\*.exe | ||
35 | - path: out\*.yml | ||
diff --git a/package-lock.json b/package-lock.json index 4d169c5c4..c551ecf2f 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "name": "ferdi", | 2 | "name": "ferdi", |
3 | "version": "5.4.1-beta.1", | 3 | "version": "5.4.1-beta.2", |
4 | "lockfileVersion": 1, | 4 | "lockfileVersion": 1, |
5 | "requires": true, | 5 | "requires": true, |
6 | "dependencies": { | 6 | "dependencies": { |
diff --git a/package.json b/package.json index 0b878a213..f60556f51 100644 --- a/package.json +++ b/package.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "name": "ferdi", | 2 | "name": "ferdi", |
3 | "productName": "Ferdi", | 3 | "productName": "Ferdi", |
4 | "appId": "com.kytwb.ferdi", | 4 | "appId": "com.kytwb.ferdi", |
5 | "version": "5.4.1-beta.1", | 5 | "version": "5.4.1-beta.2", |
6 | "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.", | 6 | "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.", |
7 | "copyright": "kytwb", | 7 | "copyright": "kytwb", |
8 | "main": "index.js", | 8 | "main": "index.js", |
diff --git a/recipes b/recipes | |||
Subproject 922b980f941dfbae0181595d35fa4618d1714e7 | Subproject ecf037c35f39f283bca2078486d5eb4ad42ec2d | ||
diff --git a/src/assets/images/appearance/ribbon_large.png b/src/assets/images/appearance/ribbon_large.png new file mode 100644 index 000000000..ac11c9b30 --- /dev/null +++ b/src/assets/images/appearance/ribbon_large.png | |||
Binary files differ | |||
diff --git a/src/assets/images/appearance/ribbon_medium.png b/src/assets/images/appearance/ribbon_medium.png new file mode 100644 index 000000000..1867b2a27 --- /dev/null +++ b/src/assets/images/appearance/ribbon_medium.png | |||
Binary files differ | |||
diff --git a/src/assets/images/appearance/ribbon_small.png b/src/assets/images/appearance/ribbon_small.png new file mode 100644 index 000000000..3440d97e5 --- /dev/null +++ b/src/assets/images/appearance/ribbon_small.png | |||
Binary files differ | |||
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index 192cfde7a..eb3249fa0 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -119,6 +119,7 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
119 | to="/settings/services" | 119 | to="/settings/services" |
120 | className="settings-navigation__link" | 120 | className="settings-navigation__link" |
121 | activeClassName="is-active" | 121 | activeClassName="is-active" |
122 | disabled={!isLoggedIn} | ||
122 | > | 123 | > |
123 | {intl.formatMessage(messages.yourServices)} | 124 | {intl.formatMessage(messages.yourServices)} |
124 | {' '} | 125 | {' '} |
@@ -134,6 +135,7 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
134 | to="/settings/workspaces" | 135 | to="/settings/workspaces" |
135 | className="settings-navigation__link" | 136 | className="settings-navigation__link" |
136 | activeClassName="is-active" | 137 | activeClassName="is-active" |
138 | disabled={!isLoggedIn} | ||
137 | > | 139 | > |
138 | {intl.formatMessage(messages.yourWorkspaces)} | 140 | {intl.formatMessage(messages.yourWorkspaces)} |
139 | {' '} | 141 | {' '} |
@@ -148,6 +150,7 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
148 | to="/settings/user" | 150 | to="/settings/user" |
149 | className="settings-navigation__link" | 151 | className="settings-navigation__link" |
150 | activeClassName="is-active" | 152 | activeClassName="is-active" |
153 | disabled={!isLoggedIn} | ||
151 | > | 154 | > |
152 | {intl.formatMessage(messages.account)} | 155 | {intl.formatMessage(messages.account)} |
153 | </Link> | 156 | </Link> |
@@ -155,6 +158,7 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
155 | to="/settings/team" | 158 | to="/settings/team" |
156 | className="settings-navigation__link" | 159 | className="settings-navigation__link" |
157 | activeClassName="is-active" | 160 | activeClassName="is-active" |
161 | disabled={!isLoggedIn} | ||
158 | > | 162 | > |
159 | {intl.formatMessage(messages.team)} | 163 | {intl.formatMessage(messages.team)} |
160 | {!user.data.isPremium && ( | 164 | {!user.data.isPremium && ( |
diff --git a/src/components/settings/recipes/RecipesDashboard.js b/src/components/settings/recipes/RecipesDashboard.js index 877cbc588..d08e6cbc2 100644 --- a/src/components/settings/recipes/RecipesDashboard.js +++ b/src/components/settings/recipes/RecipesDashboard.js | |||
@@ -153,6 +153,8 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
153 | const communityRecipes = recipes.filter(r => !r.isDevRecipe); | 153 | const communityRecipes = recipes.filter(r => !r.isDevRecipe); |
154 | const devRecipes = recipes.filter(r => r.isDevRecipe); | 154 | const devRecipes = recipes.filter(r => r.isDevRecipe); |
155 | 155 | ||
156 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | ||
157 | |||
156 | return ( | 158 | return ( |
157 | <div className="settings__main"> | 159 | <div className="settings__main"> |
158 | <div className="settings__header"> | 160 | <div className="settings__header"> |
@@ -265,7 +267,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
265 | <RecipeItem | 267 | <RecipeItem |
266 | key={recipe.id} | 268 | key={recipe.id} |
267 | recipe={recipe} | 269 | recipe={recipe} |
268 | onClick={() => showAddServiceInterface({ recipeId: recipe.id })} | 270 | onClick={() => isLoggedIn && showAddServiceInterface({ recipeId: recipe.id })} |
269 | /> | 271 | /> |
270 | ))} | 272 | ))} |
271 | </div> | 273 | </div> |
@@ -278,7 +280,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
278 | <RecipeItem | 280 | <RecipeItem |
279 | key={recipe.id} | 281 | key={recipe.id} |
280 | recipe={recipe} | 282 | recipe={recipe} |
281 | onClick={() => showAddServiceInterface({ recipeId: recipe.id })} | 283 | onClick={() => isLoggedIn && showAddServiceInterface({ recipeId: recipe.id })} |
282 | /> | 284 | /> |
283 | ))} | 285 | ))} |
284 | </div> | 286 | </div> |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 3d0213f81..74f5924ea 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -50,7 +50,7 @@ const messages = defineMessages({ | |||
50 | }, | 50 | }, |
51 | lockedPassword: { | 51 | lockedPassword: { |
52 | id: 'settings.app.lockedPassword', | 52 | id: 'settings.app.lockedPassword', |
53 | defaultMessage: '!!!Ferdi Lock Password', | 53 | defaultMessage: '!!!Password', |
54 | }, | 54 | }, |
55 | lockedPasswordInfo: { | 55 | lockedPasswordInfo: { |
56 | id: 'settings.app.lockedPasswordInfo', | 56 | id: 'settings.app.lockedPasswordInfo', |
@@ -58,7 +58,7 @@ const messages = defineMessages({ | |||
58 | }, | 58 | }, |
59 | lockInfo: { | 59 | lockInfo: { |
60 | id: 'settings.app.lockInfo', | 60 | id: 'settings.app.lockInfo', |
61 | defaultMessage: '!!!Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.', | 61 | defaultMessage: '!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.', |
62 | }, | 62 | }, |
63 | scheduledDNDTimeInfo: { | 63 | scheduledDNDTimeInfo: { |
64 | id: 'settings.app.scheduledDNDTimeInfo', | 64 | id: 'settings.app.scheduledDNDTimeInfo', |
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index 5f729844b..7930d98b4 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js | |||
@@ -11,7 +11,8 @@ import { matchRoute } from '../../helpers/routing-helpers'; | |||
11 | // TODO: create container component for this component | 11 | // TODO: create container component for this component |
12 | export default @inject('stores') @observer class Link extends Component { | 12 | export default @inject('stores') @observer class Link extends Component { |
13 | onClick(e) { | 13 | onClick(e) { |
14 | if (this.props.target === '_blank') { | 14 | if (this.props.disabled) e.preventDefault(); |
15 | else if (this.props.target === '_blank') { | ||
15 | e.preventDefault(); | 16 | e.preventDefault(); |
16 | shell.openExternal(this.props.to); | 17 | shell.openExternal(this.props.to); |
17 | } | 18 | } |
@@ -39,6 +40,7 @@ export default @inject('stores') @observer class Link extends Component { | |||
39 | const linkClasses = classnames({ | 40 | const linkClasses = classnames({ |
40 | [`${className}`]: true, | 41 | [`${className}`]: true, |
41 | [`${activeClassName}`]: match, | 42 | [`${activeClassName}`]: match, |
43 | 'is-disabled': this.props.disabled, | ||
42 | }); | 44 | }); |
43 | 45 | ||
44 | return ( | 46 | return ( |
@@ -68,12 +70,14 @@ Link.wrappedComponent.propTypes = { | |||
68 | strictFilter: PropTypes.bool, | 70 | strictFilter: PropTypes.bool, |
69 | target: PropTypes.string, | 71 | target: PropTypes.string, |
70 | style: PropTypes.object, | 72 | style: PropTypes.object, |
73 | disabled: PropTypes.bool, | ||
71 | }; | 74 | }; |
72 | 75 | ||
73 | Link.wrappedComponent.defaultProps = { | 76 | Link.wrappedComponent.defaultProps = { |
74 | className: '', | 77 | className: '', |
75 | activeClassName: '', | 78 | activeClassName: '', |
76 | strictFilter: false, | 79 | strictFilter: false, |
80 | disabled: false, | ||
77 | target: '', | 81 | target: '', |
78 | style: {}, | 82 | style: {}, |
79 | }; | 83 | }; |
diff --git a/src/config.js b/src/config.js index 57ae2aae1..060b6e8cb 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -78,6 +78,7 @@ export const DEFAULT_APP_SETTINGS = { | |||
78 | universalDarkMode: true, | 78 | universalDarkMode: true, |
79 | adaptableDarkMode: true, | 79 | adaptableDarkMode: true, |
80 | accentColor: '#7367f0', | 80 | accentColor: '#7367f0', |
81 | serviceRibbonWidth: 68, | ||
81 | }; | 82 | }; |
82 | 83 | ||
83 | export const DEFAULT_FEATURES_CONFIG = { | 84 | export const DEFAULT_FEATURES_CONFIG = { |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index b64cd77be..aa4de78e9 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -72,11 +72,11 @@ const messages = defineMessages({ | |||
72 | }, | 72 | }, |
73 | enableLock: { | 73 | enableLock: { |
74 | id: 'settings.app.form.enableLock', | 74 | id: 'settings.app.form.enableLock', |
75 | defaultMessage: '!!!Enable Ferdi password lock', | 75 | defaultMessage: '!!!Enable Password Lock', |
76 | }, | 76 | }, |
77 | lockPassword: { | 77 | lockPassword: { |
78 | id: 'settings.app.form.lockPassword', | 78 | id: 'settings.app.form.lockPassword', |
79 | defaultMessage: '!!!Ferdi Lock password', | 79 | defaultMessage: '!!!Password', |
80 | }, | 80 | }, |
81 | scheduledDNDEnabled: { | 81 | scheduledDNDEnabled: { |
82 | id: 'settings.app.form.scheduledDNDEnabled', | 82 | id: 'settings.app.form.scheduledDNDEnabled', |
diff --git a/src/electron/ipc-api/localServer.js b/src/electron/ipc-api/localServer.js index d12fb5708..9b800fdf6 100644 --- a/src/electron/ipc-api/localServer.js +++ b/src/electron/ipc-api/localServer.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcMain, app } from 'electron'; | 1 | import { ipcMain, app } from 'electron'; |
2 | import net from 'net'; | 2 | import net from 'net'; |
3 | import startServer from '../../server/start'; | 3 | import startServer from '../../internal-server/start'; |
4 | 4 | ||
5 | const DEFAULT_PORT = 45569; | 5 | const DEFAULT_PORT = 45569; |
6 | 6 | ||
@@ -31,15 +31,12 @@ export default (params) => { | |||
31 | let port = DEFAULT_PORT; | 31 | let port = DEFAULT_PORT; |
32 | (async () => { | 32 | (async () => { |
33 | // eslint-disable-next-line no-await-in-loop | 33 | // eslint-disable-next-line no-await-in-loop |
34 | while (await portInUse(port) && port < DEFAULT_PORT + 10) { | 34 | while ((await portInUse(port)) && port < DEFAULT_PORT + 10) { |
35 | port += 1; | 35 | port += 1; |
36 | } | 36 | } |
37 | console.log('Starting local server on port', port); | 37 | console.log('Starting local server on port', port); |
38 | 38 | ||
39 | startServer( | 39 | startServer(app.getPath('userData'), port); |
40 | app.getPath('userData'), | ||
41 | port, | ||
42 | ); | ||
43 | 40 | ||
44 | params.mainWindow.webContents.send('localServerPort', { | 41 | params.mainWindow.webContents.send('localServerPort', { |
45 | port, | 42 | port, |
diff --git a/src/features/accentColor/index.js b/src/features/accentColor/index.js deleted file mode 100644 index 90fbcab43..000000000 --- a/src/features/accentColor/index.js +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import themeInfo from '../../assets/themeInfo.json'; | ||
3 | import { DEFAULT_APP_SETTINGS } from '../../config'; | ||
4 | |||
5 | const STYLE_ELEMENT_ID = 'accent-color'; | ||
6 | |||
7 | // Additional styles needed to make accent colors work properly | ||
8 | // "[ACCENT]" will be replaced with the accent color | ||
9 | const ADDITIONAL_STYLES = ` | ||
10 | .franz-form__button { | ||
11 | background: inherit !important; | ||
12 | border: 2px solid [ACCENT] !important; | ||
13 | } | ||
14 | `; | ||
15 | |||
16 | function createAccentStyleElement() { | ||
17 | const styles = document.createElement('style'); | ||
18 | styles.id = STYLE_ELEMENT_ID; | ||
19 | |||
20 | document.querySelector('head').appendChild(styles); | ||
21 | } | ||
22 | |||
23 | function setAccentStyle(style) { | ||
24 | const styleElement = document.getElementById(STYLE_ELEMENT_ID); | ||
25 | |||
26 | styleElement.innerHTML = style; | ||
27 | } | ||
28 | |||
29 | function generateAccentStyle(color) { | ||
30 | let style = ''; | ||
31 | |||
32 | Object.keys(themeInfo).forEach((property) => { | ||
33 | style += ` | ||
34 | ${themeInfo[property]} { | ||
35 | ${property}: ${color}; | ||
36 | } | ||
37 | `; | ||
38 | }); | ||
39 | |||
40 | style += ADDITIONAL_STYLES.replace(/\[ACCENT\]/g, color); | ||
41 | |||
42 | return style; | ||
43 | } | ||
44 | |||
45 | export default function initAccentColor(stores) { | ||
46 | const { settings } = stores; | ||
47 | createAccentStyleElement(); | ||
48 | |||
49 | // Update accent color | ||
50 | reaction( | ||
51 | () => ( | ||
52 | settings.all.app.accentColor | ||
53 | ), | ||
54 | (color) => { | ||
55 | if (color === DEFAULT_APP_SETTINGS.accentColor) { | ||
56 | // Reset accent style to return to default color scheme | ||
57 | setAccentStyle(''); | ||
58 | } else { | ||
59 | const style = generateAccentStyle(color); | ||
60 | setAccentStyle(style); | ||
61 | } | ||
62 | }, | ||
63 | { | ||
64 | fireImmediately: true, | ||
65 | }, | ||
66 | ); | ||
67 | } | ||
diff --git a/src/features/appearance/index.js b/src/features/appearance/index.js new file mode 100644 index 000000000..8a81054df --- /dev/null +++ b/src/features/appearance/index.js | |||
@@ -0,0 +1,107 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import themeInfo from '../../assets/themeInfo.json'; | ||
3 | import { DEFAULT_APP_SETTINGS } from '../../config'; | ||
4 | |||
5 | const STYLE_ELEMENT_ID = 'custom-appearance-style'; | ||
6 | |||
7 | // Additional styles needed to make accent colors work properly | ||
8 | // "[ACCENT]" will be replaced with the accent color | ||
9 | const ACCENT_ADDITIONAL_STYLES = ` | ||
10 | .franz-form__button { | ||
11 | background: inherit !important; | ||
12 | border: 2px solid [ACCENT] !important; | ||
13 | } | ||
14 | `; | ||
15 | |||
16 | function createStyleElement() { | ||
17 | const styles = document.createElement('style'); | ||
18 | styles.id = STYLE_ELEMENT_ID; | ||
19 | |||
20 | document.querySelector('head').appendChild(styles); | ||
21 | } | ||
22 | |||
23 | function setAppearance(style) { | ||
24 | const styleElement = document.getElementById(STYLE_ELEMENT_ID); | ||
25 | |||
26 | styleElement.innerHTML = style; | ||
27 | } | ||
28 | |||
29 | function generateAccentStyle(color) { | ||
30 | let style = ''; | ||
31 | |||
32 | Object.keys(themeInfo).forEach((property) => { | ||
33 | style += ` | ||
34 | ${themeInfo[property]} { | ||
35 | ${property}: ${color}; | ||
36 | } | ||
37 | `; | ||
38 | }); | ||
39 | |||
40 | style += ACCENT_ADDITIONAL_STYLES.replace(/\[ACCENT\]/g, color); | ||
41 | |||
42 | return style; | ||
43 | } | ||
44 | |||
45 | function generateServiceRibbonWidthStyle(width) { | ||
46 | return ` | ||
47 | .sidebar { | ||
48 | width: ${width}px !important; | ||
49 | } | ||
50 | .tab-item { | ||
51 | width: ${width - 2}px !important; | ||
52 | height: ${width - 5}px !important; | ||
53 | } | ||
54 | .tab-item .tab-item__icon { | ||
55 | width: ${width / 2}px !important; | ||
56 | } | ||
57 | `; | ||
58 | } | ||
59 | |||
60 | function generateStyle(settings) { | ||
61 | let style = ''; | ||
62 | |||
63 | const { | ||
64 | accentColor, | ||
65 | serviceRibbonWidth, | ||
66 | } = settings; | ||
67 | |||
68 | if (accentColor !== DEFAULT_APP_SETTINGS.accentColor) { | ||
69 | style += generateAccentStyle(accentColor); | ||
70 | } | ||
71 | if (serviceRibbonWidth !== DEFAULT_APP_SETTINGS.serviceRibbonWidth) { | ||
72 | style += generateServiceRibbonWidthStyle(serviceRibbonWidth); | ||
73 | } | ||
74 | |||
75 | return style; | ||
76 | } | ||
77 | function updateStyle(settings) { | ||
78 | const style = generateStyle(settings); | ||
79 | setAppearance(style); | ||
80 | } | ||
81 | |||
82 | export default function initAppearance(stores) { | ||
83 | const { settings } = stores; | ||
84 | createStyleElement(); | ||
85 | |||
86 | // Update accent color | ||
87 | reaction( | ||
88 | () => ( | ||
89 | settings.all.app.accentColor | ||
90 | ), | ||
91 | () => { | ||
92 | updateStyle(settings.all.app); | ||
93 | }, | ||
94 | { | ||
95 | fireImmediately: true, | ||
96 | }, | ||
97 | ); | ||
98 | // Update service ribbon width | ||
99 | reaction( | ||
100 | () => ( | ||
101 | settings.all.app.serviceRibbonWidth | ||
102 | ), | ||
103 | () => { | ||
104 | updateStyle(settings.all.app); | ||
105 | }, | ||
106 | ); | ||
107 | } | ||
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index e68ec41af..cc60891c3 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json | |||
@@ -2683,7 +2683,7 @@ | |||
2683 | } | 2683 | } |
2684 | }, | 2684 | }, |
2685 | { | 2685 | { |
2686 | "defaultMessage": "!!!Ferdi Lock Password", | 2686 | "defaultMessage": "!!!Password", |
2687 | "end": { | 2687 | "end": { |
2688 | "column": 3, | 2688 | "column": 3, |
2689 | "line": 54 | 2689 | "line": 54 |
@@ -2709,7 +2709,7 @@ | |||
2709 | } | 2709 | } |
2710 | }, | 2710 | }, |
2711 | { | 2711 | { |
2712 | "defaultMessage": "!!!Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", | 2712 | "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", |
2713 | "end": { | 2713 | "end": { |
2714 | "column": 3, | 2714 | "column": 3, |
2715 | "line": 62 | 2715 | "line": 62 |
@@ -4175,7 +4175,7 @@ | |||
4175 | } | 4175 | } |
4176 | }, | 4176 | }, |
4177 | { | 4177 | { |
4178 | "defaultMessage": "!!!Enable Ferdi password lock", | 4178 | "defaultMessage": "!!!Enable Password Lock", |
4179 | "end": { | 4179 | "end": { |
4180 | "column": 3, | 4180 | "column": 3, |
4181 | "line": 76 | 4181 | "line": 76 |
@@ -4188,7 +4188,7 @@ | |||
4188 | } | 4188 | } |
4189 | }, | 4189 | }, |
4190 | { | 4190 | { |
4191 | "defaultMessage": "!!!Ferdi Lock password", | 4191 | "defaultMessage": "!!!Password", |
4192 | "end": { | 4192 | "end": { |
4193 | "column": 3, | 4193 | "column": 3, |
4194 | "line": 80 | 4194 | "line": 80 |
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index b7d81356e..e586cb852 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json | |||
@@ -261,7 +261,7 @@ | |||
261 | "settings.app.form.beta": "Include beta versions", | 261 | "settings.app.form.beta": "Include beta versions", |
262 | "settings.app.form.darkMode": "Join the Dark Side", | 262 | "settings.app.form.darkMode": "Join the Dark Side", |
263 | "settings.app.form.enableGPUAcceleration": "Enable GPU Acceleration", | 263 | "settings.app.form.enableGPUAcceleration": "Enable GPU Acceleration", |
264 | "settings.app.form.enableLock": "Enable Ferdi password lock", | 264 | "settings.app.form.enableLock": "Enable Password Lock", |
265 | "settings.app.form.enableSpellchecking": "Enable spell checking", | 265 | "settings.app.form.enableSpellchecking": "Enable spell checking", |
266 | "settings.app.form.enableSystemTray": "Show Ferdi in system tray", | 266 | "settings.app.form.enableSystemTray": "Show Ferdi in system tray", |
267 | "settings.app.form.enableTodos": "Enable Ferdi Todos", | 267 | "settings.app.form.enableTodos": "Enable Ferdi Todos", |
@@ -269,7 +269,7 @@ | |||
269 | "settings.app.form.hibernationStrategy": "Hibernation strategy", | 269 | "settings.app.form.hibernationStrategy": "Hibernation strategy", |
270 | "settings.app.form.keepAllWorkspacesLoaded": "Keep all workspaces loaded", | 270 | "settings.app.form.keepAllWorkspacesLoaded": "Keep all workspaces loaded", |
271 | "settings.app.form.language": "Language", | 271 | "settings.app.form.language": "Language", |
272 | "settings.app.form.lockPassword": "Ferdi Lock password", | 272 | "settings.app.form.lockPassword": "Password", |
273 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", | 273 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", |
274 | "settings.app.form.noUpdates": "Disable updates", | 274 | "settings.app.form.noUpdates": "Disable updates", |
275 | "settings.app.form.privateNotifications": "Don't show message content in notifications", | 275 | "settings.app.form.privateNotifications": "Don't show message content in notifications", |
@@ -291,8 +291,8 @@ | |||
291 | "settings.app.headlineUpdates": "Updates", | 291 | "settings.app.headlineUpdates": "Updates", |
292 | "settings.app.hibernateInfo": "By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", | 292 | "settings.app.hibernateInfo": "By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", |
293 | "settings.app.languageDisclaimer": "Official translations are English & German. All other languages are community based translations.", | 293 | "settings.app.languageDisclaimer": "Official translations are English & German. All other languages are community based translations.", |
294 | "settings.app.lockInfo": "Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", | 294 | "settings.app.lockInfo": "Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", |
295 | "settings.app.lockedPassword": "Ferdi Lock Password", | 295 | "settings.app.lockedPassword": "Password", |
296 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", | 296 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", |
297 | "settings.app.restartRequired": "Changes require restart", | 297 | "settings.app.restartRequired": "Changes require restart", |
298 | "settings.app.scheduledDNDInfo": "Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", | 298 | "settings.app.scheduledDNDInfo": "Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", |
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 1fdc74380..235e12146 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json | |||
@@ -222,14 +222,14 @@ | |||
222 | "settings.app.form.beta": "Cuir leagain béite san áireamh", | 222 | "settings.app.form.beta": "Cuir leagain béite san áireamh", |
223 | "settings.app.form.darkMode": "Join the Dark Side", | 223 | "settings.app.form.darkMode": "Join the Dark Side", |
224 | "settings.app.form.enableGPUAcceleration": "Cumasaigh luasghéarú APG", | 224 | "settings.app.form.enableGPUAcceleration": "Cumasaigh luasghéarú APG", |
225 | "settings.app.form.enableLock": "Enable Ferdi password lock", | 225 | "settings.app.form.enableLock": "Enable Password Lock", |
226 | "settings.app.form.enableSpellchecking": "Cumasaigh seiceáil litrithe", | 226 | "settings.app.form.enableSpellchecking": "Cumasaigh seiceáil litrithe", |
227 | "settings.app.form.enableSystemTray": "Taispeáin Ferdi i dtráidire an chórais", | 227 | "settings.app.form.enableSystemTray": "Taispeáin Ferdi i dtráidire an chórais", |
228 | "settings.app.form.enableTodos": "Enable Ferdi Todos", | 228 | "settings.app.form.enableTodos": "Enable Ferdi Todos", |
229 | "settings.app.form.hibernate": "Enable service hibernation", | 229 | "settings.app.form.hibernate": "Enable service hibernation", |
230 | "settings.app.form.keepAllWorkspacesLoaded": "Keep all workspaces loaded", | 230 | "settings.app.form.keepAllWorkspacesLoaded": "Keep all workspaces loaded", |
231 | "settings.app.form.language": "Teanga", | 231 | "settings.app.form.language": "Teanga", |
232 | "settings.app.form.lockPassword": "Ferdi Lock password", | 232 | "settings.app.form.lockPassword": "Password", |
233 | "settings.app.form.minimizeToSystemTray": "Íoslaghdaigh Ferdi chuig tráidire an chórais", | 233 | "settings.app.form.minimizeToSystemTray": "Íoslaghdaigh Ferdi chuig tráidire an chórais", |
234 | "settings.app.form.privateNotifications": "Don't show message content in notifications", | 234 | "settings.app.form.privateNotifications": "Don't show message content in notifications", |
235 | "settings.app.form.runInBackground": "Coimeád Ferdi sa chúlra nuair a dhúntar an fhuinneog", | 235 | "settings.app.form.runInBackground": "Coimeád Ferdi sa chúlra nuair a dhúntar an fhuinneog", |
@@ -247,8 +247,8 @@ | |||
247 | "settings.app.headlineLanguage": "Teanga", | 247 | "settings.app.headlineLanguage": "Teanga", |
248 | "settings.app.headlineUpdates": "Nuashonruithe", | 248 | "settings.app.headlineUpdates": "Nuashonruithe", |
249 | "settings.app.languageDisclaimer": "Official translations are English & German. All other languages are community based translations.", | 249 | "settings.app.languageDisclaimer": "Official translations are English & German. All other languages are community based translations.", |
250 | "settings.app.lockInfo": "Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", | 250 | "settings.app.lockInfo": "Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", |
251 | "settings.app.lockedPassword": "Ferdi Lock Password", | 251 | "settings.app.lockedPassword": "Password", |
252 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", | 252 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", |
253 | "settings.app.restartRequired": "Ní gá atosú chun athruithe a chur i bhfeidhm.", | 253 | "settings.app.restartRequired": "Ní gá atosú chun athruithe a chur i bhfeidhm.", |
254 | "settings.app.scheduledDNDInfo": "Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", | 254 | "settings.app.scheduledDNDInfo": "Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", |
diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index 5bf9f0b31..1fdff93b9 100644 --- a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json +++ b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json | |||
@@ -79,7 +79,7 @@ | |||
79 | }, | 79 | }, |
80 | { | 80 | { |
81 | "id": "settings.app.lockedPassword", | 81 | "id": "settings.app.lockedPassword", |
82 | "defaultMessage": "!!!Ferdi Lock Password", | 82 | "defaultMessage": "!!!Password", |
83 | "file": "src/components/settings/settings/EditSettingsForm.js", | 83 | "file": "src/components/settings/settings/EditSettingsForm.js", |
84 | "start": { | 84 | "start": { |
85 | "line": 51, | 85 | "line": 51, |
@@ -105,7 +105,7 @@ | |||
105 | }, | 105 | }, |
106 | { | 106 | { |
107 | "id": "settings.app.lockInfo", | 107 | "id": "settings.app.lockInfo", |
108 | "defaultMessage": "!!!Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", | 108 | "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", |
109 | "file": "src/components/settings/settings/EditSettingsForm.js", | 109 | "file": "src/components/settings/settings/EditSettingsForm.js", |
110 | "start": { | 110 | "start": { |
111 | "line": 59, | 111 | "line": 59, |
diff --git a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json index 411e35dab..d6cdb94c0 100644 --- a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json +++ b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json | |||
@@ -144,7 +144,7 @@ | |||
144 | }, | 144 | }, |
145 | { | 145 | { |
146 | "id": "settings.app.form.enableLock", | 146 | "id": "settings.app.form.enableLock", |
147 | "defaultMessage": "!!!Enable Ferdi password lock", | 147 | "defaultMessage": "!!!Enable Password Lock", |
148 | "file": "src/containers/settings/EditSettingsScreen.js", | 148 | "file": "src/containers/settings/EditSettingsScreen.js", |
149 | "start": { | 149 | "start": { |
150 | "line": 73, | 150 | "line": 73, |
@@ -157,7 +157,7 @@ | |||
157 | }, | 157 | }, |
158 | { | 158 | { |
159 | "id": "settings.app.form.lockPassword", | 159 | "id": "settings.app.form.lockPassword", |
160 | "defaultMessage": "!!!Ferdi Lock password", | 160 | "defaultMessage": "!!!Password", |
161 | "file": "src/containers/settings/EditSettingsScreen.js", | 161 | "file": "src/containers/settings/EditSettingsScreen.js", |
162 | "start": { | 162 | "start": { |
163 | "line": 77, | 163 | "line": 77, |
diff --git a/src/server b/src/internal-server | |||
Subproject cca6cd984caf729722153e58f44c01319c4bd63 | Subproject cca6cd984caf729722153e58f44c01319c4bd63 | ||
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 941107adb..303845e55 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -800,7 +800,7 @@ export default class FranzMenu { | |||
800 | }, { | 800 | }, { |
801 | label: intl.formatMessage(menuItems.lockFerdi), | 801 | label: intl.formatMessage(menuItems.lockFerdi), |
802 | accelerator: 'CmdOrCtrl+Shift+L', | 802 | accelerator: 'CmdOrCtrl+Shift+L', |
803 | enabled: this.stores.settings.app.lockingFeatureEnabled, | 803 | enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled, |
804 | click() { | 804 | click() { |
805 | // Disable lock first - otherwise the application might not update correctly | 805 | // Disable lock first - otherwise the application might not update correctly |
806 | actions.settings.update({ | 806 | actions.settings.update({ |
@@ -964,7 +964,7 @@ export default class FranzMenu { | |||
964 | this.currentTemplate = tpl; | 964 | this.currentTemplate = tpl; |
965 | const menu = Menu.buildFromTemplate(tpl); | 965 | const menu = Menu.buildFromTemplate(tpl); |
966 | const lockedMenu = Menu.buildFromTemplate([]); | 966 | const lockedMenu = Menu.buildFromTemplate([]); |
967 | Menu.setApplicationMenu(this.stores.settings.app.locked ? lockedMenu : menu); | 967 | Menu.setApplicationMenu(this.stores.user.isLoggedIn && this.stores.settings.app.locked ? lockedMenu : menu); |
968 | } | 968 | } |
969 | 969 | ||
970 | serviceTpl() { | 970 | serviceTpl() { |
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index 780cde3a7..eec4678b9 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -20,7 +20,7 @@ import settingsWS from '../features/settingsWS'; | |||
20 | import serviceLimit from '../features/serviceLimit'; | 20 | import serviceLimit from '../features/serviceLimit'; |
21 | import communityRecipes from '../features/communityRecipes'; | 21 | import communityRecipes from '../features/communityRecipes'; |
22 | import todos from '../features/todos'; | 22 | import todos from '../features/todos'; |
23 | import accentColor from '../features/accentColor'; | 23 | import appearance from '../features/appearance'; |
24 | import planSelection from '../features/planSelection'; | 24 | import planSelection from '../features/planSelection'; |
25 | import trialStatusBar from '../features/trialStatusBar'; | 25 | import trialStatusBar from '../features/trialStatusBar'; |
26 | 26 | ||
@@ -90,7 +90,7 @@ export default class FeaturesStore extends Store { | |||
90 | serviceLimit(this.stores, this.actions); | 90 | serviceLimit(this.stores, this.actions); |
91 | communityRecipes(this.stores, this.actions); | 91 | communityRecipes(this.stores, this.actions); |
92 | todos(this.stores, this.actions); | 92 | todos(this.stores, this.actions); |
93 | accentColor(this.stores, this.actions); | 93 | appearance(this.stores, this.actions); |
94 | planSelection(this.stores, this.actions); | 94 | planSelection(this.stores, this.actions); |
95 | trialStatusBar(this.stores, this.actions); | 95 | trialStatusBar(this.stores, this.actions); |
96 | } | 96 | } |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index df0fc77e9..051e86be2 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -68,7 +68,6 @@ export default class SettingsStore extends Store { | |||
68 | () => this.all.app.locked, | 68 | () => this.all.app.locked, |
69 | () => { | 69 | () => { |
70 | const { router } = window.ferdi.stores; | 70 | const { router } = window.ferdi.stores; |
71 | |||
72 | if (this.all.app.locked && this.all.app.lockingFeatureEnabled) { | 71 | if (this.all.app.locked && this.all.app.lockingFeatureEnabled) { |
73 | // App just got locked, redirect to unlock screen | 72 | // App just got locked, redirect to unlock screen |
74 | router.push('/auth/locked'); | 73 | router.push('/auth/locked'); |
@@ -82,7 +81,8 @@ export default class SettingsStore extends Store { | |||
82 | 81 | ||
83 | // Make sure to lock app on launch if locking feature is enabled | 82 | // Make sure to lock app on launch if locking feature is enabled |
84 | setTimeout(() => { | 83 | setTimeout(() => { |
85 | if (this.all.app.lockingFeatureEnabled) { | 84 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); |
85 | if (isLoggedIn && this.all.app.lockingFeatureEnabled) { | ||
86 | // Disable lock first - otherwise the lock might not get activated corrently | 86 | // Disable lock first - otherwise the lock might not get activated corrently |
87 | this.actions.settings.update({ | 87 | this.actions.settings.update({ |
88 | type: 'app', | 88 | type: 'app', |
diff --git a/src/stores/lib/Request.js b/src/stores/lib/Request.js index 486de8a49..cfc857c2e 100644 --- a/src/stores/lib/Request.js +++ b/src/stores/lib/Request.js | |||
@@ -82,7 +82,8 @@ export default class Request { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | reload() { | 84 | reload() { |
85 | return this.execute(...this._currentApiCall.args); | 85 | const args = this._currentApiCall ? this._currentApiCall.args : []; |
86 | return this.execute(...args); | ||
86 | } | 87 | } |
87 | 88 | ||
88 | retry = () => this.reload(); | 89 | retry = () => this.reload(); |
diff --git a/src/styles/settings.scss b/src/styles/settings.scss index 324175d0b..305450fd2 100644 --- a/src/styles/settings.scss +++ b/src/styles/settings.scss | |||
@@ -92,6 +92,10 @@ | |||
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | &.is-disabled { | ||
96 | filter: grayscale(100%) opacity(.2); | ||
97 | } | ||
98 | |||
95 | &.is-active { | 99 | &.is-active { |
96 | background: $dark-theme-gray; | 100 | background: $dark-theme-gray; |
97 | color: $dark-theme-gray-smoke; | 101 | color: $dark-theme-gray-smoke; |