diff --git a/src/gui/html/js/dom.js b/src/gui/html/js/dom.js
index 5ebe7a42..bc3895d2 100644
--- a/src/gui/html/js/dom.js
+++ b/src/gui/html/js/dom.js
@@ -253,5 +253,13 @@
static setUIState(state) {
document.body.setAttribute('data-state', state);
}
+
+ static enableGameOperations(enable) {
+ document.getElementById('sortButton').disabled = !enable;
+ document.getElementById('updateMasterlistButton').disabled = !enable;
+ document.getElementById('wipeUserlistButton').disabled = !enable;
+ document.getElementById('copyLoadOrderButton').disabled = !enable;
+ document.getElementById('refreshContentButton').disabled = !enable;
+ }
};
}));
diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js
index 1b9afe07..903d38a6 100644
--- a/src/gui/html/js/events.js
+++ b/src/gui/html/js/events.js
@@ -315,6 +315,9 @@ function onCloseSettingsDialog(evt) {
loot.query('closeSettings', settings).then(JSON.parse).then((installedGames) => {
loot.installedGames = installedGames;
loot.DOM.updateEnabledGames(installedGames);
+ if (installedGames.length > 0) {
+ loot.DOM.enableGameOperations(true);
+ }
}).catch(loot.handlePromiseError)
.then(() => {
loot.settings = settings;
diff --git a/src/gui/html/js/initialise.js b/src/gui/html/js/initialise.js
index e3fcebf8..df7ff4cb 100644
--- a/src/gui/html/js/initialise.js
+++ b/src/gui/html/js/initialise.js
@@ -151,6 +151,7 @@
function handleInitErrors(error) {
dom.listInitErrors(getErrorMessages(error.message));
Dialog.closeProgress();
+ dom.enableGameOperations(false);
dom.openDialog('settingsDialog');
}