mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
save last connection
This commit is contained in:
parent
dc2815131b
commit
ce8adbc301
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user