1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-07-18 04:33:50 +02:00

Added popup things

This commit is contained in:
TheGreyDiamond
2021-09-19 12:16:49 +02:00
parent 722b8e1333
commit 6481d73c28
6 changed files with 3451 additions and 545 deletions

View File

@ -71,6 +71,11 @@ var mySession = {
usedUIDs: [],
};
var currentState = {
projectName: "",
projectDirty: false
}
var mainConn = "";
var mainNetworkInterface = undefined;
@ -416,6 +421,17 @@ function init() {
win.loadFile("ui_templates/temp.html");
const timestamp3 = Date.now();
event.returnValue = "";
} else if (String(arg).includes("ACTION:power")) {
// Change to a diffrent page of the programm
command = String(arg).split(".")[1];
if(command == "quit"){
if(currentState.projectDirty){
event.returnValue = "ANS:PROJECT_DIRTY";
}
app.quit()
console.log("Trying to quit")
}
} else if (String(arg).includes("SESSION:get.state")) {
// Retrives the session state