diff options
author | 2021-08-13 08:05:12 +0530 | |
---|---|---|
committer | 2021-08-13 07:32:56 +0000 | |
commit | 9f2277735764c07929e4b9e6fa5a11ae916bb2c6 (patch) | |
tree | 957f40672bb090cc765237a17a15f6408f12cdbf | |
parent | chore: Add entitlements for screen-capture-permissions (diff) | |
download | ferdium-app-9f2277735764c07929e4b9e6fa5a11ae916bb2c6.tar.gz ferdium-app-9f2277735764c07929e4b9e6fa5a11ae916bb2c6.tar.zst ferdium-app-9f2277735764c07929e4b9e6fa5a11ae916bb2c6.zip |
chore: Replace old '@meetfranz/electron-notification-state' with 'macos-notification-state'
-rw-r--r-- | package-lock.json | 31 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/electron/ipc-api/dnd.js | 9 |
3 files changed, 11 insertions, 31 deletions
diff --git a/package-lock.json b/package-lock.json index e04d61d4f..333a26af1 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -5697,16 +5697,6 @@ | |||
5697 | "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.5.0.tgz", | 5697 | "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.5.0.tgz", |
5698 | "integrity": "sha512-NztRgUxSYD+ImaKN94Tg66VVVqXj4SmlDGzZoz48H9riJ+Awha56sfXH2fegw819NWo7KI3oeS1Es0lNQqwr0w==" | 5698 | "integrity": "sha512-NztRgUxSYD+ImaKN94Tg66VVVqXj4SmlDGzZoz48H9riJ+Awha56sfXH2fegw819NWo7KI3oeS1Es0lNQqwr0w==" |
5699 | }, | 5699 | }, |
5700 | "@meetfranz/electron-notification-state": { | ||
5701 | "version": "1.0.0", | ||
5702 | "resolved": "https://registry.npmjs.org/@meetfranz/electron-notification-state/-/electron-notification-state-1.0.0.tgz", | ||
5703 | "integrity": "sha512-0gCEV7DfoasuMA9uY9sN1ufrzSFg/fXB0gHbxagid8EilAjGsbkSSLSl2rweZcIBz+ZgR35Yp7DlAVw/I3cIfA==", | ||
5704 | "requires": { | ||
5705 | "macos-notification-state": "^1.1.0", | ||
5706 | "windows-notification-state": "^1.3.0", | ||
5707 | "windows-quiet-hours": "^1.2.2" | ||
5708 | } | ||
5709 | }, | ||
5710 | "@meetfranz/forms": { | 5700 | "@meetfranz/forms": { |
5711 | "version": "file:packages/forms", | 5701 | "version": "file:packages/forms", |
5712 | "requires": { | 5702 | "requires": { |
@@ -22356,7 +22346,8 @@ | |||
22356 | "nan": { | 22346 | "nan": { |
22357 | "version": "2.15.0", | 22347 | "version": "2.15.0", |
22358 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", | 22348 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", |
22359 | "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" | 22349 | "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", |
22350 | "optional": true | ||
22360 | }, | 22351 | }, |
22361 | "nanoid": { | 22352 | "nanoid": { |
22362 | "version": "3.1.23", | 22353 | "version": "3.1.23", |
@@ -30578,24 +30569,6 @@ | |||
30578 | } | 30569 | } |
30579 | } | 30570 | } |
30580 | }, | 30571 | }, |
30581 | "windows-notification-state": { | ||
30582 | "version": "1.3.4", | ||
30583 | "resolved": "https://registry.npmjs.org/windows-notification-state/-/windows-notification-state-1.3.4.tgz", | ||
30584 | "integrity": "sha512-Z2n6YLARi14AGqaY5zAlMnhButzjRjlQui0k73nXe4tVRg2U918zLeC3ZxM/i4JKho/GqV85rgQsMfLWnbTUCA==", | ||
30585 | "requires": { | ||
30586 | "bindings": "^1.5.0", | ||
30587 | "nan": "^2.14.0" | ||
30588 | } | ||
30589 | }, | ||
30590 | "windows-quiet-hours": { | ||
30591 | "version": "1.2.7", | ||
30592 | "resolved": "https://registry.npmjs.org/windows-quiet-hours/-/windows-quiet-hours-1.2.7.tgz", | ||
30593 | "integrity": "sha512-PjKM2/RQhZ3ikG4COq0vPpXvmJsxckcg2YN3xmQv8kZl5l1uu00a/epSGDeY6tczDPkzBhoThBz1FKRqxBA7cQ==", | ||
30594 | "requires": { | ||
30595 | "bindings": "^1.3.0", | ||
30596 | "nan": "^2.7.0" | ||
30597 | } | ||
30598 | }, | ||
30599 | "windows-release": { | 30572 | "windows-release": { |
30600 | "version": "4.0.0", | 30573 | "version": "4.0.0", |
30601 | "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-4.0.0.tgz", | 30574 | "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-4.0.0.tgz", |
diff --git a/package.json b/package.json index ca86526f2..19994894e 100644 --- a/package.json +++ b/package.json | |||
@@ -64,7 +64,6 @@ | |||
64 | "@electron/remote": "1.2.1", | 64 | "@electron/remote": "1.2.1", |
65 | "@mdi/font": "5.9.55", | 65 | "@mdi/font": "5.9.55", |
66 | "@mdi/js": "4.6.95", | 66 | "@mdi/js": "4.6.95", |
67 | "@meetfranz/electron-notification-state": "1.0.0", | ||
68 | "@meetfranz/forms": "file:packages/forms", | 67 | "@meetfranz/forms": "file:packages/forms", |
69 | "@meetfranz/theme": "file:packages/theme", | 68 | "@meetfranz/theme": "file:packages/theme", |
70 | "@meetfranz/ui": "file:packages/ui", | 69 | "@meetfranz/ui": "file:packages/ui", |
@@ -96,6 +95,7 @@ | |||
96 | "jsonwebtoken": "8.5.1", | 95 | "jsonwebtoken": "8.5.1", |
97 | "jss": "10.7.1", | 96 | "jss": "10.7.1", |
98 | "lodash": "4.17.21", | 97 | "lodash": "4.17.21", |
98 | "macos-notification-state": "1.3.5", | ||
99 | "macos-version": "5.2.1", | 99 | "macos-version": "5.2.1", |
100 | "marked": "0.7.0", | 100 | "marked": "0.7.0", |
101 | "mime-types": "2.1.32", | 101 | "mime-types": "2.1.32", |
diff --git a/src/electron/ipc-api/dnd.js b/src/electron/ipc-api/dnd.js index da4d7781e..6fb8999a3 100644 --- a/src/electron/ipc-api/dnd.js +++ b/src/electron/ipc-api/dnd.js | |||
@@ -1,16 +1,23 @@ | |||
1 | import { ipcMain } from 'electron'; | 1 | import { ipcMain } from 'electron'; |
2 | import { getDoNotDisturb } from '@meetfranz/electron-notification-state'; | 2 | import { getDoNotDisturb } from 'macos-notification-state'; |
3 | import { isMac } from '../../environment'; | ||
3 | 4 | ||
4 | const debug = require('debug')('Ferdi:ipcApi:dnd'); | 5 | const debug = require('debug')('Ferdi:ipcApi:dnd'); |
5 | 6 | ||
6 | export default async () => { | 7 | export default async () => { |
7 | ipcMain.handle('get-dnd', async () => { | 8 | ipcMain.handle('get-dnd', async () => { |
9 | if (!isMac) { | ||
10 | debug('Not on macOS, returning', false); | ||
11 | return false; | ||
12 | } | ||
13 | |||
8 | try { | 14 | try { |
9 | const isDND = getDoNotDisturb(); | 15 | const isDND = getDoNotDisturb(); |
10 | debug('Fetching DND state, set to', isDND); | 16 | debug('Fetching DND state, set to', isDND); |
11 | return isDND; | 17 | return isDND; |
12 | } catch (e) { | 18 | } catch (e) { |
13 | console.error(e); | 19 | console.error(e); |
20 | return false; | ||
14 | } | 21 | } |
15 | }); | 22 | }); |
16 | }; | 23 | }; |