Skip to content

Commit

Permalink
darn windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzikas committed Jun 21, 2021
1 parent 4708da7 commit 42c8025
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 124 deletions.
25 changes: 9 additions & 16 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<toast><visual><binding template="ToastText01"><text id="1">%s</text></binding></visual></toast>`,
strings: ['Hi!']
})

notification.on('activated', () => console.log('Activated!'))
notification.show()

const Badge = require('electron-windows-badge');


// const { app, BrowserWindow, Menu, nativeImage, Tray } = require('electron')
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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')
Expand Down
110 changes: 4 additions & 106 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 42c8025

Please sign in to comment.