-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserWindow.html
67 lines (60 loc) · 1.92 KB
/
userWindow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>User Window</title>
<link rel="stylesheet" href="./css/materialize.min.css">
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<div class="row center">
<h5 class="header col s12 light">User in solution Machine</h5>
</div>
<div class="row center" id="notconnected" style="display: none">
<a href="" id="connect" class="btn-large waves-effect waves-light red">Not available.</a>
<p>Make sure your setting is right</p>
</div>
<br><br>
</div>
</div>
<hr>
<div class="container" id="list" style="display: none">
<table class="striped">
<thead>
<tr>
<th>#</th>
<th>PIN</th>
<th>Name</th>
<th>Password</th>
<th>Group</th>
<th>Privilege</th>
<th>Card</th>
</tr>
</thead>
<tbody class="body">
</tbody>
</table>
<div id="test"></div>
</div>
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="./js/jquery-3.5.1.min.js"></script>
<script src="./js/materialize.min.js"></script>
<script>
const electron = require('electron');
const {ipcRenderer} = electron;
var items = electron.remote.getCurrentWindow().custom;
if(items.length > 0){
$("#list").show();
let html = '';
for(var i = 0; i < items.length;i++){
html += `<tr><td>${i+1}</td><td>${items[i].PIN}</td><td>${items[i].Name}</td><td>${items[i].Password}</td><td>${items[i].Group}</td><td>${items[i].Privilege}</td><td>${items[i].Card}</td></tr>`;
}
$(".body").html(html)
} else {
$("#notconnected").show();
}
</script>
</body>
</html>