terrible ip textbox for testing

This commit is contained in:
SpikeHD 2022-04-19 20:33:34 -07:00
parent 9f672703fe
commit d298b5b2f4
4 changed files with 9 additions and 2 deletions

View File

@ -1 +1 @@
{"accessToken":"koqlczs0mi0QuA4uZtkaZmPT9H3xQO-MaifZIUVW_kkp8HBD","port":62332} {"accessToken":"5MwsrKLchb8OnvKTd7b00-wJDz6E-6MQbmre-TC7jiEs6mJs","port":57800}

View File

@ -12,6 +12,7 @@
</div> </div>
<div id="secondHalf"> <div id="secondHalf">
<button class="playBtn" onclick="launchPrivate()">Play Private</button> <button class="playBtn" onclick="launchPrivate()">Play Private</button>
<input type="text" id="ip" placeholder="IP Address" />
</div> </div>
</div> </div>

View File

@ -75,11 +75,13 @@ async function launchOfficial() {
} }
async function launchPrivate() { async function launchPrivate() {
const ip = 'localhost' const ip = document.getElementById('ip').value || 'localhost'
const port = '' const port = ''
const config = await getCfg() const config = await getCfg()
console.log('connecting to ' + ip)
// 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}/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}"`).catch(e => console.log(e)) Neutralino.os.execCommand(`${NL_CWD}/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}"`).catch(e => console.log(e))
} }

View File

@ -5,6 +5,10 @@ body {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
} }
input[type="text"] {
height: 20px;
}
.playBtn:hover, .smolBtn:hover { .playBtn:hover, .smolBtn:hover {
cursor: pointer; cursor: pointer;
} }