Skip to content

Commit

Permalink
Fixed notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Mstiekema committed Oct 26, 2021
1 parent b81c2a2 commit d9c1850
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function createWindow() {
});

// Handle NFC authentication
if (process.env.ENV ? process.env.ENV.trim() === "dev" : false) {
if (process.env.SLOTH_ENV ? process.env.SLOTH_ENV.trim() === "dev" : false) {
win.webContents.openDevTools();
HandleAuthDev(win);
} else {
Expand Down
8 changes: 3 additions & 5 deletions src/static/js/idle.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const querystring = require('querystring');
const query = querystring.parse(global.location.search);

myBrowserWindow.webContents.on('new-window', () => {
const query = querystring.parse(global.location.search);
if (Object.keys(query).length != 0) {
const message = JSON.parse(query['?error']);

if (message) {
$('body').toast({
class: 'error',
message: message
})
}

console.log(message);
});
}
9 changes: 6 additions & 3 deletions src/static/js/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ const studentInput = document.querySelector(".studentinput");
$('.ui.basic.modal')
.modal();

let query = querystring.parse(global.location.search)
let uuid = null;
if (Object.keys(query).length != 0) {
uuid = JSON.parse(query['?uuid']);
}

function RegisterCard(studentNr) {
ipcRenderer.send('request', {
name: 'register',
Expand Down Expand Up @@ -72,6 +78,3 @@ document.querySelector(".register").addEventListener('click', function (e) {
$('.ui.massive.input').popup('show');
}
});

let query = querystring.parse(global.location.search)
let uuid = JSON.parse(query['?uuid']);

0 comments on commit d9c1850

Please sign in to comment.