diff --git a/resources/js/index.js b/resources/js/index.js index fa673cc..029ce4e 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -10,6 +10,9 @@ document.addEventListener('DOMContentLoaded', async () => { if (!config.genshinImpactFolder) { handleGenshinFolderNotSet() } + + // Set last connect + document.querySelector('#ip').value = config.lastConnect }) async function getCfg() { @@ -149,6 +152,10 @@ async function launchPrivate() { console.log('connecting to ' + ip) + // Set the last connect + config.lastConnect = ip + Neutralino.storage.setData('config', JSON.stringify(config)) + // Pass IP and game folder to the private server launcher Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}/Genshin Impact Game/${await getGenshinExecName()}"`).catch(e => console.log(e)) }