IP change
This commit is contained in:
parent
7f5b8d8bc4
commit
b0285bf1bd
@ -12,15 +12,16 @@ wss.on('connection', function connection(ws) {
|
||||
});
|
||||
|
||||
var server = http.createServer(function (request, response) {
|
||||
|
||||
response.writeHead(200, {"Content-Type": "text\plain"});
|
||||
request.setEncoding('utf8');
|
||||
|
||||
if (request.method === "POST") {
|
||||
var body = '';
|
||||
|
||||
request.on('data', function (chunk) {
|
||||
body += chunk;
|
||||
});
|
||||
|
||||
request.on('end', function () {
|
||||
body = JSON.parse(body);
|
||||
console.log(body);
|
||||
|
@ -6,24 +6,23 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>Add classes</title>
|
||||
<title>Weryfikacja kodu zajęć</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<form>
|
||||
<div>
|
||||
<h5 class="center">Enter class data</h3>
|
||||
<br /> Kod zajęć:
|
||||
<p><h4 class="center">Wprowadź kod synchronizujący</h4></p>
|
||||
<input type="text" id="classcode" required autofocus/>
|
||||
</div>
|
||||
<br />
|
||||
<button class="btn waves-effect waves-light" type="submit">Akceptuj</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
const electron = require('electron');
|
||||
const {
|
||||
ipcRenderer
|
||||
@ -40,7 +39,7 @@
|
||||
ipcRenderer.send("set:classcode", classcode);
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
|
@ -297,7 +297,7 @@ function printStudent(item) {
|
||||
|
||||
});
|
||||
|
||||
axios.post('http://127.0.0.1:8889', JSON.stringify({
|
||||
axios.post('https://150.254.78.197:8889', JSON.stringify({
|
||||
classes_code: class_code,
|
||||
student_index: item[2],
|
||||
student_name: item[0],
|
||||
@ -336,39 +336,7 @@ ipcMain.on("set:classcode", function (e,classcode) {
|
||||
})
|
||||
|
||||
//Menu template
|
||||
const mainMenuTemplate = [{
|
||||
label: "Student",
|
||||
submenu: [{
|
||||
label: "Add student",
|
||||
accelerator: process.platfrom == "darwin" ? "Command+E" : "Ctrl+E",
|
||||
click() {
|
||||
createAddWindow();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Quit program",
|
||||
accelerator: process.platfrom == "darwin" ? "Command+Q" : "Ctrl+Q",
|
||||
click() {
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
label: "Classes",
|
||||
submenu: [{
|
||||
label: "Add classes",
|
||||
click() {
|
||||
createAddClassesWindow();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Pick classes",
|
||||
click() {
|
||||
createSelectClassesWindow();
|
||||
}
|
||||
}
|
||||
]
|
||||
}];
|
||||
const mainMenuTemplate = [];
|
||||
|
||||
//If mac psuh empty obj to Menu
|
||||
if (process.platfrom == "darwin") {
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
<script>
|
||||
var classes_code_input = $('#classes_code_input').html();
|
||||
const client = new WebSocket('ws://127.0.0.1:8888', classes_code_input);
|
||||
const client = new WebSocket('ws://150.254.78.197:8888', classes_code_input);
|
||||
|
||||
client.onmessage = function onmessage1(message) {
|
||||
message = JSON.parse(message.data);
|
||||
|
Loading…
Reference in New Issue
Block a user