-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainWindow.html
290 lines (284 loc) · 10.4 KB
/
mainWindow.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Health Care App</title>
<link href="assets/styles.css" rel="stylesheet" />
<link href="assets/form.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css"
/>
<script
defer
src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"
></script>
<!-- <link rel="stylesheet" href="/assets/bluma-switch.min.css"> -->
</head>
<body id="bg">
<section class="hero is-fullheight is-bold is-text-centered" id="form-wrap">
<div class="hero-body">
<div class="container has-text-centered">
<div class="container form-cont">
<section class="hero">
<div class="hero-body">
<div class="row">
<h1 class="title">
Let's get started
</h1>
<h2 class="subtitle">
I respect your privacy <i class="fa fa-eye-slash"></i>
</h2>
</div>
</div>
</section>
<section class="section form-controls-wrap">
<div class="field">
<label class="label">Name</label>
<div class="control">
<input
class="input name-input"
type="text"
id="name-ipc"
placeholder="How would you like me to call you?"
/>
</div>
</div>
<div class="field">
<label class="label">Gender</label>
<div class="control">
<div class="select">
<select id="gender-ipc">
<option>Male</option>
<option>Female</option>
<option>Prefer not to specify</option>
</select>
</div>
</div>
</div>
<div class="divider"></div>
<div class="field">
<label class="label">Profession</label>
<div class="control">
<div class="select">
<select id="prof-ipc">
<option>Developer</option>
<option>Designer</option>
<option>Editor</option>
<option>Gamer</option>
</select>
</div>
</div>
</div>
<div class="field">
<label class="label">How do you sit?</label>
<div class="control">
<label class="radio" style="margin-right:45px">
<input
type="radio"
id="standing-desk-ipc"
name="question"
style="margin-right:5px"
/>
I have a standing desk
</label>
<label class="radio">
<input
type="radio"
id="sit-ipc"
name="question"
style="margin-right:5px"
checked
/>
I don't
</label>
</div>
</div>
<div class="columns">
<div class="field column">
<label class="label">Room Space</label>
<div class="control">
<div class="select">
<select id="room-ipc">
<option>Small - Sit/Stand Exercises</option>
<option>Large - Lay Down Exercises</option>
</select>
</div>
</div>
</div>
<div class="field column">
<label class="label">Free time to spare</label>
<div class="control">
<div class="select">
<select id="free-ipc">
<option>less than 5mins</option>
<option>more than 5mins</option>
</select>
</div>
</div>
</div>
</div>
</section>
<div style="padding-top: 35px;">
<button class="button submit-btn" id="submit-btn">
Submit <i class="fa fa-check"></i>
</button>
</div>
<div class="form-footer has-text-centered">
ps..you can edit these later in the settings
</div>
</div>
</div>
</div>
</section>
<section class="section" id="dashboard-wrap">
<div class="container">
<div class="columns">
<div class="column">
<div style="float: left">
<h1 class="title" id="text">
<span class="icon has-text-danger" style="margin: 5px;">
<i class="far fa-user"></i>
</span>
Hi User
</h1>
</div>
</div>
<div class="column">
<div style="float: left" id="text">
On
<label class="switch">
<input type="checkbox" checked />
<span class="slider round"></span>
</label>
Off
</div>
<div style="float: right">
<h2 class="subtitle circle" id="text">
<span class="icon has-text-danger" style="margin: 3px;">
<i class="fas fa-wrench"></i>
</span>
</h2>
</div>
</div>
</div>
<div class="dashboard">
<div class="columns">
<div class="column">
Typing Frequency<br />
<span class="title" id="freq-span" style="color:#eb3498">0</span>
<span class="subtitle" style="color: aliceblue"> CPM</span>
<br />
WhoA Lorem ipsum dolor sit amet..
</div>
<div class="column">
Usage Time<br />
<span class="title" id="usage-span" style="color: #eb3498"
>0</span
>
<span class="subtitle" style="color: aliceblue"> Hours</span
><br />
WhoA Lorem ipsum dolor sit amet..
</div>
<div class="column">
Resting Time <br />
<span class="title" id="rest-span" style="color: #eb3498">0</span>
<span class="subtitle" style="color: aliceblue"> Minutes</span
><br />
WhoA Lorem ipsum dolor sit amet..
</div>
<div class="column" id="workoutCount">
Workouts <br />
<span class="title" style="color: #eb3498">10</span>
<span class="subtitle" style="color: aliceblue"> workouts</span
><br />
WhoA Lorem ipsum dolor sit amet..
</div>
</div>
</div>
<br />
<div class="dashboard2">
<div>
<h1 class="title">Tips</h1>
<div class="columns">
<div class="column">
<div class="figure">
<img src="assets/tips.jpg" alt="" />
</div>
</div>
<div class="column">
<span class="subtitle">Eye Care</span>
<li>
Apply Castor Oil and Olive oil while going to bed this reduces the stress on your eye, nourishes your eye sight
</li><br>
<span class="subtitle">Back Care</span>
<li>
Keep Good Posture, Maintain Healthy weight, do stretches often
Apply Heat and cold
</li>
</div>
</div>
<div class="column">
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Distinctio deleniti debitis ea maxime ab voluptates quos illum
officiis fugit ducimus dignissimos laboriosam quae nisi error,
provident repellat fugiat ullam similique.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Distinctio deleniti debitis ea maxime ab voluptates quos illum
officiis fugit ducimus dignissimos laboriosam quae nisi error,
provident repellat fugiat ullam similique.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Distinctio deleniti debitis ea maxime ab voluptates quos illum
officiis fugit ducimus dignissimos laboriosam quae nisi error,
provident repellat fugiat ullam similique.
</li>
</div>
</div>
</div>
</div>
</section>
<script>
const electron = require("electron");
const ioHook = require("iohook");
const os = require("os");
const uptime2 = require("os-uptime");
const { ipcRenderer } = electron;
let usage = document.getElementById("usage-span");
let rest = document.getElementById("rest-span");
let freq = document.getElementById("freq-span");
let cpm = 0,
cpmavg = 0,
avgcnt = 1,
mincnt = 0;
let uptime = (os.uptime() / (60 * 60)).toString().split("."),
integ = uptime[0],
dec = uptime[1];
usage.innerText = integ + "." + dec.slice(0, 2);
console.log(os.uptime());
ioHook.on("keyup", event => {
// keys.innerText += " " + String.fromCharCode(event.rawcode);
cpm++;
});
setInterval(function() {
cpmavg = (cpm + cpmavg) / 2;
if (Math.floor(cpmavg) == 0) {
mincnt++;
}
console.log(mincnt, Math.floor(cpmavg));
freq.innerText = Math.floor(cpmavg);
rest.innerText = mincnt;
cpm = 0;
}, 2000);
ioHook.start();
</script>
<script src="mwctrl.js"></script>
<script src="notifs.js"></script>
<!-- <script src="temp.js"></script> -->
</body>
</html>