From ce8adbc301ed51424cc6290584bdec3c82daff41 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Wed, 20 Apr 2022 18:43:19 -0700 Subject: [PATCH] save last connection --- resources/js/index.js | 7 +++++++ 1 file changed, 7 insertions(+) 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)) }