diff --git a/app/assets/css/launcher.css b/app/assets/css/launcher.css index b4a7ccbe..a6a17fb1 100644 --- a/app/assets/css/launcher.css +++ b/app/assets/css/launcher.css @@ -375,7 +375,7 @@ p { #mojang_status_icon { font-size: 30px; - color: #a5c325; + color: #848484; margin-left: 15px; } diff --git a/app/assets/js/actionbinder.js b/app/assets/js/actionbinder.js index cc44b05a..50a1fca1 100644 --- a/app/assets/js/actionbinder.js +++ b/app/assets/js/actionbinder.js @@ -4,7 +4,11 @@ const {AssetGuard} = require(path.join(__dirname, 'assets', 'js', 'assetguard.js const ProcessBuilder = require(path.join(__dirname, 'assets', 'js', 'processbuilder.js')) const ConfigManager = require(path.join(__dirname, 'assets', 'js', 'configmanager.js')) const DiscordWrapper = require(path.join(__dirname, 'assets', 'js', 'discordwrapper.js')) +const mojang2 = require(path.join(__dirname, 'assets', 'js', 'mojang.js')) +let mojangStatusListener + +// Synchronous Listener document.addEventListener('readystatechange', function(){ if (document.readyState === 'interactive'){ @@ -18,6 +22,39 @@ document.addEventListener('readystatechange', function(){ // Bind selected server document.getElementById('server_selection').innerHTML = '\u2022 ' + AssetGuard.getServerById(ConfigManager.getGameDirectory(), ConfigManager.getSelectedServer()).name + + // Update Mojang Status Color + const refreshMojangStatuses = async function(){ + console.log('Refreshing Mojang Statuses..') + try { + let status = 'grey' + const statuses = await mojang2.status() + greenCount = 0 + for(let i=0; i