-
Notifications
You must be signed in to change notification settings - Fork 23
/
update.html
39 lines (33 loc) · 1.06 KB
/
update.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Auto Update</title>
</head>
<body class="update-window">
<h1 class="update-title">Downloading …</h1>
<div class="update-block">
<div class="update-progress">
<div class="update-progress_bar"></div>
</div>
<div class="update-status">
0%
</div>
</div>
<h1 class="update-subheading">Release Notes</h1>
<div class="update-release-notes"></div>
<script>
let ipc = require('electron').ipcRenderer
ipc.on('progress', (event, progressObj) => {
let barHtml = document.querySelector('.update-progress_bar')
barHtml.style.width = `${progressObj.percent}%`
let statusHtml = document.querySelector('.update-status')
statusHtml.innerHTML = `${Math.floor(progressObj.percent)}%`
})
ipc.on('release-notes', (event, releaseNotes) => {
let statusHtml = document.querySelector('.update-release-notes')
statusHtml.innerHTML = releaseNotes
})
</script>
</body>
</html>