Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/SCCapstone/Neptune into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wmamos committed Dec 3, 2022
2 parents ecd9ee9 + 5dfd1a3 commit f376f48
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Server/src/Windows/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { connect }= require("http2");
const ResourceManager = new (require("../ResourceManager"))();
const NeptuneWindow = require("./NeptuneWindow");


const Notifier = require("node-notifier"); // does not work with windows action center!

class mainWindow extends NeptuneWindow {

Expand All @@ -37,6 +37,24 @@ class mainWindow extends NeptuneWindow {
const detailButton = this.createButton("toDetail", "Connection Details");
detailButton.setInlineStyle("font-size: 18px; font-weight: light; qproperty-alignment: AlignCenter; padding: 5px; min-width: 225px; max-width: 225px; margin-left: 140px;");

const notificationButton = this.createButton("toDetail", "Test notifications");
notificationButton.setInlineStyle("font-size: 18px; font-weight: light; qproperty-alignment: AlignCenter; padding: 5px; min-width: 225px; max-width: 225px; margin-left: 140px;");
notificationButton.addEventListener('clicked', () => {
Notifier.notify({
title: "Testing notifications on server",
message: "This is just a test.", // data.contents.subtext + "\n" +
id: 12345,
}, function(err, response, metadata) { // this is kinda temporary, windows gets funky blah blah blah read note at top
if (err) {
logger.error(err);
} else {
logger.debug("Action received: " + response);
logger.silly("action metadata: ");
logger.silly(metadata);
}
});
});

aboutButton.addEventListener('clicked', () => this.openAbout());

connectButton.addEventListener('clicked', () => {
Expand Down

0 comments on commit f376f48

Please sign in to comment.