diff --git a/design.html b/design.html
index d122915..58babfa 100644
--- a/design.html
+++ b/design.html
@@ -7,13 +7,13 @@
Zimon
-
+
-
ZIMON
+ ZIMON
UHRZEIT
diff --git a/index.html b/index.html
index fbaa613..2599071 100644
--- a/index.html
+++ b/index.html
@@ -6,13 +6,13 @@
Zimon
-
+
-
ZIMON
+ ZIMON
UHRZEIT
diff --git a/main.js b/main.js
index 7076eb2..822669a 100644
--- a/main.js
+++ b/main.js
@@ -1,43 +1,58 @@
-const {app, BrowserWindow, Menu} = require('electron')
-
-function createWindow () {
- // Create the browser window.
- let win = new BrowserWindow({ fullscreen: true, titleBarStyle: 'hidden' })
-
- // and load the index.html of the app.
- win.loadFile('index.html')
-
- // Open the DevTools.
- //win.webContents.openDevTools()
-
- //let test = new BrowserWindow({width: 800, height: 600, parent: win})
- // Emitted when the window is closed.
- win.on('closed', () => {
- // Dereference the window object, usually you would store windows
- // in an array if your app supports multi windows, this is the time
- // when you should delete the corresponding element.
- win = null
- })
+const { app,BrowserWindow,Menu } = require('electron')
+
+// This method will be called when Electron has finished
+// initialization and is ready to create browser windows.
+// Some APIs can only be used after this event occurs.
+
+app.on('ready', () => {
+ // session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
+ // callback({responseHeaders: Object.assign({
+ // "Content-Security-Policy": ["default-src 'self'"]
+ // }, details.responseHeaders)});
+ // });
+ createWindow();
+
+})
+
+// Quit when all windows are closed.
+app.on('window-all-closed', () => {
+ // On macOS it is common for applications and their menu bar
+ // to stay active until the user quits explicitly with Cmd + Q
+ if (process.platform !== 'darwin') {
+ app.quit()
+ }
+})
+
+app.on('activate', () => {
+ // On macOS it's common to re-create a window in the app when the
+ // dock icon is clicked and there are no other windows open.
+ if (win === null) {
+ createWindow()
}
- // This method will be called when Electron has finished
- // initialization and is ready to create browser windows.
- // Some APIs can only be used after this event occurs.
- // app.on('ready', () => {createWindow(); loadModules();})
-app.on('ready', (createWindow))
-
- // Quit when all windows are closed.
- app.on('window-all-closed', () => {
- // On macOS it is common for applications and their menu bar
- // to stay active until the user quits explicitly with Cmd + Q
- if (process.platform !== 'darwin') {
- app.quit()
- }
+})
+
+//Electron update service
+require('update-electron-app')()
+
+function createWindow() {
+ // Create the browser window.
+ let win = new BrowserWindow({
+ fullscreen: true,
+ titleBarStyle: 'hidden'
})
- app.on('activate', () => {
- // On macOS it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.
- if (win === null) {
- createWindow()
- }
+ // and load the index.html of the app.
+ win.loadFile('index.html')
+
+ // Open the DevTools.
+ //win.webContents.openDevTools()
+
+ //let test = new BrowserWindow({width: 800, height: 600, parent: win})
+ // Emitted when the window is closed.
+ win.on('closed', () => {
+ // Dereference the window object, usually you would store windows
+ // in an array if your app supports multi windows, this is the time
+ // when you should delete the corresponding element.
+ win = null
})
+}
diff --git a/modules/quotes.js b/modules/quotes.js
index 7ebeb62..3f674de 100644
--- a/modules/quotes.js
+++ b/modules/quotes.js
@@ -1,4 +1,4 @@
-$.get("components/quoteEdit.html", function(response) {
+$.get("resources/components/quoteEdit.html", function(response) {
quoteEditTemplate = response;
});
//every 3 hours
diff --git a/modules/zivis.js b/modules/zivis.js
index 69b6622..1b6a427 100644
--- a/modules/zivis.js
+++ b/modules/zivis.js
@@ -2,18 +2,18 @@ let zivis, counter = [];
let roundZivis = [];
var ziviTemplate, ziviEditTemplate, ziviEditButton;
-$.get("components/ziviCards.html", function(response) {
+$.get("resources/components/ziviCards.html", function(response) {
ziviTemplate = response;
});
-$.get("components/ziviEdit.html", function(response) {
+$.get("resources/components/ziviEdit.html", function(response) {
ziviEditTemplate = response;
});
-$.get("components/ziviEditButton.html", function(response) {
+$.get("resources/components/ziviEditButton.html", function(response) {
ziviEditButton = response;
});
var warTemplate;
-$.get("components/warTemplate.html", function(response) {
+$.get("resources/components/warTemplate.html", function(response) {
warTemplate = response;
});
diff --git a/package-lock.json b/package-lock.json
index f44f85e..2e177a7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -77,6 +77,11 @@
"tweetnacl": "^0.14.3"
}
},
+ "bignumber.js": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz",
+ "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA=="
+ },
"bootstrap": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.3.tgz",
@@ -184,8 +189,7 @@
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
- "dev": true
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"currently-unhandled": {
"version": "0.4.1",
@@ -271,6 +275,11 @@
"sumchecker": "^2.0.2"
}
},
+ "electron-is-dev": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
+ "integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
+ },
"env-paths": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
@@ -423,6 +432,14 @@
"assert-plus": "^1.0.0"
}
},
+ "github-url-to-object": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/github-url-to-object/-/github-url-to-object-4.0.4.tgz",
+ "integrity": "sha512-1Ri1pR8XTfzLpbtPz5MlW/amGNdNReuExPsbF9rxLsBfO1GH9RtDBamhJikd0knMWq3RTTQDbTtw0GGvvEAJEA==",
+ "requires": {
+ "is-url": "^1.1.0"
+ }
+ },
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
@@ -474,8 +491,7 @@
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.5",
@@ -522,6 +538,11 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
+ "is-url": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
+ "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww=="
+ },
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
@@ -679,8 +700,47 @@
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
- "dev": true
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ },
+ "mysql": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.16.0.tgz",
+ "integrity": "sha512-dPbN2LHonQp7D5ja5DJXNbCLe/HRdu+f3v61aguzNRQIrmZLOeRoymBYyeThrR6ug+FqzDL95Gc9maqZUJS+Gw==",
+ "requires": {
+ "bignumber.js": "4.1.0",
+ "readable-stream": "2.3.6",
+ "safe-buffer": "5.1.2",
+ "sqlstring": "2.3.1"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
},
"normalize-package-data": {
"version": "2.4.0",
@@ -827,8 +887,7 @@
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
- "dev": true
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"progress-stream": {
"version": "1.2.0",
@@ -953,8 +1012,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
@@ -1021,6 +1079,11 @@
"integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=",
"dev": true
},
+ "sqlstring": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
+ "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
+ },
"sshpk": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
@@ -1174,11 +1237,21 @@
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true
},
+ "update-electron-app": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/update-electron-app/-/update-electron-app-1.3.0.tgz",
+ "integrity": "sha512-OXfcmeenpjMyzXmadZ6NqxnrpPpiLji0sLUpXkexfX97XM8Gnk4iLovk4TlK4N8dzlETWdm9klgMmo9HpRbK7Q==",
+ "requires": {
+ "electron-is-dev": "^0.3.0",
+ "github-url-to-object": "^4.0.4",
+ "is-url": "^1.2.4",
+ "ms": "^2.1.1"
+ }
+ },
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"uuid": {
"version": "3.3.2",
diff --git a/package.json b/package.json
index 05fb6e2..1dea77c 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"bootstrap": "^4.1.3",
"jquery": "^3.3.1",
"mysql": "^2.16.0",
- "popper.js": "^1.14.4"
+ "popper.js": "^1.14.4",
+ "update-electron-app": "^1.3.0"
}
}
diff --git a/start.sh b/start.sh
new file mode 100755
index 0000000..594e2c7
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+npm start