mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
save last connection
This commit is contained in:
parent
dc2815131b
commit
ce8adbc301
@ -10,6 +10,9 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
if (!config.genshinImpactFolder) {
|
if (!config.genshinImpactFolder) {
|
||||||
handleGenshinFolderNotSet()
|
handleGenshinFolderNotSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set last connect
|
||||||
|
document.querySelector('#ip').value = config.lastConnect
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getCfg() {
|
async function getCfg() {
|
||||||
@ -149,6 +152,10 @@ async function launchPrivate() {
|
|||||||
|
|
||||||
console.log('connecting to ' + ip)
|
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
|
// 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))
|
Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}/Genshin Impact Game/${await getGenshinExecName()}"`).catch(e => console.log(e))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user