diff --git a/app/assets/css/launcher.css b/app/assets/css/launcher.css index 278da6f..847114a 100644 --- a/app/assets/css/launcher.css +++ b/app/assets/css/launcher.css @@ -1387,7 +1387,16 @@ input:checked + .toggleSwitchSlider:before { font-weight: bold; } -.settingsServerCode:not([valid]) > .settingsServerCodeContent > .settingsServerCodeMainWrapper > .settingsServerCodeDetails > .settingsServerCodeServerName { +.settingsServerCodeServerNamesContent { + max-width: 650px; +} + +.settingsServerCodeServerName { + margin-right: 35px; + font-size: 14px; +} + +.settingsServerCode:not([valid]) > .settingsServerCodeContent > .settingsServerCodeMainWrapper > .settingsServerCodeDetails > .settingsServerCodeServerNamesContent > .settingsServerCodeServerName { color: red; } diff --git a/app/assets/js/distromanager.js b/app/assets/js/distromanager.js index 7407374..2422e76 100644 --- a/app/assets/js/distromanager.js +++ b/app/assets/js/distromanager.js @@ -512,15 +512,16 @@ class DistroIndex { * * @param {string} id The ID of the server. * - * @returns {Server} The server configuration with the given ID or null. + * @returns {Server[]} The server configuration with the given ID or null. */ - getServerFromCode(code){ + getServersFromCode(code){ + let servs = [] for(let serv of this.servers){ if(serv.serverCode === code){ - return serv + servs.push(serv) } } - return null + return servs } /** diff --git a/app/assets/js/scripts/settings.js b/app/assets/js/scripts/settings.js index d0368d1..27fdbe1 100644 --- a/app/assets/js/scripts/settings.js +++ b/app/assets/js/scripts/settings.js @@ -732,18 +732,21 @@ function resolveDropinModsForUI(){ } function resolveServerCodesForUI(){ + /* Server Codes */ let servCodes = '' for(let servCode of ConfigManager.getServerCodes()){ - const serv = DistroManager.getDistribution().getServerFromCode(servCode) + const servs = DistroManager.getDistribution().getServersFromCode(servCode) + const valid = servs && servs.length servCodes += ` -