From 42c8025b5538ba3a65436cc988220b1cf9f6766a Mon Sep 17 00:00:00 2001 From: Tzikas Date: Mon, 21 Jun 2021 17:08:52 -0400 Subject: [PATCH] darn windows --- main.js | 25 ++++------- package-lock.json | 110 ++-------------------------------------------- package.json | 4 +- 3 files changed, 15 insertions(+), 124 deletions(-) diff --git a/main.js b/main.js index 8794263..84a517a 100644 --- a/main.js +++ b/main.js @@ -8,20 +8,7 @@ const { nativeImage, Tray } = require('electron'); -// 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 Badge = require('electron-windows-badge'); // const { app, BrowserWindow, Menu, nativeImage, Tray } = require('electron') @@ -209,7 +196,13 @@ function createJitsiMeetWindow() { defaultHeight: 600 }); - // new Badge(windowState, { color: 'red' }); + let i = 0; + let winBadge = new Badge(windowState, { color: 'red' }); + setInterval(() => { + i++ + winBadge.update(i) + }, 10000) + // Path to root directory. const basePath = isDev ? __dirname : app.getAppPath(); @@ -299,7 +292,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 3628178..67a3af2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4735,81 +4735,6 @@ } } }, - "@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", @@ -11544,22 +11469,10 @@ "mkdirp": "^0.5.1" } }, - "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-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-store": { "version": "2.1.0", @@ -14593,11 +14506,6 @@ "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", @@ -19124,11 +19032,6 @@ "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", @@ -22895,11 +22798,6 @@ "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 41db16b..5bcd61d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CowBellClub", - "version": "1.4.7", + "version": "1.4.8", "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-notifications": "^3.0.8", + "electron-windows-badge": "^1.1.0", "history": "4.10.1", "i18next": "19.4.5", "jitsi-meet-electron-utils": "github:jitsi/jitsi-meet-electron-utils#v2.0.13",