Skip to content

Commit 2e9d631

Browse files
committed
Add 'validation in progress' to prevent 'invalid path' flashing during validation
1 parent 19cedb4 commit 2e9d631

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

httpGUI/installer.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,13 @@ <h4 class="uppercase mt40">Choose an install path</h4>
435435
<td style="width:23%;"></td>
436436
<td>
437437
<div v-if="installPathFocussed" style="color: red"><strong>Use manual entry as a last resort (if the file-chooser above doesn't work)</strong></div>
438-
<div v-if="installPathValid" style="color: green"><strong>Detected game at: {{ validatedInstallPath }}</strong></div>
439-
<div v-if="!installPathValid" style="color: red"><strong>Couldn't detect game!</strong></div>
438+
<div v-if="validationInProgress">
439+
<div v-if="selectedInstallPath !== null" style="color: goldenrod"><strong>Validating...</strong></div>
440+
</div>
441+
<div v-else>
442+
<div v-if="installPathValid" style="color: green"><strong>Detected game at: {{ validatedInstallPath }}</strong></div>
443+
<div v-if="!installPathValid" style="color: red"><strong>Couldn't detect game!</strong></div>
444+
</div>
440445
</td>
441446
</tr>
442447
<tr>

httpGUI/python-patcher-lib.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ window.onload = function onWindowLoaded() {
124124
selectedInstallPath: null, // After an install successfully started, this contains the install path chosen
125125
validatedInstallPath: null,
126126
installPathValid: false,
127+
validationInProgress: true,
127128
installPathFocussed: false,
128129
logFilePath: null, // When window loaded, this script queries the installer as to the log file path
129130
os: null, // the host operating system detected by the python script - either 'windows', 'linux', or 'mac'
@@ -166,6 +167,7 @@ window.onload = function onWindowLoaded() {
166167
(responseData) => {
167168
app.installPathValid = responseData.installStarted;
168169
app.validatedInstallPath = responseData.validatedInstallPath;
170+
app.validationInProgress = false;
169171
});
170172
},
171173
},
@@ -203,6 +205,7 @@ window.onload = function onWindowLoaded() {
203205
},
204206
selectedInstallPath: function onSelectedInstallPathChanged(newPath, oldPath) {
205207
if (newPath !== null) {
208+
app.validationInProgress = true;
206209
app.showConfirmation = true;
207210
app.debouncedValidateInstallPath();
208211
}

0 commit comments

Comments
 (0)