! More restructuring changes
The client is basically gonna get served from a localhost server via electron. It's a little weird but it has to do for now, also fuck mobile
This commit is contained in:
parent
cc1e3e6bc3
commit
09f27dd554
@ -1,5 +1,5 @@
|
|||||||
const { app, BrowserWindow } = require('electron')
|
const { app, BrowserWindow } = require('electron')
|
||||||
const rtc = require('./src/js/rtc')
|
const path = require('path')
|
||||||
|
|
||||||
let win;
|
let win;
|
||||||
|
|
||||||
@ -10,10 +10,13 @@ function createWin() {
|
|||||||
minWidth: 640,
|
minWidth: 640,
|
||||||
minHeight: 480,
|
minHeight: 480,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: true,
|
||||||
}
|
preload: path.join(__dirname + 'preload.js')
|
||||||
|
},
|
||||||
|
autoHideMenuBar: true,
|
||||||
})
|
})
|
||||||
win.loadFile('./src//pages/index.html');
|
|
||||||
|
win.loadFile('pages/index.html');
|
||||||
if(process.platform !== 'darwin') {
|
if(process.platform !== 'darwin') {
|
||||||
win.removeMenu();
|
win.removeMenu();
|
||||||
}
|
}
|
||||||
@ -37,3 +40,4 @@ app.on('activate', () => {
|
|||||||
createWin();
|
createWin();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
"popper.js": "^1.14.4",
|
"popper.js": "^1.14.4",
|
||||||
"purecss": "^1.0.1",
|
"purecss": "^1.0.1",
|
||||||
"socket.io": "^3.0.3",
|
"socket.io": "^3.0.3",
|
||||||
"socket.io-client": "^3.0.3"
|
"socket.io-client": "^3.0.3",
|
||||||
|
"ws": "^7.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^7.1.2"
|
"electron": "^7.1.2"
|
||||||
|
15
freechat-client/preload.js
Normal file
15
freechat-client/preload.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Doing this since the projcet this base work is based off uses the same thing
|
||||||
|
// Kinda looks like something to do with compatibility so I'll keep this here
|
||||||
|
// until I know if its _actually_ required
|
||||||
|
|
||||||
|
|
||||||
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const replaceText = function (selector, text) {
|
||||||
|
const element = document.getElementById(selector);
|
||||||
|
if(element) { element.innerText = text; }
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const type of ['chrome', 'node', 'electron']) {
|
||||||
|
replaceText(`${type}`, process.versions[type]);
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user