mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
add banks.
This commit is contained in:
parent
8781ca6b84
commit
26245c66c3
8 changed files with 127 additions and 24 deletions
|
@ -1,12 +1,12 @@
|
|||
const util = require('util');
|
||||
const exec = util.promisify(require('child_process').exec)
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
const urlInput = document.getElementById("urlInput")
|
||||
const ipInput = document.getElementById("ipInput")
|
||||
const portInput = document.getElementById("portInput")
|
||||
const enterButton = document.getElementById("enterButton")
|
||||
const settingsButton = document.getElementById("settingsButton")
|
||||
|
||||
const path = require("path")
|
||||
let showServerList = false;
|
||||
|
||||
const lastDetails = JSON.parse(localStorage.getItem("lastDetails"));
|
||||
|
@ -16,7 +16,6 @@ if (lastDetails) {
|
|||
ipInput.value = lastDetails.ip;
|
||||
portInput.value = lastDetails.port;
|
||||
}
|
||||
|
||||
enterButton.addEventListener("click", async () => {
|
||||
const url = urlInput.value;
|
||||
const ip = ipInput.value;
|
||||
|
@ -27,22 +26,13 @@ enterButton.addEventListener("click", async () => {
|
|||
ip,
|
||||
port
|
||||
}))
|
||||
|
||||
runCommand(`hirunner.exe "${url}?SERVER=${ip}&PORT=${port}"`)
|
||||
setTimeout(() => {
|
||||
window.close()
|
||||
}, 500);
|
||||
|
||||
const _path = path.join(path.dirname(process.execPath), "hirunner.exe");
|
||||
spawn(_path, [`${url}?SERVER=${ip}&PORT=${port}`],{detached: true,stdio: 'ignore'})
|
||||
window.close();
|
||||
})
|
||||
|
||||
|
||||
async function runCommand(command) {
|
||||
const { stdout, stderr } = await exec(command);
|
||||
if(DEBUG_MODE)
|
||||
{
|
||||
console.log('stdout:', stdout);
|
||||
console.log('stderr:', stderr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
serversList.addEventListener("click", (event) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue