diff options
-rw-r--r-- | CHANGELOG.md | 20 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/components/layout/Sidebar.js | 2 | ||||
-rw-r--r-- | src/features/spellchecker/index.js | 2 | ||||
-rw-r--r-- | src/lib/Menu.js | 9 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 36 |
6 files changed, 33 insertions, 38 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a917ba6f2..68a35f746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,3 +1,23 @@ | |||
1 | ## [5.3.2](https://github.com/meetfranz/franz/compare/v5.3.1...v5.3.2) (2019-09-12) | ||
2 | |||
3 | |||
4 | ### Features | ||
5 | |||
6 | * **Todos:** Move todos toggle to sidebar ([7ffcf8c](https://github.com/meetfranz/franz/commit/7ffcf8c)) | ||
7 | * **Workspaces:** Add setting to keep all services in workspaces in background (avoid reload) ([@Wouter0100](https://github.com/Wouter0100)) ([ddab3a8](https://github.com/meetfranz/franz/commit/ddab3a8)) | ||
8 | |||
9 | |||
10 | ### Bug Fixes | ||
11 | |||
12 | * **Settings:** Don't toggle Todos on general settings changes ([@vantezzen](https://github.com/vantezzen)) ([a99371b](https://github.com/meetfranz/franz/commit/a99371b)) | ||
13 | |||
14 | |||
15 | ### General | ||
16 | |||
17 | * **Translations:** Improved translations. **[A million thanks to the amazing community. 🎉](http://i18n.meetfranz.com/)** | ||
18 | |||
19 | |||
20 | |||
1 | # [5.3.1](https://github.com/meetfranz/franz/compare/v5.3.0...v5.3.1) (2019-09-06) | 21 | # [5.3.1](https://github.com/meetfranz/franz/compare/v5.3.0...v5.3.1) (2019-09-06) |
2 | 22 | ||
3 | ### Features | 23 | ### Features |
diff --git a/package.json b/package.json index 980242e5f..f1283ee9c 100644 --- a/package.json +++ b/package.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "name": "franz", | 2 | "name": "franz", |
3 | "productName": "Franz", | 3 | "productName": "Franz", |
4 | "appId": "com.meetfranz.franz", | 4 | "appId": "com.meetfranz.franz", |
5 | "version": "5.3.1", | 5 | "version": "5.3.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": "adlk x franz - Stefan Malzner", | 7 | "copyright": "adlk x franz - Stefan Malzner", |
8 | "main": "index.js", | 8 | "main": "index.js", |
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index bac57d4dc..918298011 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -112,7 +112,7 @@ export default @observer class Sidebar extends Component { | |||
112 | this.updateToolTip(); | 112 | this.updateToolTip(); |
113 | gaEvent(GA_CATEGORY_TODOS, 'toggleDrawer', 'sidebar'); | 113 | gaEvent(GA_CATEGORY_TODOS, 'toggleDrawer', 'sidebar'); |
114 | }} | 114 | }} |
115 | className="sidebar__button sidebar__button--workspaces" | 115 | className={`sidebar__button sidebar__button--todos ${todosStore.isTodosPanelVisible ? 'is-active' : ''}`} |
116 | data-tip={`${intl.formatMessage(todosToggleMessage)} (${ctrlKey}+T)`} | 116 | data-tip={`${intl.formatMessage(todosToggleMessage)} (${ctrlKey}+T)`} |
117 | > | 117 | > |
118 | <i className="mdi mdi-check-all" /> | 118 | <i className="mdi mdi-check-all" /> |
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js index a07f9f63a..fd8bc738a 100644 --- a/src/features/spellchecker/index.js +++ b/src/features/spellchecker/index.js | |||
@@ -16,7 +16,7 @@ export default function init(stores) { | |||
16 | 16 | ||
17 | config.isIncludedInCurrentPlan = isSpellcheckerIncludedInCurrentPlan !== undefined ? isSpellcheckerIncludedInCurrentPlan : DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan; | 17 | config.isIncludedInCurrentPlan = isSpellcheckerIncludedInCurrentPlan !== undefined ? isSpellcheckerIncludedInCurrentPlan : DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan; |
18 | 18 | ||
19 | if (!stores.user.data.isPremium && config.isIncludedInCurrentPlan && stores.settings.app.enableSpellchecking) { | 19 | if (!stores.user.data.isPremium && !config.isIncludedInCurrentPlan && stores.settings.app.enableSpellchecking) { |
20 | debug('Override settings.spellcheckerEnabled flag to false'); | 20 | debug('Override settings.spellcheckerEnabled flag to false'); |
21 | 21 | ||
22 | Object.assign(stores.settings.app, { | 22 | Object.assign(stores.settings.app, { |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 4aa2edaba..b72f0df96 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -548,6 +548,11 @@ const _titleBarTemplateFactory = intl => [ | |||
548 | visible: workspaceStore.isFeatureEnabled, | 548 | visible: workspaceStore.isFeatureEnabled, |
549 | }, | 549 | }, |
550 | { | 550 | { |
551 | label: intl.formatMessage(menuItems.todos), | ||
552 | submenu: [], | ||
553 | visible: todosStore.isFeatureEnabled, | ||
554 | }, | ||
555 | { | ||
551 | label: intl.formatMessage(menuItems.window), | 556 | label: intl.formatMessage(menuItems.window), |
552 | submenu: [ | 557 | submenu: [ |
553 | { | 558 | { |
@@ -943,12 +948,12 @@ export default class FranzMenu { | |||
943 | gaEvent(GA_CATEGORY_TODOS, 'toggleDrawer', 'menu'); | 948 | gaEvent(GA_CATEGORY_TODOS, 'toggleDrawer', 'menu'); |
944 | }, | 949 | }, |
945 | enabled: this.stores.user.isLoggedIn && isFeatureEnabledByUser, | 950 | enabled: this.stores.user.isLoggedIn && isFeatureEnabledByUser, |
946 | }, { | ||
947 | type: 'separator', | ||
948 | }); | 951 | }); |
949 | 952 | ||
950 | if (!isFeatureEnabledByUser) { | 953 | if (!isFeatureEnabledByUser) { |
951 | menu.push({ | 954 | menu.push({ |
955 | type: 'separator', | ||
956 | }, { | ||
952 | label: intl.formatMessage(menuItems.enableTodos), | 957 | label: intl.formatMessage(menuItems.enableTodos), |
953 | click: () => { | 958 | click: () => { |
954 | todoActions.toggleTodosFeatureVisibility(); | 959 | todoActions.toggleTodosFeatureVisibility(); |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index a456195bf..75bb38fe0 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -1,12 +1,11 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { | 2 | import { |
3 | action, computed, observable, set, | 3 | action, computed, observable, |
4 | } from 'mobx'; | 4 | } from 'mobx'; |
5 | import localStorage from 'mobx-localstorage'; | 5 | import localStorage from 'mobx-localstorage'; |
6 | 6 | ||
7 | import Store from './lib/Store'; | 7 | import Store from './lib/Store'; |
8 | import Request from './lib/Request'; | 8 | import Request from './lib/Request'; |
9 | import CachedRequest from './lib/CachedRequest'; | ||
10 | import { getLocale } from '../helpers/i18n-helpers'; | 9 | import { getLocale } from '../helpers/i18n-helpers'; |
11 | 10 | ||
12 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; | 11 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; |
@@ -15,12 +14,8 @@ import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | |||
15 | const debug = require('debug')('Franz:SettingsStore'); | 14 | const debug = require('debug')('Franz:SettingsStore'); |
16 | 15 | ||
17 | export default class SettingsStore extends Store { | 16 | export default class SettingsStore extends Store { |
18 | @observable appSettingsRequest = new CachedRequest(this.api.local, 'getAppSettings'); | ||
19 | |||
20 | @observable updateAppSettingsRequest = new Request(this.api.local, 'updateAppSettings'); | 17 | @observable updateAppSettingsRequest = new Request(this.api.local, 'updateAppSettings'); |
21 | 18 | ||
22 | fileSystemSettingsRequests = []; | ||
23 | |||
24 | fileSystemSettingsTypes = FILE_SYSTEM_SETTINGS_TYPES; | 19 | fileSystemSettingsTypes = FILE_SYSTEM_SETTINGS_TYPES; |
25 | 20 | ||
26 | @observable _fileSystemSettingsCache = { | 21 | @observable _fileSystemSettingsCache = { |
@@ -35,14 +30,10 @@ export default class SettingsStore extends Store { | |||
35 | this.actions.settings.update.listen(this._update.bind(this)); | 30 | this.actions.settings.update.listen(this._update.bind(this)); |
36 | this.actions.settings.remove.listen(this._remove.bind(this)); | 31 | this.actions.settings.remove.listen(this._remove.bind(this)); |
37 | 32 | ||
38 | this.fileSystemSettingsTypes.forEach((type) => { | ||
39 | this.fileSystemSettingsRequests[type] = new CachedRequest(this.api.local, 'getAppSettings'); | ||
40 | }); | ||
41 | |||
42 | ipcRenderer.on('appSettings', (event, resp) => { | 33 | ipcRenderer.on('appSettings', (event, resp) => { |
43 | debug('Get appSettings resolves', resp.type, resp.data); | 34 | debug('Get appSettings resolves', resp.type, resp.data); |
44 | 35 | ||
45 | this._fileSystemSettingsCache[resp.type] = resp.data; | 36 | Object.assign(this._fileSystemSettingsCache[resp.type], resp.data); |
46 | }); | 37 | }); |
47 | 38 | ||
48 | this.fileSystemSettingsTypes.forEach((type) => { | 39 | this.fileSystemSettingsTypes.forEach((type) => { |
@@ -51,8 +42,6 @@ export default class SettingsStore extends Store { | |||
51 | } | 42 | } |
52 | 43 | ||
53 | async setup() { | 44 | async setup() { |
54 | // We need to wait until `appSettingsRequest` has been executed once, otherwise we can't patch the result. If we don't wait we'd run into an issue with mobx not reacting to changes of previously not existing keys | ||
55 | await this.appSettingsRequest._promise; | ||
56 | await this._migrate(); | 45 | await this._migrate(); |
57 | } | 46 | } |
58 | 47 | ||
@@ -61,21 +50,6 @@ export default class SettingsStore extends Store { | |||
61 | } | 50 | } |
62 | 51 | ||
63 | @computed get proxy() { | 52 | @computed get proxy() { |
64 | // // We need to provide the final data structure as mobx autoruns won't work | ||
65 | // const proxySettings = observable({}); | ||
66 | // this.stores.services.all.forEach((service) => { | ||
67 | // proxySettings[service.id] = { | ||
68 | // isEnabled: false, | ||
69 | // host: null, | ||
70 | // user: null, | ||
71 | // password: null, | ||
72 | // }; | ||
73 | // }); | ||
74 | |||
75 | // debug('this._fileSystemSettingsCache.proxy', this._fileSystemSettingsCache.proxy, proxySettings); | ||
76 | |||
77 | // return Object.assign(proxySettings, this._fileSystemSettingsCache.proxy); | ||
78 | |||
79 | return this._fileSystemSettingsCache.proxy || {}; | 53 | return this._fileSystemSettingsCache.proxy || {}; |
80 | } | 54 | } |
81 | 55 | ||
@@ -117,7 +91,7 @@ export default class SettingsStore extends Store { | |||
117 | data, | 91 | data, |
118 | }); | 92 | }); |
119 | 93 | ||
120 | set(this._fileSystemSettingsCache[type], data); | 94 | Object.assign(this._fileSystemSettingsCache[type], data); |
121 | } | 95 | } |
122 | } | 96 | } |
123 | 97 | ||
@@ -197,8 +171,4 @@ export default class SettingsStore extends Store { | |||
197 | }); | 171 | }); |
198 | } | 172 | } |
199 | } | 173 | } |
200 | |||
201 | _getFileBasedSettings(type) { | ||
202 | ipcRenderer.send('getAppSettings', type); | ||
203 | } | ||
204 | } | 174 | } |