diff --git a/index.js b/index.js index 5bfa529..60df2a2 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow, screen, ipcMain } = require("electron"); +const { app, BrowserWindow, screen, ipcMain, BrowserView } = require("electron"); const fs = require("fs"); const { win32 } = require("path"); const sysInf = require("systeminformation"); @@ -16,7 +16,13 @@ function createWindow() { win.setFullScreen(true); win.setMenuBarVisibility(false); win.setAutoHideMenuBar(true); - win.loadFile("ui_templates/index.html"); + main = fs.readFileSync("ui_templates/index.html").toString(); + header = fs.readFileSync("ui_templates/header.html").toString(); + toLoad = header + main; + fs.writeFileSync("ui_templates/temp.html", toLoad) + //win.loadURL("data:text/html;charset=utf-8," + encodeURI(toLoad)); + win.loadFile("ui_templates/temp.html") + return(win) } function createStartupInfo() { @@ -59,8 +65,19 @@ function doneLoading() { } function init() { - createWindow(); + win = createWindow(); aWin2 = createStartupInfo(); + //const view = new BrowserView({ + // webPreferences: { + // nodeIntegration: true, + // }, + //}) + + //win.setBrowserView(view) + //view.setBounds({ x: 0, y: 0, width: screen.getPrimaryDisplay().size.width, height: 100 }) + //view.webContents.loadFile('ui_templates/header.html') + + setTimeout(doneLoading, 2000); ipcMain.on("asynchronous-message", (event, arg) => { console.log(arg); // prints "ping" diff --git a/ui_templates/header.html b/ui_templates/header.html new file mode 100644 index 0000000..3886a27 --- /dev/null +++ b/ui_templates/header.html @@ -0,0 +1,189 @@ + + + + + Enlight - Screen 1 + + + + + + + + + +
+
+ + + + + + + +
+
+ + + + diff --git a/ui_templates/index.html b/ui_templates/index.html index 691b855..cd996e5 100644 --- a/ui_templates/index.html +++ b/ui_templates/index.html @@ -18,7 +18,7 @@ -
+ +

Hello World!

+ Session screen We are using node + + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + + + Enlight - Screen 1 + + + + + + + + + + + +

Hello World!

+ Session screen + We are using node + + , Chrome + + , and Electron + + . + + diff --git a/usrStore/lastNetwork.data b/usrStore/lastNetwork.data index 11b2b4c..fbcc8ac 100644 --- a/usrStore/lastNetwork.data +++ b/usrStore/lastNetwork.data @@ -1 +1 @@ -Microsoft Loopbackadapter f�r KM-TEST \ No newline at end of file +VirtualBox Host-Only Ethernet Adapter \ No newline at end of file