install proxy server through settings

This commit is contained in:
SpikeHD 2022-04-21 17:35:50 -07:00
parent b8cf13badd
commit bf014bbfb3
3 changed files with 31 additions and 10 deletions

View File

@ -30,12 +30,23 @@
<span>Scripts</span>
</div>
<div class="settingsRow">
<span class="settingLabel">Kill Switch</span>
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" />
<div class="settingSection">
<span class="settingLabel">Kill Switch</span>
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" />
</div>
<span class="settingSubtitle">
Only for those very paranoid about bans. Kills the game process *and your internet* if something happens to the proxy.
</span>
</div>
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel">Install Proxy Server</span>
<button class="smolBtn" onclick="runInstallScript()">Install</button>
</div>
<span class="settingSubtitle">
Install the proxy server via the install script.
</span>
</div>
</div>
</div>
<div id="controlBar">

View File

@ -29,13 +29,13 @@ document.addEventListener('DOMContentLoaded', async () => {
if (!curDirList.find(f => f.entry === 'ext')) {
playPriv.classList.add('disabled')
playPriv.disabled = true
}
} else {
const extFiles = await Neutralino.filesystem.readDirectory(NL_CWD + '/ext')
const extFiles = await Neutralino.filesystem.readDirectory(NL_CWD + '/ext')
if (!extFiles.find(f => f.entry === 'mitmdump.exe')) {
playPriv.classList.add('disabled')
playPriv.disabled = true
if (!extFiles.find(f => f.entry === 'mitmdump.exe')) {
playPriv.classList.add('disabled')
playPriv.disabled = true
}
}
// Exit favorites list and settings panel when clicking outside of it

View File

@ -82,8 +82,7 @@ body {
display:inline-block;
font-size: 1em;
font-weight: normal;
margin-bottom: 10px;
margin-right: 50%;
margin: 10px 0px;
}
.settingSubtitle {
@ -92,6 +91,17 @@ body {
font-weight: normal;
}
.settingSection {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.settingSection .smolBtn {
height: 30px;
}
#settingsClose {
display: inline-block;
margin-left: 65%;