From 4708da734af0886d89071e904f2e14609112a044 Mon Sep 17 00:00:00 2001 From: Tzikas Date: Mon, 21 Jun 2021 16:11:11 -0400 Subject: [PATCH] prob nots --- frontend/src/components/SideBar.js | 2 +- main.js | 19 ++++- package-lock.json | 112 +++++++++++++++++++++++++++-- package.json | 4 +- 4 files changed, 126 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/SideBar.js b/frontend/src/components/SideBar.js index b43cbf0..604b295 100644 --- a/frontend/src/components/SideBar.js +++ b/frontend/src/components/SideBar.js @@ -200,7 +200,7 @@ export default function SideBar({ video, littleVideo, isInRoomRoute }) { if (window.jitsiNodeAPI) { let count = sortedCount + dmChannelCount window.jitsiNodeAPI.ipc.send('set-counter', { count }) - window.jitsiNodeAPI.ipc.sendSync('update-badge', 111); + // window.jitsiNodeAPI.ipc.send('update-badge', 111); } console.log(window) diff --git a/main.js b/main.js index 2c71740..8794263 100644 --- a/main.js +++ b/main.js @@ -8,7 +8,20 @@ const { nativeImage, Tray } = require('electron'); -const Badge = require('electron-windows-badge'); +// const Badge = require('electron-windows-badge'); + +const appId = 'electron-windows-notifications' +const { ToastNotification } = require('electron-windows-notifications') + +let notification = new ToastNotification({ + appId: appId, + template: `%s`, + strings: ['Hi!'] +}) + +notification.on('activated', () => console.log('Activated!')) +notification.show() + // const { app, BrowserWindow, Menu, nativeImage, Tray } = require('electron') @@ -196,7 +209,7 @@ function createJitsiMeetWindow() { defaultHeight: 600 }); - new Badge(windowState, { color: 'red' }); + // new Badge(windowState, { color: 'red' }); // Path to root directory. const basePath = isDev ? __dirname : app.getAppPath(); @@ -286,7 +299,7 @@ function createJitsiMeetWindow() { } app.setBadgeCount(app.getBadgeCount() + 1) sound.play(path.join(__dirname, "resources/cowbell.wav")) - new Badge(windowState, { color: 'blue' }); + // new Badge(windowState, { color: 'blue' }); //New Room console.log(path.join(__dirname), 'souuuuunnnndd') diff --git a/package-lock.json b/package-lock.json index 43fde29..3628178 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "CowBellClub", - "version": "1.4.5", + "version": "1.4.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4735,6 +4735,81 @@ } } }, + "@nodert-win10-au/windows.applicationmodel": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@nodert-win10-au/windows.applicationmodel/-/windows.applicationmodel-0.4.4.tgz", + "integrity": "sha512-/46SHT3E5s29p9Fh+BEAJIuzX1vLnGTKSfeGHcUKrPzJneP7OY05NTRH1PHRfRRCgE7YfbIeQqRpbJ0dyvliqw==", + "requires": { + "nan": "^2.14.2" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, + "@nodert-win10-au/windows.data.xml.dom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@nodert-win10-au/windows.data.xml.dom/-/windows.data.xml.dom-0.4.4.tgz", + "integrity": "sha512-UxKrBzuM4D4SYVdUWuzhlpLAtjtV25SIBuip1bcp6b8pLk0tg1Od3/UUmOatk3eGP0SCTg6KuTBM6vEKZxXW9g==", + "requires": { + "nan": "^2.14.2" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, + "@nodert-win10-au/windows.foundation": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@nodert-win10-au/windows.foundation/-/windows.foundation-0.4.4.tgz", + "integrity": "sha512-M31DRrLb3DWTtInxwrZqTjvTl4d7O2EqfPHOcgoch2gA1JDgLr+cpTYxDRar+MvkKEO2dCNDhsV2eoDRZFHkiw==", + "requires": { + "nan": "^2.14.2" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, + "@nodert-win10-au/windows.ui.notifications": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@nodert-win10-au/windows.ui.notifications/-/windows.ui.notifications-0.4.4.tgz", + "integrity": "sha512-wo0/D7boePEWN6bUoQ/RpnG4xwmrzT06RzPv8Ns7WnYSIb6NvEbCNdIMgx1hTr9qriLrgeZX7DNrWAKcDtLsXg==", + "requires": { + "nan": "^2.14.2" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, + "@nodert-win10-au/windows.ui.startscreen": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@nodert-win10-au/windows.ui.startscreen/-/windows.ui.startscreen-0.4.4.tgz", + "integrity": "sha512-EW/LSzjqpv41BjMITdnp40Ez78+vJ7u3sQForh3k/zxTLBHdhxveWlM0r+s8G5TRPB3F4zTlymx2OQZgHN/vhQ==", + "requires": { + "nan": "^2.14.2" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, "@popperjs/core": { "version": "2.8.6", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.8.6.tgz", @@ -11469,10 +11544,22 @@ "mkdirp": "^0.5.1" } }, - "electron-windows-badge": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/electron-windows-badge/-/electron-windows-badge-1.1.0.tgz", - "integrity": "sha512-hWFbUk9u3fQHcKzTAcjZAN7XH9bL9oH9g20RRDU/DVDNqdMI03GzlBZfR/R8R1krYu9AT4biLqSCAxnt9LMAfA==" + "electron-windows-notifications": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/electron-windows-notifications/-/electron-windows-notifications-3.0.8.tgz", + "integrity": "sha512-uqQtrbcz+HbcYzvO7YYkdAuTmRbmH0uBS5PHHxhoEnIecjP1VGaP6qyzbT5Y7TRGOx+VOVFSAgvE+Z6MPcvcWg==", + "requires": { + "@nodert-win10-au/windows.applicationmodel": "^0.4.4", + "@nodert-win10-au/windows.data.xml.dom": "^0.4.4", + "@nodert-win10-au/windows.foundation": "^0.4.4", + "@nodert-win10-au/windows.ui.notifications": "^0.4.4", + "@nodert-win10-au/windows.ui.startscreen": "^0.4.4", + "debug": "^4.1.1", + "is-electron-renderer": "^2.0.1", + "sanitize-xml-string": "^1.1.0", + "uuid": "^3.3.2", + "xml-escape": "^1.1.0" + } }, "electron-windows-store": { "version": "2.1.0", @@ -14506,6 +14593,11 @@ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==" }, + "is-electron-renderer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-electron-renderer/-/is-electron-renderer-2.0.1.tgz", + "integrity": "sha1-pGnQVvl1aXxYyYxgI+sKp5r4laI=" + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -19032,6 +19124,11 @@ "truncate-utf8-bytes": "^1.0.0" } }, + "sanitize-xml-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/sanitize-xml-string/-/sanitize-xml-string-1.1.0.tgz", + "integrity": "sha512-RzX25K64YtZm9FvdZr/Ac7Eeq0va1YX0xmpOkjWoREhgKXXldrJRVJhBel83nS8omIcaKcNTdLY8XzOIK920HA==" + }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -22798,6 +22895,11 @@ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "xml-escape": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=" + }, "xmlbuilder": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", diff --git a/package.json b/package.json index 4e20784..41db16b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CowBellClub", - "version": "1.4.6", + "version": "1.4.7", "description": "Electron application for Cowbell Club", "main": "./build/main.js", "productName": "CowbellClub", @@ -139,7 +139,7 @@ "electron-store": "5.1.1", "electron-updater": "4.2.5", "electron-window-state": "5.0.3", - "electron-windows-badge": "^1.1.0", + "electron-windows-notifications": "^3.0.8", "history": "4.10.1", "i18next": "19.4.5", "jitsi-meet-electron-utils": "github:jitsi/jitsi-meet-electron-utils#v2.0.13",