diff options
author | 2019-09-21 11:37:30 +0200 | |
---|---|---|
committer | 2019-09-21 11:37:30 +0200 | |
commit | 4e1fc89de9ce3bf00f7387f39062d1b4878ecd16 (patch) | |
tree | 9d86224f7be338cbd43dfedb9b9831ee2a851ff7 /src | |
parent | Use official node-auto-launch (diff) | |
download | ferdium-app-4e1fc89de9ce3bf00f7387f39062d1b4878ecd16.tar.gz ferdium-app-4e1fc89de9ce3bf00f7387f39062d1b4878ecd16.tar.zst ferdium-app-4e1fc89de9ce3bf00f7387f39062d1b4878ecd16.zip |
Add scheduled Do-not-Disturb feature
Diffstat (limited to 'src')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 64 | ||||
-rw-r--r-- | src/config.js | 9 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 32 | ||||
-rw-r--r-- | src/helpers/schedule-helpers.js | 70 | ||||
-rw-r--r-- | src/i18n/locales/defaultMessages.json | 165 | ||||
-rw-r--r-- | src/i18n/locales/en-US.json | 7 | ||||
-rw-r--r-- | src/i18n/locales/whitelist_en-US.json | 3 | ||||
-rw-r--r-- | src/i18n/messages/src/components/settings/settings/EditSettingsForm.json | 90 | ||||
-rw-r--r-- | src/i18n/messages/src/containers/settings/EditSettingsScreen.json | 75 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 13 |
10 files changed, 422 insertions, 106 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index c1e812008..52bd18603 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -38,6 +38,14 @@ const messages = defineMessages({ | |||
38 | id: 'settings.app.lockedPasswordInfo', | 38 | id: 'settings.app.lockedPasswordInfo', |
39 | defaultMessage: '!!!Please make sure to set a password you\'ll remember.\nIf you loose this password, you will have to reinstall Ferdi.', | 39 | defaultMessage: '!!!Please make sure to set a password you\'ll remember.\nIf you loose this password, you will have to reinstall Ferdi.', |
40 | }, | 40 | }, |
41 | scheduledDNDTimeInfo: { | ||
42 | id: 'settings.app.scheduledDNDTimeInfo', | ||
43 | defaultMessage: '!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.', | ||
44 | }, | ||
45 | scheduledDNDInfo: { | ||
46 | id: 'settings.app.scheduledDNDInfo', | ||
47 | defaultMessage: '!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.', | ||
48 | }, | ||
41 | headlineLanguage: { | 49 | headlineLanguage: { |
42 | id: 'settings.app.headlineLanguage', | 50 | id: 'settings.app.headlineLanguage', |
43 | defaultMessage: '!!!Language', | 51 | defaultMessage: '!!!Language', |
@@ -167,7 +175,11 @@ export default @observer class EditSettingsForm extends Component { | |||
167 | } | 175 | } |
168 | 176 | ||
169 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | 177 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); |
170 | const lockingFeatureEnabled = window.ferdi.stores.settings.all.app.lockingFeatureEnabled; | 178 | |
179 | const { | ||
180 | lockingFeatureEnabled, | ||
181 | scheduledDNDEnabled, | ||
182 | } = window.ferdi.stores.settings.all.app; | ||
171 | 183 | ||
172 | return ( | 184 | return ( |
173 | <div className="settings__main"> | 185 | <div className="settings__main"> |
@@ -273,6 +285,56 @@ export default @observer class EditSettingsForm extends Component { | |||
273 | </p> | 285 | </p> |
274 | 286 | ||
275 | 287 | ||
288 | <Toggle field={form.$('scheduledDNDEnabled')} /> | ||
289 | {scheduledDNDEnabled && ( | ||
290 | <> | ||
291 | <div style={{ | ||
292 | display: 'flex', | ||
293 | justifyContent: 'center', | ||
294 | }} | ||
295 | > | ||
296 | <div style={{ | ||
297 | padding: '0 1rem', | ||
298 | width: '100%', | ||
299 | }} | ||
300 | > | ||
301 | <Input | ||
302 | placeholder="17:00" | ||
303 | onChange={e => this.submit(e)} | ||
304 | field={form.$('scheduledDNDStart')} | ||
305 | type="time" | ||
306 | /> | ||
307 | </div> | ||
308 | <div style={{ | ||
309 | padding: '0 1rem', | ||
310 | width: '100%', | ||
311 | }} | ||
312 | > | ||
313 | <Input | ||
314 | placeholder="09:00" | ||
315 | onChange={e => this.submit(e)} | ||
316 | field={form.$('scheduledDNDEnd')} | ||
317 | type="time" | ||
318 | /> | ||
319 | </div> | ||
320 | </div> | ||
321 | <p> | ||
322 | { intl.formatMessage(messages.scheduledDNDTimeInfo) } | ||
323 | </p> | ||
324 | </> | ||
325 | )} | ||
326 | <p | ||
327 | className="settings__message" | ||
328 | style={{ | ||
329 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', | ||
330 | }} | ||
331 | > | ||
332 | <span> | ||
333 | { intl.formatMessage(messages.scheduledDNDInfo) } | ||
334 | </span> | ||
335 | </p> | ||
336 | |||
337 | |||
276 | {/* Appearance */} | 338 | {/* Appearance */} |
277 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> | 339 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> |
278 | <Toggle field={form.$('showDisabledServices')} /> | 340 | <Toggle field={form.$('showDisabledServices')} /> |
diff --git a/src/config.js b/src/config.js index d01ece849..96c054cca 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -40,8 +40,6 @@ export const DEFAULT_APP_SETTINGS = { | |||
40 | enableSystemTray: true, | 40 | enableSystemTray: true, |
41 | minimizeToSystemTray: false, | 41 | minimizeToSystemTray: false, |
42 | privateNotifications: false, | 42 | privateNotifications: false, |
43 | server: LIVE_API, | ||
44 | todoServer: PRODUCTION_TODOS_FRONTEND_URL, | ||
45 | showDisabledServices: true, | 43 | showDisabledServices: true, |
46 | showMessageBadgeWhenMuted: true, | 44 | showMessageBadgeWhenMuted: true, |
47 | enableSpellchecking: true, | 45 | enableSpellchecking: true, |
@@ -53,10 +51,17 @@ export const DEFAULT_APP_SETTINGS = { | |||
53 | isAppMuted: false, | 51 | isAppMuted: false, |
54 | enableGPUAcceleration: true, | 52 | enableGPUAcceleration: true, |
55 | serviceLimit: 5, | 53 | serviceLimit: 5, |
54 | |||
55 | // Ferdi specific options | ||
56 | server: LIVE_API, | ||
57 | todoServer: PRODUCTION_TODOS_FRONTEND_URL, | ||
56 | autohideMenuBar: false, | 58 | autohideMenuBar: false, |
57 | lockingFeatureEnabled: false, | 59 | lockingFeatureEnabled: false, |
58 | locked: false, | 60 | locked: false, |
59 | lockedPassword: '', | 61 | lockedPassword: '', |
62 | scheduledDNDEnabled: false, | ||
63 | scheduledDNDStart: '17:00', | ||
64 | scheduledDNDEnd: '09:00', | ||
60 | }; | 65 | }; |
61 | 66 | ||
62 | export const DEFAULT_FEATURES_CONFIG = { | 67 | export const DEFAULT_FEATURES_CONFIG = { |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 4d85d4f12..0ae64b6ad 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -65,6 +65,18 @@ const messages = defineMessages({ | |||
65 | id: 'settings.app.form.lockPassword', | 65 | id: 'settings.app.form.lockPassword', |
66 | defaultMessage: '!!!Ferdi Lock password', | 66 | defaultMessage: '!!!Ferdi Lock password', |
67 | }, | 67 | }, |
68 | scheduledDNDEnabled: { | ||
69 | id: 'settings.app.form.scheduledDNDEnabled', | ||
70 | defaultMessage: '!!!Enable scheduled Do-not-Disturb', | ||
71 | }, | ||
72 | scheduledDNDStart: { | ||
73 | id: 'settings.app.form.scheduledDNDStart', | ||
74 | defaultMessage: '!!!From', | ||
75 | }, | ||
76 | scheduledDNDEnd: { | ||
77 | id: 'settings.app.form.scheduledDNDEnd', | ||
78 | defaultMessage: '!!!To', | ||
79 | }, | ||
68 | language: { | 80 | language: { |
69 | id: 'settings.app.form.language', | 81 | id: 'settings.app.form.language', |
70 | defaultMessage: '!!!Language', | 82 | defaultMessage: '!!!Language', |
@@ -134,6 +146,9 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
134 | todoServer: settingsData.todoServer, | 146 | todoServer: settingsData.todoServer, |
135 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | 147 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, |
136 | lockedPassword: settingsData.lockedPassword, | 148 | lockedPassword: settingsData.lockedPassword, |
149 | scheduledDNDEnabled: settingsData.scheduledDNDEnabled, | ||
150 | scheduledDNDStart: settingsData.scheduledDNDStart, | ||
151 | scheduledDNDEnd: settingsData.scheduledDNDEnd, | ||
137 | enableGPUAcceleration: settingsData.enableGPUAcceleration, | 152 | enableGPUAcceleration: settingsData.enableGPUAcceleration, |
138 | showDisabledServices: settingsData.showDisabledServices, | 153 | showDisabledServices: settingsData.showDisabledServices, |
139 | darkMode: settingsData.darkMode, | 154 | darkMode: settingsData.darkMode, |
@@ -235,6 +250,23 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
235 | default: DEFAULT_LOCK_PASSWORD, | 250 | default: DEFAULT_LOCK_PASSWORD, |
236 | type: 'password', | 251 | type: 'password', |
237 | }, | 252 | }, |
253 | scheduledDNDEnabled: { | ||
254 | label: intl.formatMessage(messages.scheduledDNDEnabled), | ||
255 | value: settings.all.app.scheduledDNDEnabled || false, | ||
256 | default: false, | ||
257 | }, | ||
258 | scheduledDNDStart: { | ||
259 | label: intl.formatMessage(messages.scheduledDNDStart), | ||
260 | value: settings.all.app.scheduledDNDStart, | ||
261 | default: '17:00', | ||
262 | type: 'time', | ||
263 | }, | ||
264 | scheduledDNDEnd: { | ||
265 | label: intl.formatMessage(messages.scheduledDNDEnd), | ||
266 | value: settings.all.app.scheduledDNDEnd, | ||
267 | default: '09:00', | ||
268 | type: 'time', | ||
269 | }, | ||
238 | showDisabledServices: { | 270 | showDisabledServices: { |
239 | label: intl.formatMessage(messages.showDisabledServices), | 271 | label: intl.formatMessage(messages.showDisabledServices), |
240 | value: settings.all.app.showDisabledServices, | 272 | value: settings.all.app.showDisabledServices, |
diff --git a/src/helpers/schedule-helpers.js b/src/helpers/schedule-helpers.js new file mode 100644 index 000000000..a3020cad6 --- /dev/null +++ b/src/helpers/schedule-helpers.js | |||
@@ -0,0 +1,70 @@ | |||
1 | /* eslint-disable import/prefer-default-export */ | ||
2 | |||
3 | export function isInTimeframe(start, end) { | ||
4 | const [ | ||
5 | startHourStr, | ||
6 | startMinuteStr, | ||
7 | ] = start.split(':'); | ||
8 | const startHour = parseInt(startHourStr, 10); | ||
9 | const startMinute = parseInt(startMinuteStr, 10); | ||
10 | |||
11 | const [ | ||
12 | endHourStr, | ||
13 | endMinuteStr, | ||
14 | ] = end.split(':'); | ||
15 | const endHour = parseInt(endHourStr, 10); | ||
16 | const endMinute = parseInt(endMinuteStr, 10); | ||
17 | |||
18 | const currentHour = new Date().getHours(); | ||
19 | const currentMinute = new Date().getMinutes(); | ||
20 | |||
21 | // Check if the end time is before the start time (scheduled overnight) | ||
22 | // as we need to change our checks based on this | ||
23 | const endBeforeStart = (startHour > endHour || (startHour === endHour && startMinute > endMinute)); | ||
24 | |||
25 | if ( | ||
26 | // End is after start (e.g. 09:00-17:00) | ||
27 | !endBeforeStart | ||
28 | // Check if past start | ||
29 | && ((currentHour > startHour | ||
30 | || ( | ||
31 | currentHour === startHour | ||
32 | && currentMinute >= startMinute | ||
33 | ) | ||
34 | ) | ||
35 | // Check that not past end | ||
36 | && (currentHour < endHour | ||
37 | || ( | ||
38 | currentHour === endHour | ||
39 | && currentMinute < endMinute | ||
40 | ) | ||
41 | )) | ||
42 | ) { | ||
43 | // We are in scheduled timeframe | ||
44 | return true; | ||
45 | } | ||
46 | if ( | ||
47 | // End is before start (e.g. 17:00-09:00) | ||
48 | endBeforeStart | ||
49 | // Check if past start | ||
50 | && ((currentHour > startHour | ||
51 | || ( | ||
52 | currentHour === startHour | ||
53 | && currentMinute >= startMinute | ||
54 | ) | ||
55 | ) | ||
56 | // Check that we are not past end | ||
57 | || (currentHour < endHour | ||
58 | || ( | ||
59 | currentHour === endHour | ||
60 | && currentMinute < endMinute | ||
61 | ) | ||
62 | )) | ||
63 | ) { | ||
64 | // We are also in scheduled timeframe | ||
65 | return true; | ||
66 | } | ||
67 | |||
68 | // We are not in scheduled timeframe | ||
69 | return false; | ||
70 | } | ||
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 7f02af685..de1712048 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json | |||
@@ -2540,211 +2540,237 @@ | |||
2540 | } | 2540 | } |
2541 | }, | 2541 | }, |
2542 | { | 2542 | { |
2543 | "defaultMessage": "!!!Language", | 2543 | "defaultMessage": "!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", |
2544 | "end": { | 2544 | "end": { |
2545 | "column": 3, | 2545 | "column": 3, |
2546 | "line": 44 | 2546 | "line": 44 |
2547 | }, | 2547 | }, |
2548 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2548 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2549 | "id": "settings.app.scheduledDNDTimeInfo", | ||
2550 | "start": { | ||
2551 | "column": 24, | ||
2552 | "line": 41 | ||
2553 | } | ||
2554 | }, | ||
2555 | { | ||
2556 | "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", | ||
2557 | "end": { | ||
2558 | "column": 3, | ||
2559 | "line": 48 | ||
2560 | }, | ||
2561 | "file": "src/components/settings/settings/EditSettingsForm.js", | ||
2562 | "id": "settings.app.scheduledDNDInfo", | ||
2563 | "start": { | ||
2564 | "column": 20, | ||
2565 | "line": 45 | ||
2566 | } | ||
2567 | }, | ||
2568 | { | ||
2569 | "defaultMessage": "!!!Language", | ||
2570 | "end": { | ||
2571 | "column": 3, | ||
2572 | "line": 52 | ||
2573 | }, | ||
2574 | "file": "src/components/settings/settings/EditSettingsForm.js", | ||
2549 | "id": "settings.app.headlineLanguage", | 2575 | "id": "settings.app.headlineLanguage", |
2550 | "start": { | 2576 | "start": { |
2551 | "column": 20, | 2577 | "column": 20, |
2552 | "line": 41 | 2578 | "line": 49 |
2553 | } | 2579 | } |
2554 | }, | 2580 | }, |
2555 | { | 2581 | { |
2556 | "defaultMessage": "!!!Updates", | 2582 | "defaultMessage": "!!!Updates", |
2557 | "end": { | 2583 | "end": { |
2558 | "column": 3, | 2584 | "column": 3, |
2559 | "line": 48 | 2585 | "line": 56 |
2560 | }, | 2586 | }, |
2561 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2587 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2562 | "id": "settings.app.headlineUpdates", | 2588 | "id": "settings.app.headlineUpdates", |
2563 | "start": { | 2589 | "start": { |
2564 | "column": 19, | 2590 | "column": 19, |
2565 | "line": 45 | 2591 | "line": 53 |
2566 | } | 2592 | } |
2567 | }, | 2593 | }, |
2568 | { | 2594 | { |
2569 | "defaultMessage": "!!!Appearance", | 2595 | "defaultMessage": "!!!Appearance", |
2570 | "end": { | 2596 | "end": { |
2571 | "column": 3, | 2597 | "column": 3, |
2572 | "line": 52 | 2598 | "line": 60 |
2573 | }, | 2599 | }, |
2574 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2600 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2575 | "id": "settings.app.headlineAppearance", | 2601 | "id": "settings.app.headlineAppearance", |
2576 | "start": { | 2602 | "start": { |
2577 | "column": 22, | 2603 | "column": 22, |
2578 | "line": 49 | 2604 | "line": 57 |
2579 | } | 2605 | } |
2580 | }, | 2606 | }, |
2581 | { | 2607 | { |
2582 | "defaultMessage": "!!!Advanced", | 2608 | "defaultMessage": "!!!Advanced", |
2583 | "end": { | 2609 | "end": { |
2584 | "column": 3, | 2610 | "column": 3, |
2585 | "line": 56 | 2611 | "line": 64 |
2586 | }, | 2612 | }, |
2587 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2613 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2588 | "id": "settings.app.headlineAdvanced", | 2614 | "id": "settings.app.headlineAdvanced", |
2589 | "start": { | 2615 | "start": { |
2590 | "column": 20, | 2616 | "column": 20, |
2591 | "line": 53 | 2617 | "line": 61 |
2592 | } | 2618 | } |
2593 | }, | 2619 | }, |
2594 | { | 2620 | { |
2595 | "defaultMessage": "!!!Help us to translate Ferdi into your language.", | 2621 | "defaultMessage": "!!!Help us to translate Ferdi into your language.", |
2596 | "end": { | 2622 | "end": { |
2597 | "column": 3, | 2623 | "column": 3, |
2598 | "line": 60 | 2624 | "line": 68 |
2599 | }, | 2625 | }, |
2600 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2626 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2601 | "id": "settings.app.translationHelp", | 2627 | "id": "settings.app.translationHelp", |
2602 | "start": { | 2628 | "start": { |
2603 | "column": 19, | 2629 | "column": 19, |
2604 | "line": 57 | 2630 | "line": 65 |
2605 | } | 2631 | } |
2606 | }, | 2632 | }, |
2607 | { | 2633 | { |
2608 | "defaultMessage": "!!!Cache", | 2634 | "defaultMessage": "!!!Cache", |
2609 | "end": { | 2635 | "end": { |
2610 | "column": 3, | 2636 | "column": 3, |
2611 | "line": 64 | 2637 | "line": 72 |
2612 | }, | 2638 | }, |
2613 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2639 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2614 | "id": "settings.app.subheadlineCache", | 2640 | "id": "settings.app.subheadlineCache", |
2615 | "start": { | 2641 | "start": { |
2616 | "column": 20, | 2642 | "column": 20, |
2617 | "line": 61 | 2643 | "line": 69 |
2618 | } | 2644 | } |
2619 | }, | 2645 | }, |
2620 | { | 2646 | { |
2621 | "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", | 2647 | "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", |
2622 | "end": { | 2648 | "end": { |
2623 | "column": 3, | 2649 | "column": 3, |
2624 | "line": 68 | 2650 | "line": 76 |
2625 | }, | 2651 | }, |
2626 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2652 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2627 | "id": "settings.app.cacheInfo", | 2653 | "id": "settings.app.cacheInfo", |
2628 | "start": { | 2654 | "start": { |
2629 | "column": 13, | 2655 | "column": 13, |
2630 | "line": 65 | 2656 | "line": 73 |
2631 | } | 2657 | } |
2632 | }, | 2658 | }, |
2633 | { | 2659 | { |
2634 | "defaultMessage": "!!!Clear cache", | 2660 | "defaultMessage": "!!!Clear cache", |
2635 | "end": { | 2661 | "end": { |
2636 | "column": 3, | 2662 | "column": 3, |
2637 | "line": 72 | 2663 | "line": 80 |
2638 | }, | 2664 | }, |
2639 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2665 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2640 | "id": "settings.app.buttonClearAllCache", | 2666 | "id": "settings.app.buttonClearAllCache", |
2641 | "start": { | 2667 | "start": { |
2642 | "column": 23, | 2668 | "column": 23, |
2643 | "line": 69 | 2669 | "line": 77 |
2644 | } | 2670 | } |
2645 | }, | 2671 | }, |
2646 | { | 2672 | { |
2647 | "defaultMessage": "!!!Check for updates", | 2673 | "defaultMessage": "!!!Check for updates", |
2648 | "end": { | 2674 | "end": { |
2649 | "column": 3, | 2675 | "column": 3, |
2650 | "line": 76 | 2676 | "line": 84 |
2651 | }, | 2677 | }, |
2652 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2678 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2653 | "id": "settings.app.buttonSearchForUpdate", | 2679 | "id": "settings.app.buttonSearchForUpdate", |
2654 | "start": { | 2680 | "start": { |
2655 | "column": 25, | 2681 | "column": 25, |
2656 | "line": 73 | 2682 | "line": 81 |
2657 | } | 2683 | } |
2658 | }, | 2684 | }, |
2659 | { | 2685 | { |
2660 | "defaultMessage": "!!!Restart & install update", | 2686 | "defaultMessage": "!!!Restart & install update", |
2661 | "end": { | 2687 | "end": { |
2662 | "column": 3, | 2688 | "column": 3, |
2663 | "line": 80 | 2689 | "line": 88 |
2664 | }, | 2690 | }, |
2665 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2691 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2666 | "id": "settings.app.buttonInstallUpdate", | 2692 | "id": "settings.app.buttonInstallUpdate", |
2667 | "start": { | 2693 | "start": { |
2668 | "column": 23, | 2694 | "column": 23, |
2669 | "line": 77 | 2695 | "line": 85 |
2670 | } | 2696 | } |
2671 | }, | 2697 | }, |
2672 | { | 2698 | { |
2673 | "defaultMessage": "!!!Is searching for update", | 2699 | "defaultMessage": "!!!Is searching for update", |
2674 | "end": { | 2700 | "end": { |
2675 | "column": 3, | 2701 | "column": 3, |
2676 | "line": 84 | 2702 | "line": 92 |
2677 | }, | 2703 | }, |
2678 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2704 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2679 | "id": "settings.app.updateStatusSearching", | 2705 | "id": "settings.app.updateStatusSearching", |
2680 | "start": { | 2706 | "start": { |
2681 | "column": 25, | 2707 | "column": 25, |
2682 | "line": 81 | 2708 | "line": 89 |
2683 | } | 2709 | } |
2684 | }, | 2710 | }, |
2685 | { | 2711 | { |
2686 | "defaultMessage": "!!!Update available, downloading...", | 2712 | "defaultMessage": "!!!Update available, downloading...", |
2687 | "end": { | 2713 | "end": { |
2688 | "column": 3, | 2714 | "column": 3, |
2689 | "line": 88 | 2715 | "line": 96 |
2690 | }, | 2716 | }, |
2691 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2717 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2692 | "id": "settings.app.updateStatusAvailable", | 2718 | "id": "settings.app.updateStatusAvailable", |
2693 | "start": { | 2719 | "start": { |
2694 | "column": 25, | 2720 | "column": 25, |
2695 | "line": 85 | 2721 | "line": 93 |
2696 | } | 2722 | } |
2697 | }, | 2723 | }, |
2698 | { | 2724 | { |
2699 | "defaultMessage": "!!!You are using the latest version of Ferdi", | 2725 | "defaultMessage": "!!!You are using the latest version of Ferdi", |
2700 | "end": { | 2726 | "end": { |
2701 | "column": 3, | 2727 | "column": 3, |
2702 | "line": 92 | 2728 | "line": 100 |
2703 | }, | 2729 | }, |
2704 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2730 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2705 | "id": "settings.app.updateStatusUpToDate", | 2731 | "id": "settings.app.updateStatusUpToDate", |
2706 | "start": { | 2732 | "start": { |
2707 | "column": 24, | 2733 | "column": 24, |
2708 | "line": 89 | 2734 | "line": 97 |
2709 | } | 2735 | } |
2710 | }, | 2736 | }, |
2711 | { | 2737 | { |
2712 | "defaultMessage": "!!!Current version:", | 2738 | "defaultMessage": "!!!Current version:", |
2713 | "end": { | 2739 | "end": { |
2714 | "column": 3, | 2740 | "column": 3, |
2715 | "line": 96 | 2741 | "line": 104 |
2716 | }, | 2742 | }, |
2717 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2743 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2718 | "id": "settings.app.currentVersion", | 2744 | "id": "settings.app.currentVersion", |
2719 | "start": { | 2745 | "start": { |
2720 | "column": 18, | 2746 | "column": 18, |
2721 | "line": 93 | 2747 | "line": 101 |
2722 | } | 2748 | } |
2723 | }, | 2749 | }, |
2724 | { | 2750 | { |
2725 | "defaultMessage": "!!!Changes require restart", | 2751 | "defaultMessage": "!!!Changes require restart", |
2726 | "end": { | 2752 | "end": { |
2727 | "column": 3, | 2753 | "column": 3, |
2728 | "line": 100 | 2754 | "line": 108 |
2729 | }, | 2755 | }, |
2730 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2756 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2731 | "id": "settings.app.restartRequired", | 2757 | "id": "settings.app.restartRequired", |
2732 | "start": { | 2758 | "start": { |
2733 | "column": 29, | 2759 | "column": 29, |
2734 | "line": 97 | 2760 | "line": 105 |
2735 | } | 2761 | } |
2736 | }, | 2762 | }, |
2737 | { | 2763 | { |
2738 | "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", | 2764 | "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", |
2739 | "end": { | 2765 | "end": { |
2740 | "column": 3, | 2766 | "column": 3, |
2741 | "line": 104 | 2767 | "line": 112 |
2742 | }, | 2768 | }, |
2743 | "file": "src/components/settings/settings/EditSettingsForm.js", | 2769 | "file": "src/components/settings/settings/EditSettingsForm.js", |
2744 | "id": "settings.app.languageDisclaimer", | 2770 | "id": "settings.app.languageDisclaimer", |
2745 | "start": { | 2771 | "start": { |
2746 | "column": 22, | 2772 | "column": 22, |
2747 | "line": 101 | 2773 | "line": 109 |
2748 | } | 2774 | } |
2749 | } | 2775 | } |
2750 | ], | 2776 | ], |
@@ -3767,120 +3793,159 @@ | |||
3767 | } | 3793 | } |
3768 | }, | 3794 | }, |
3769 | { | 3795 | { |
3770 | "defaultMessage": "!!!Language", | 3796 | "defaultMessage": "!!!Enable scheduled Do-not-Disturb", |
3771 | "end": { | 3797 | "end": { |
3772 | "column": 3, | 3798 | "column": 3, |
3773 | "line": 71 | 3799 | "line": 71 |
3774 | }, | 3800 | }, |
3775 | "file": "src/containers/settings/EditSettingsScreen.js", | 3801 | "file": "src/containers/settings/EditSettingsScreen.js", |
3802 | "id": "settings.app.form.scheduledDNDEnabled", | ||
3803 | "start": { | ||
3804 | "column": 23, | ||
3805 | "line": 68 | ||
3806 | } | ||
3807 | }, | ||
3808 | { | ||
3809 | "defaultMessage": "!!!From", | ||
3810 | "end": { | ||
3811 | "column": 3, | ||
3812 | "line": 75 | ||
3813 | }, | ||
3814 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
3815 | "id": "settings.app.form.scheduledDNDStart", | ||
3816 | "start": { | ||
3817 | "column": 21, | ||
3818 | "line": 72 | ||
3819 | } | ||
3820 | }, | ||
3821 | { | ||
3822 | "defaultMessage": "!!!To", | ||
3823 | "end": { | ||
3824 | "column": 3, | ||
3825 | "line": 79 | ||
3826 | }, | ||
3827 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
3828 | "id": "settings.app.form.scheduledDNDEnd", | ||
3829 | "start": { | ||
3830 | "column": 19, | ||
3831 | "line": 76 | ||
3832 | } | ||
3833 | }, | ||
3834 | { | ||
3835 | "defaultMessage": "!!!Language", | ||
3836 | "end": { | ||
3837 | "column": 3, | ||
3838 | "line": 83 | ||
3839 | }, | ||
3840 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
3776 | "id": "settings.app.form.language", | 3841 | "id": "settings.app.form.language", |
3777 | "start": { | 3842 | "start": { |
3778 | "column": 12, | 3843 | "column": 12, |
3779 | "line": 68 | 3844 | "line": 80 |
3780 | } | 3845 | } |
3781 | }, | 3846 | }, |
3782 | { | 3847 | { |
3783 | "defaultMessage": "!!!Dark Mode", | 3848 | "defaultMessage": "!!!Dark Mode", |
3784 | "end": { | 3849 | "end": { |
3785 | "column": 3, | 3850 | "column": 3, |
3786 | "line": 75 | 3851 | "line": 87 |
3787 | }, | 3852 | }, |
3788 | "file": "src/containers/settings/EditSettingsScreen.js", | 3853 | "file": "src/containers/settings/EditSettingsScreen.js", |
3789 | "id": "settings.app.form.darkMode", | 3854 | "id": "settings.app.form.darkMode", |
3790 | "start": { | 3855 | "start": { |
3791 | "column": 12, | 3856 | "column": 12, |
3792 | "line": 72 | 3857 | "line": 84 |
3793 | } | 3858 | } |
3794 | }, | 3859 | }, |
3795 | { | 3860 | { |
3796 | "defaultMessage": "!!!Display disabled services tabs", | 3861 | "defaultMessage": "!!!Display disabled services tabs", |
3797 | "end": { | 3862 | "end": { |
3798 | "column": 3, | 3863 | "column": 3, |
3799 | "line": 79 | 3864 | "line": 91 |
3800 | }, | 3865 | }, |
3801 | "file": "src/containers/settings/EditSettingsScreen.js", | 3866 | "file": "src/containers/settings/EditSettingsScreen.js", |
3802 | "id": "settings.app.form.showDisabledServices", | 3867 | "id": "settings.app.form.showDisabledServices", |
3803 | "start": { | 3868 | "start": { |
3804 | "column": 24, | 3869 | "column": 24, |
3805 | "line": 76 | 3870 | "line": 88 |
3806 | } | 3871 | } |
3807 | }, | 3872 | }, |
3808 | { | 3873 | { |
3809 | "defaultMessage": "!!!Show unread message badge when notifications are disabled", | 3874 | "defaultMessage": "!!!Show unread message badge when notifications are disabled", |
3810 | "end": { | 3875 | "end": { |
3811 | "column": 3, | 3876 | "column": 3, |
3812 | "line": 83 | 3877 | "line": 95 |
3813 | }, | 3878 | }, |
3814 | "file": "src/containers/settings/EditSettingsScreen.js", | 3879 | "file": "src/containers/settings/EditSettingsScreen.js", |
3815 | "id": "settings.app.form.showMessagesBadgesWhenMuted", | 3880 | "id": "settings.app.form.showMessagesBadgesWhenMuted", |
3816 | "start": { | 3881 | "start": { |
3817 | "column": 29, | 3882 | "column": 29, |
3818 | "line": 80 | 3883 | "line": 92 |
3819 | } | 3884 | } |
3820 | }, | 3885 | }, |
3821 | { | 3886 | { |
3822 | "defaultMessage": "!!!Enable spell checking", | 3887 | "defaultMessage": "!!!Enable spell checking", |
3823 | "end": { | 3888 | "end": { |
3824 | "column": 3, | 3889 | "column": 3, |
3825 | "line": 87 | 3890 | "line": 99 |
3826 | }, | 3891 | }, |
3827 | "file": "src/containers/settings/EditSettingsScreen.js", | 3892 | "file": "src/containers/settings/EditSettingsScreen.js", |
3828 | "id": "settings.app.form.enableSpellchecking", | 3893 | "id": "settings.app.form.enableSpellchecking", |
3829 | "start": { | 3894 | "start": { |
3830 | "column": 23, | 3895 | "column": 23, |
3831 | "line": 84 | 3896 | "line": 96 |
3832 | } | 3897 | } |
3833 | }, | 3898 | }, |
3834 | { | 3899 | { |
3835 | "defaultMessage": "!!!Enable GPU Acceleration", | 3900 | "defaultMessage": "!!!Enable GPU Acceleration", |
3836 | "end": { | 3901 | "end": { |
3837 | "column": 3, | 3902 | "column": 3, |
3838 | "line": 91 | 3903 | "line": 103 |
3839 | }, | 3904 | }, |
3840 | "file": "src/containers/settings/EditSettingsScreen.js", | 3905 | "file": "src/containers/settings/EditSettingsScreen.js", |
3841 | "id": "settings.app.form.enableGPUAcceleration", | 3906 | "id": "settings.app.form.enableGPUAcceleration", |
3842 | "start": { | 3907 | "start": { |
3843 | "column": 25, | 3908 | "column": 25, |
3844 | "line": 88 | 3909 | "line": 100 |
3845 | } | 3910 | } |
3846 | }, | 3911 | }, |
3847 | { | 3912 | { |
3848 | "defaultMessage": "!!!Include beta versions", | 3913 | "defaultMessage": "!!!Include beta versions", |
3849 | "end": { | 3914 | "end": { |
3850 | "column": 3, | 3915 | "column": 3, |
3851 | "line": 95 | 3916 | "line": 107 |
3852 | }, | 3917 | }, |
3853 | "file": "src/containers/settings/EditSettingsScreen.js", | 3918 | "file": "src/containers/settings/EditSettingsScreen.js", |
3854 | "id": "settings.app.form.beta", | 3919 | "id": "settings.app.form.beta", |
3855 | "start": { | 3920 | "start": { |
3856 | "column": 8, | 3921 | "column": 8, |
3857 | "line": 92 | 3922 | "line": 104 |
3858 | } | 3923 | } |
3859 | }, | 3924 | }, |
3860 | { | 3925 | { |
3861 | "defaultMessage": "!!!Enable Franz Todos", | 3926 | "defaultMessage": "!!!Enable Franz Todos", |
3862 | "end": { | 3927 | "end": { |
3863 | "column": 3, | 3928 | "column": 3, |
3864 | "line": 99 | 3929 | "line": 111 |
3865 | }, | 3930 | }, |
3866 | "file": "src/containers/settings/EditSettingsScreen.js", | 3931 | "file": "src/containers/settings/EditSettingsScreen.js", |
3867 | "id": "settings.app.form.enableTodos", | 3932 | "id": "settings.app.form.enableTodos", |
3868 | "start": { | 3933 | "start": { |
3869 | "column": 15, | 3934 | "column": 15, |
3870 | "line": 96 | 3935 | "line": 108 |
3871 | } | 3936 | } |
3872 | }, | 3937 | }, |
3873 | { | 3938 | { |
3874 | "defaultMessage": "!!!Keep all workspaces loaded", | 3939 | "defaultMessage": "!!!Keep all workspaces loaded", |
3875 | "end": { | 3940 | "end": { |
3876 | "column": 3, | 3941 | "column": 3, |
3877 | "line": 103 | 3942 | "line": 115 |
3878 | }, | 3943 | }, |
3879 | "file": "src/containers/settings/EditSettingsScreen.js", | 3944 | "file": "src/containers/settings/EditSettingsScreen.js", |
3880 | "id": "settings.app.form.keepAllWorkspacesLoaded", | 3945 | "id": "settings.app.form.keepAllWorkspacesLoaded", |
3881 | "start": { | 3946 | "start": { |
3882 | "column": 27, | 3947 | "column": 27, |
3883 | "line": 100 | 3948 | "line": 112 |
3884 | } | 3949 | } |
3885 | } | 3950 | } |
3886 | ], | 3951 | ], |
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 5d32aa4c1..8997a1948 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json | |||
@@ -232,6 +232,9 @@ | |||
232 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", | 232 | "settings.app.form.minimizeToSystemTray": "Minimize Ferdi to system tray", |
233 | "settings.app.form.privateNotifications": "Don't show message content in notifications", | 233 | "settings.app.form.privateNotifications": "Don't show message content in notifications", |
234 | "settings.app.form.runInBackground": "Keep Ferdi in background when closing the window", | 234 | "settings.app.form.runInBackground": "Keep Ferdi in background when closing the window", |
235 | "settings.app.form.scheduledDNDEnabled": "Enable scheduled Do-not-Disturb", | ||
236 | "settings.app.form.scheduledDNDEnd": "To", | ||
237 | "settings.app.form.scheduledDNDStart": "From", | ||
235 | "settings.app.form.server": "Server", | 238 | "settings.app.form.server": "Server", |
236 | "settings.app.form.showDisabledServices": "Display disabled services tabs", | 239 | "settings.app.form.showDisabledServices": "Display disabled services tabs", |
237 | "settings.app.form.showMessagesBadgesWhenMuted": "Show unread message badge when notifications are disabled", | 240 | "settings.app.form.showMessagesBadgesWhenMuted": "Show unread message badge when notifications are disabled", |
@@ -246,6 +249,8 @@ | |||
246 | "settings.app.lockedPassword": "Ferdi Lock Password", | 249 | "settings.app.lockedPassword": "Ferdi Lock Password", |
247 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", | 250 | "settings.app.lockedPasswordInfo": "Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", |
248 | "settings.app.restartRequired": "Changes require restart", | 251 | "settings.app.restartRequired": "Changes require restart", |
252 | "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.", | ||
253 | "settings.app.scheduledDNDTimeInfo": "Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", | ||
249 | "settings.app.serverInfo": "We advice you to logout after changing your server as your settings might not be saved otherwise.", | 254 | "settings.app.serverInfo": "We advice you to logout after changing your server as your settings might not be saved otherwise.", |
250 | "settings.app.subheadlineCache": "Cache", | 255 | "settings.app.subheadlineCache": "Cache", |
251 | "settings.app.todoServerInfo": "This server will be used for the \"Ferdi Todo\" feature. (default: https://app.Ferditodos.com)", | 256 | "settings.app.todoServerInfo": "This server will be used for the \"Ferdi Todo\" feature. (default: https://app.Ferditodos.com)", |
@@ -412,4 +417,4 @@ | |||
412 | "workspaceDrawer.workspaceFeatureInfo": "<p>Ferdi Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.</p><p>You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.</p>", | 417 | "workspaceDrawer.workspaceFeatureInfo": "<p>Ferdi Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.</p><p>You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.</p>", |
413 | "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", | 418 | "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", |
414 | "workspaces.switchingIndicator.switchingTo": "Switching to" | 419 | "workspaces.switchingIndicator.switchingTo": "Switching to" |
415 | } \ No newline at end of file | 420 | } |
diff --git a/src/i18n/locales/whitelist_en-US.json b/src/i18n/locales/whitelist_en-US.json index 32960f8ce..fe51488c7 100644 --- a/src/i18n/locales/whitelist_en-US.json +++ b/src/i18n/locales/whitelist_en-US.json | |||
@@ -1,2 +1 @@ | |||
1 | [ | [] | |
2 | ] \ No newline at end of file | ||
diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index c8d85f1af..ccbc155f3 100644 --- a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json +++ b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json | |||
@@ -78,15 +78,41 @@ | |||
78 | } | 78 | } |
79 | }, | 79 | }, |
80 | { | 80 | { |
81 | "id": "settings.app.scheduledDNDTimeInfo", | ||
82 | "defaultMessage": "!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", | ||
83 | "file": "src/components/settings/settings/EditSettingsForm.js", | ||
84 | "start": { | ||
85 | "line": 41, | ||
86 | "column": 24 | ||
87 | }, | ||
88 | "end": { | ||
89 | "line": 44, | ||
90 | "column": 3 | ||
91 | } | ||
92 | }, | ||
93 | { | ||
94 | "id": "settings.app.scheduledDNDInfo", | ||
95 | "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", | ||
96 | "file": "src/components/settings/settings/EditSettingsForm.js", | ||
97 | "start": { | ||
98 | "line": 45, | ||
99 | "column": 20 | ||
100 | }, | ||
101 | "end": { | ||
102 | "line": 48, | ||
103 | "column": 3 | ||
104 | } | ||
105 | }, | ||
106 | { | ||
81 | "id": "settings.app.headlineLanguage", | 107 | "id": "settings.app.headlineLanguage", |
82 | "defaultMessage": "!!!Language", | 108 | "defaultMessage": "!!!Language", |
83 | "file": "src/components/settings/settings/EditSettingsForm.js", | 109 | "file": "src/components/settings/settings/EditSettingsForm.js", |
84 | "start": { | 110 | "start": { |
85 | "line": 41, | 111 | "line": 49, |
86 | "column": 20 | 112 | "column": 20 |
87 | }, | 113 | }, |
88 | "end": { | 114 | "end": { |
89 | "line": 44, | 115 | "line": 52, |
90 | "column": 3 | 116 | "column": 3 |
91 | } | 117 | } |
92 | }, | 118 | }, |
@@ -95,11 +121,11 @@ | |||
95 | "defaultMessage": "!!!Updates", | 121 | "defaultMessage": "!!!Updates", |
96 | "file": "src/components/settings/settings/EditSettingsForm.js", | 122 | "file": "src/components/settings/settings/EditSettingsForm.js", |
97 | "start": { | 123 | "start": { |
98 | "line": 45, | 124 | "line": 53, |
99 | "column": 19 | 125 | "column": 19 |
100 | }, | 126 | }, |
101 | "end": { | 127 | "end": { |
102 | "line": 48, | 128 | "line": 56, |
103 | "column": 3 | 129 | "column": 3 |
104 | } | 130 | } |
105 | }, | 131 | }, |
@@ -108,11 +134,11 @@ | |||
108 | "defaultMessage": "!!!Appearance", | 134 | "defaultMessage": "!!!Appearance", |
109 | "file": "src/components/settings/settings/EditSettingsForm.js", | 135 | "file": "src/components/settings/settings/EditSettingsForm.js", |
110 | "start": { | 136 | "start": { |
111 | "line": 49, | 137 | "line": 57, |
112 | "column": 22 | 138 | "column": 22 |
113 | }, | 139 | }, |
114 | "end": { | 140 | "end": { |
115 | "line": 52, | 141 | "line": 60, |
116 | "column": 3 | 142 | "column": 3 |
117 | } | 143 | } |
118 | }, | 144 | }, |
@@ -121,11 +147,11 @@ | |||
121 | "defaultMessage": "!!!Advanced", | 147 | "defaultMessage": "!!!Advanced", |
122 | "file": "src/components/settings/settings/EditSettingsForm.js", | 148 | "file": "src/components/settings/settings/EditSettingsForm.js", |
123 | "start": { | 149 | "start": { |
124 | "line": 53, | 150 | "line": 61, |
125 | "column": 20 | 151 | "column": 20 |
126 | }, | 152 | }, |
127 | "end": { | 153 | "end": { |
128 | "line": 56, | 154 | "line": 64, |
129 | "column": 3 | 155 | "column": 3 |
130 | } | 156 | } |
131 | }, | 157 | }, |
@@ -134,11 +160,11 @@ | |||
134 | "defaultMessage": "!!!Help us to translate Ferdi into your language.", | 160 | "defaultMessage": "!!!Help us to translate Ferdi into your language.", |
135 | "file": "src/components/settings/settings/EditSettingsForm.js", | 161 | "file": "src/components/settings/settings/EditSettingsForm.js", |
136 | "start": { | 162 | "start": { |
137 | "line": 57, | 163 | "line": 65, |
138 | "column": 19 | 164 | "column": 19 |
139 | }, | 165 | }, |
140 | "end": { | 166 | "end": { |
141 | "line": 60, | 167 | "line": 68, |
142 | "column": 3 | 168 | "column": 3 |
143 | } | 169 | } |
144 | }, | 170 | }, |
@@ -147,11 +173,11 @@ | |||
147 | "defaultMessage": "!!!Cache", | 173 | "defaultMessage": "!!!Cache", |
148 | "file": "src/components/settings/settings/EditSettingsForm.js", | 174 | "file": "src/components/settings/settings/EditSettingsForm.js", |
149 | "start": { | 175 | "start": { |
150 | "line": 61, | 176 | "line": 69, |
151 | "column": 20 | 177 | "column": 20 |
152 | }, | 178 | }, |
153 | "end": { | 179 | "end": { |
154 | "line": 64, | 180 | "line": 72, |
155 | "column": 3 | 181 | "column": 3 |
156 | } | 182 | } |
157 | }, | 183 | }, |
@@ -160,11 +186,11 @@ | |||
160 | "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", | 186 | "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", |
161 | "file": "src/components/settings/settings/EditSettingsForm.js", | 187 | "file": "src/components/settings/settings/EditSettingsForm.js", |
162 | "start": { | 188 | "start": { |
163 | "line": 65, | 189 | "line": 73, |
164 | "column": 13 | 190 | "column": 13 |
165 | }, | 191 | }, |
166 | "end": { | 192 | "end": { |
167 | "line": 68, | 193 | "line": 76, |
168 | "column": 3 | 194 | "column": 3 |
169 | } | 195 | } |
170 | }, | 196 | }, |
@@ -173,11 +199,11 @@ | |||
173 | "defaultMessage": "!!!Clear cache", | 199 | "defaultMessage": "!!!Clear cache", |
174 | "file": "src/components/settings/settings/EditSettingsForm.js", | 200 | "file": "src/components/settings/settings/EditSettingsForm.js", |
175 | "start": { | 201 | "start": { |
176 | "line": 69, | 202 | "line": 77, |
177 | "column": 23 | 203 | "column": 23 |
178 | }, | 204 | }, |
179 | "end": { | 205 | "end": { |
180 | "line": 72, | 206 | "line": 80, |
181 | "column": 3 | 207 | "column": 3 |
182 | } | 208 | } |
183 | }, | 209 | }, |
@@ -186,11 +212,11 @@ | |||
186 | "defaultMessage": "!!!Check for updates", | 212 | "defaultMessage": "!!!Check for updates", |
187 | "file": "src/components/settings/settings/EditSettingsForm.js", | 213 | "file": "src/components/settings/settings/EditSettingsForm.js", |
188 | "start": { | 214 | "start": { |
189 | "line": 73, | 215 | "line": 81, |
190 | "column": 25 | 216 | "column": 25 |
191 | }, | 217 | }, |
192 | "end": { | 218 | "end": { |
193 | "line": 76, | 219 | "line": 84, |
194 | "column": 3 | 220 | "column": 3 |
195 | } | 221 | } |
196 | }, | 222 | }, |
@@ -199,11 +225,11 @@ | |||
199 | "defaultMessage": "!!!Restart & install update", | 225 | "defaultMessage": "!!!Restart & install update", |
200 | "file": "src/components/settings/settings/EditSettingsForm.js", | 226 | "file": "src/components/settings/settings/EditSettingsForm.js", |
201 | "start": { | 227 | "start": { |
202 | "line": 77, | 228 | "line": 85, |
203 | "column": 23 | 229 | "column": 23 |
204 | }, | 230 | }, |
205 | "end": { | 231 | "end": { |
206 | "line": 80, | 232 | "line": 88, |
207 | "column": 3 | 233 | "column": 3 |
208 | } | 234 | } |
209 | }, | 235 | }, |
@@ -212,11 +238,11 @@ | |||
212 | "defaultMessage": "!!!Is searching for update", | 238 | "defaultMessage": "!!!Is searching for update", |
213 | "file": "src/components/settings/settings/EditSettingsForm.js", | 239 | "file": "src/components/settings/settings/EditSettingsForm.js", |
214 | "start": { | 240 | "start": { |
215 | "line": 81, | 241 | "line": 89, |
216 | "column": 25 | 242 | "column": 25 |
217 | }, | 243 | }, |
218 | "end": { | 244 | "end": { |
219 | "line": 84, | 245 | "line": 92, |
220 | "column": 3 | 246 | "column": 3 |
221 | } | 247 | } |
222 | }, | 248 | }, |
@@ -225,11 +251,11 @@ | |||
225 | "defaultMessage": "!!!Update available, downloading...", | 251 | "defaultMessage": "!!!Update available, downloading...", |
226 | "file": "src/components/settings/settings/EditSettingsForm.js", | 252 | "file": "src/components/settings/settings/EditSettingsForm.js", |
227 | "start": { | 253 | "start": { |
228 | "line": 85, | 254 | "line": 93, |
229 | "column": 25 | 255 | "column": 25 |
230 | }, | 256 | }, |
231 | "end": { | 257 | "end": { |
232 | "line": 88, | 258 | "line": 96, |
233 | "column": 3 | 259 | "column": 3 |
234 | } | 260 | } |
235 | }, | 261 | }, |
@@ -238,11 +264,11 @@ | |||
238 | "defaultMessage": "!!!You are using the latest version of Ferdi", | 264 | "defaultMessage": "!!!You are using the latest version of Ferdi", |
239 | "file": "src/components/settings/settings/EditSettingsForm.js", | 265 | "file": "src/components/settings/settings/EditSettingsForm.js", |
240 | "start": { | 266 | "start": { |
241 | "line": 89, | 267 | "line": 97, |
242 | "column": 24 | 268 | "column": 24 |
243 | }, | 269 | }, |
244 | "end": { | 270 | "end": { |
245 | "line": 92, | 271 | "line": 100, |
246 | "column": 3 | 272 | "column": 3 |
247 | } | 273 | } |
248 | }, | 274 | }, |
@@ -251,11 +277,11 @@ | |||
251 | "defaultMessage": "!!!Current version:", | 277 | "defaultMessage": "!!!Current version:", |
252 | "file": "src/components/settings/settings/EditSettingsForm.js", | 278 | "file": "src/components/settings/settings/EditSettingsForm.js", |
253 | "start": { | 279 | "start": { |
254 | "line": 93, | 280 | "line": 101, |
255 | "column": 18 | 281 | "column": 18 |
256 | }, | 282 | }, |
257 | "end": { | 283 | "end": { |
258 | "line": 96, | 284 | "line": 104, |
259 | "column": 3 | 285 | "column": 3 |
260 | } | 286 | } |
261 | }, | 287 | }, |
@@ -264,11 +290,11 @@ | |||
264 | "defaultMessage": "!!!Changes require restart", | 290 | "defaultMessage": "!!!Changes require restart", |
265 | "file": "src/components/settings/settings/EditSettingsForm.js", | 291 | "file": "src/components/settings/settings/EditSettingsForm.js", |
266 | "start": { | 292 | "start": { |
267 | "line": 97, | 293 | "line": 105, |
268 | "column": 29 | 294 | "column": 29 |
269 | }, | 295 | }, |
270 | "end": { | 296 | "end": { |
271 | "line": 100, | 297 | "line": 108, |
272 | "column": 3 | 298 | "column": 3 |
273 | } | 299 | } |
274 | }, | 300 | }, |
@@ -277,11 +303,11 @@ | |||
277 | "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", | 303 | "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", |
278 | "file": "src/components/settings/settings/EditSettingsForm.js", | 304 | "file": "src/components/settings/settings/EditSettingsForm.js", |
279 | "start": { | 305 | "start": { |
280 | "line": 101, | 306 | "line": 109, |
281 | "column": 22 | 307 | "column": 22 |
282 | }, | 308 | }, |
283 | "end": { | 309 | "end": { |
284 | "line": 104, | 310 | "line": 112, |
285 | "column": 3 | 311 | "column": 3 |
286 | } | 312 | } |
287 | } | 313 | } |
diff --git a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json index 83d9cefe8..da3d8d7f4 100644 --- a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json +++ b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json | |||
@@ -130,15 +130,54 @@ | |||
130 | } | 130 | } |
131 | }, | 131 | }, |
132 | { | 132 | { |
133 | "id": "settings.app.form.scheduledDNDEnabled", | ||
134 | "defaultMessage": "!!!Enable scheduled Do-not-Disturb", | ||
135 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
136 | "start": { | ||
137 | "line": 68, | ||
138 | "column": 23 | ||
139 | }, | ||
140 | "end": { | ||
141 | "line": 71, | ||
142 | "column": 3 | ||
143 | } | ||
144 | }, | ||
145 | { | ||
146 | "id": "settings.app.form.scheduledDNDStart", | ||
147 | "defaultMessage": "!!!From", | ||
148 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
149 | "start": { | ||
150 | "line": 72, | ||
151 | "column": 21 | ||
152 | }, | ||
153 | "end": { | ||
154 | "line": 75, | ||
155 | "column": 3 | ||
156 | } | ||
157 | }, | ||
158 | { | ||
159 | "id": "settings.app.form.scheduledDNDEnd", | ||
160 | "defaultMessage": "!!!To", | ||
161 | "file": "src/containers/settings/EditSettingsScreen.js", | ||
162 | "start": { | ||
163 | "line": 76, | ||
164 | "column": 19 | ||
165 | }, | ||
166 | "end": { | ||
167 | "line": 79, | ||
168 | "column": 3 | ||
169 | } | ||
170 | }, | ||
171 | { | ||
133 | "id": "settings.app.form.language", | 172 | "id": "settings.app.form.language", |
134 | "defaultMessage": "!!!Language", | 173 | "defaultMessage": "!!!Language", |
135 | "file": "src/containers/settings/EditSettingsScreen.js", | 174 | "file": "src/containers/settings/EditSettingsScreen.js", |
136 | "start": { | 175 | "start": { |
137 | "line": 68, | 176 | "line": 80, |
138 | "column": 12 | 177 | "column": 12 |
139 | }, | 178 | }, |
140 | "end": { | 179 | "end": { |
141 | "line": 71, | 180 | "line": 83, |
142 | "column": 3 | 181 | "column": 3 |
143 | } | 182 | } |
144 | }, | 183 | }, |
@@ -147,11 +186,11 @@ | |||
147 | "defaultMessage": "!!!Dark Mode", | 186 | "defaultMessage": "!!!Dark Mode", |
148 | "file": "src/containers/settings/EditSettingsScreen.js", | 187 | "file": "src/containers/settings/EditSettingsScreen.js", |
149 | "start": { | 188 | "start": { |
150 | "line": 72, | 189 | "line": 84, |
151 | "column": 12 | 190 | "column": 12 |
152 | }, | 191 | }, |
153 | "end": { | 192 | "end": { |
154 | "line": 75, | 193 | "line": 87, |
155 | "column": 3 | 194 | "column": 3 |
156 | } | 195 | } |
157 | }, | 196 | }, |
@@ -160,11 +199,11 @@ | |||
160 | "defaultMessage": "!!!Display disabled services tabs", | 199 | "defaultMessage": "!!!Display disabled services tabs", |
161 | "file": "src/containers/settings/EditSettingsScreen.js", | 200 | "file": "src/containers/settings/EditSettingsScreen.js", |
162 | "start": { | 201 | "start": { |
163 | "line": 76, | 202 | "line": 88, |
164 | "column": 24 | 203 | "column": 24 |
165 | }, | 204 | }, |
166 | "end": { | 205 | "end": { |
167 | "line": 79, | 206 | "line": 91, |
168 | "column": 3 | 207 | "column": 3 |
169 | } | 208 | } |
170 | }, | 209 | }, |
@@ -173,11 +212,11 @@ | |||
173 | "defaultMessage": "!!!Show unread message badge when notifications are disabled", | 212 | "defaultMessage": "!!!Show unread message badge when notifications are disabled", |
174 | "file": "src/containers/settings/EditSettingsScreen.js", | 213 | "file": "src/containers/settings/EditSettingsScreen.js", |
175 | "start": { | 214 | "start": { |
176 | "line": 80, | 215 | "line": 92, |
177 | "column": 29 | 216 | "column": 29 |
178 | }, | 217 | }, |
179 | "end": { | 218 | "end": { |
180 | "line": 83, | 219 | "line": 95, |
181 | "column": 3 | 220 | "column": 3 |
182 | } | 221 | } |
183 | }, | 222 | }, |
@@ -186,11 +225,11 @@ | |||
186 | "defaultMessage": "!!!Enable spell checking", | 225 | "defaultMessage": "!!!Enable spell checking", |
187 | "file": "src/containers/settings/EditSettingsScreen.js", | 226 | "file": "src/containers/settings/EditSettingsScreen.js", |
188 | "start": { | 227 | "start": { |
189 | "line": 84, | 228 | "line": 96, |
190 | "column": 23 | 229 | "column": 23 |
191 | }, | 230 | }, |
192 | "end": { | 231 | "end": { |
193 | "line": 87, | 232 | "line": 99, |
194 | "column": 3 | 233 | "column": 3 |
195 | } | 234 | } |
196 | }, | 235 | }, |
@@ -199,11 +238,11 @@ | |||
199 | "defaultMessage": "!!!Enable GPU Acceleration", | 238 | "defaultMessage": "!!!Enable GPU Acceleration", |
200 | "file": "src/containers/settings/EditSettingsScreen.js", | 239 | "file": "src/containers/settings/EditSettingsScreen.js", |
201 | "start": { | 240 | "start": { |
202 | "line": 88, | 241 | "line": 100, |
203 | "column": 25 | 242 | "column": 25 |
204 | }, | 243 | }, |
205 | "end": { | 244 | "end": { |
206 | "line": 91, | 245 | "line": 103, |
207 | "column": 3 | 246 | "column": 3 |
208 | } | 247 | } |
209 | }, | 248 | }, |
@@ -212,11 +251,11 @@ | |||
212 | "defaultMessage": "!!!Include beta versions", | 251 | "defaultMessage": "!!!Include beta versions", |
213 | "file": "src/containers/settings/EditSettingsScreen.js", | 252 | "file": "src/containers/settings/EditSettingsScreen.js", |
214 | "start": { | 253 | "start": { |
215 | "line": 92, | 254 | "line": 104, |
216 | "column": 8 | 255 | "column": 8 |
217 | }, | 256 | }, |
218 | "end": { | 257 | "end": { |
219 | "line": 95, | 258 | "line": 107, |
220 | "column": 3 | 259 | "column": 3 |
221 | } | 260 | } |
222 | }, | 261 | }, |
@@ -225,11 +264,11 @@ | |||
225 | "defaultMessage": "!!!Enable Franz Todos", | 264 | "defaultMessage": "!!!Enable Franz Todos", |
226 | "file": "src/containers/settings/EditSettingsScreen.js", | 265 | "file": "src/containers/settings/EditSettingsScreen.js", |
227 | "start": { | 266 | "start": { |
228 | "line": 96, | 267 | "line": 108, |
229 | "column": 15 | 268 | "column": 15 |
230 | }, | 269 | }, |
231 | "end": { | 270 | "end": { |
232 | "line": 99, | 271 | "line": 111, |
233 | "column": 3 | 272 | "column": 3 |
234 | } | 273 | } |
235 | }, | 274 | }, |
@@ -238,11 +277,11 @@ | |||
238 | "defaultMessage": "!!!Keep all workspaces loaded", | 277 | "defaultMessage": "!!!Keep all workspaces loaded", |
239 | "file": "src/containers/settings/EditSettingsScreen.js", | 278 | "file": "src/containers/settings/EditSettingsScreen.js", |
240 | "start": { | 279 | "start": { |
241 | "line": 100, | 280 | "line": 112, |
242 | "column": 27 | 281 | "column": 27 |
243 | }, | 282 | }, |
244 | "end": { | 283 | "end": { |
245 | "line": 103, | 284 | "line": 115, |
246 | "column": 3 | 285 | "column": 3 |
247 | } | 286 | } |
248 | } | 287 | } |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index f88b14983..45350d8f5 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -11,6 +11,7 @@ import Store from './lib/Store'; | |||
11 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import { matchRoute } from '../helpers/routing-helpers'; |
14 | import { isInTimeframe } from '../helpers/schedule-helpers'; | ||
14 | import { workspaceStore } from '../features/workspaces'; | 15 | import { workspaceStore } from '../features/workspaces'; |
15 | import { serviceLimitStore } from '../features/serviceLimit'; | 16 | import { serviceLimitStore } from '../features/serviceLimit'; |
16 | import { RESTRICTION_TYPES } from '../models/Service'; | 17 | import { RESTRICTION_TYPES } from '../models/Service'; |
@@ -422,6 +423,18 @@ export default class ServicesStore extends Store { | |||
422 | }); | 423 | }); |
423 | } else if (channel === 'notification') { | 424 | } else if (channel === 'notification') { |
424 | const { options } = args[0]; | 425 | const { options } = args[0]; |
426 | |||
427 | // Check if we are in scheduled Do-not-Disturb time | ||
428 | const { | ||
429 | scheduledDNDEnabled, | ||
430 | scheduledDNDStart, | ||
431 | scheduledDNDEnd, | ||
432 | } = this.stores.settings.all.app; | ||
433 | |||
434 | if (scheduledDNDEnabled && isInTimeframe(scheduledDNDStart, scheduledDNDEnd)) { | ||
435 | return; | ||
436 | } | ||
437 | |||
425 | if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) { | 438 | if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) { |
426 | Object.assign(options, { | 439 | Object.assign(options, { |
427 | silent: true, | 440 | silent: true, |