Skip to content

Commit 10ed279

Browse files
Update Overlay Improvement
- Bit more descriptive of what is actually going on.
1 parent a60c130 commit 10ed279

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

src/autoUpdater.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const updateOverlay_el = document.getElementById('updateOverlay');
22
const startUpdateButton_el = document.getElementById('startUpdateButton');
33
const quitUpdateButton_el = document.getElementById('quitUpdateButton');
44
const updateControlDiv_el = document.getElementById('updateControlDiv');
5+
const downloadingText_el = document.getElementById('downloadingText');
6+
const pleaseWaitText_el = document.getElementById('pleaseWaitText');
57

68
api.autoUpdaterCallback((status) => {
79
if (status === 'Update Available'){
@@ -12,6 +14,8 @@ api.autoUpdaterCallback((status) => {
1214
}
1315
if (status === 'Update Downloaded'){
1416
updateControlDiv_el.style.display = 'grid';
17+
downloadingText_el.textContent = 'Download Complete!';
18+
pleaseWaitText_el.style.display = 'none';
1519
}
1620
});
1721

src/index.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ p {
101101
z-index: 2;
102102
}
103103

104+
.centered-container {
105+
background: #313131;
106+
padding: 20px;
107+
border-radius: 3px;
108+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
109+
text-align: center;
110+
display: grid;
111+
width: 50%;
112+
grid-gap: 5px;
113+
}
114+
104115
.centered-container {
105116
width: 500px;
106117
background: #313131;

src/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
99
</head>
1010
<body>
11-
<div id="updateOverlay" class="overlay" style="display: none;">
12-
<div class="stop-container" style="text-align: center;">
13-
<div style="display: grid">
14-
<h2>Update Available!</h2>
11+
<div id="updateOverlay" class="overlay" style="text-align: center; display: none">
12+
<div class="centered-container">
13+
<div style="display: grid; grid-gap: 5px;">
14+
<h2 id="downloadingText">Downloading Update</h2>
15+
<p id="pleaseWaitText" style="display: grid; text-align: center;">Please wait...</p>
1516
</div>
1617
<div id="updateControlDiv" style="display: none; grid-template-columns: 1fr 1fr; grid-gap: 5px;">
17-
<button id="startUpdateButton" class="input-button">Update & Restart</button>
18-
<button id="quitUpdateButton" class="input-button">Update & Quit</button>
19-
</div>
18+
<button id="startUpdateButton" class="input-button">Restart Application</button>
19+
<button id="quitUpdateButton" class="input-button">Quit</button>
20+
</div>
2021
</div>
2122
</div>
2223

0 commit comments

Comments
 (0)