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> <span>Scripts</span>
</div> </div>
<div class="settingsRow"> <div class="settingsRow">
<span class="settingLabel">Kill Switch</span> <div class="settingSection">
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" /> <span class="settingLabel">Kill Switch</span>
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" />
</div>
<span class="settingSubtitle"> <span class="settingSubtitle">
Only for those very paranoid about bans. Kills the game process *and your internet* if something happens to the proxy. Only for those very paranoid about bans. Kills the game process *and your internet* if something happens to the proxy.
</span> </span>
</div> </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> </div>
<div id="controlBar"> <div id="controlBar">

View File

@ -29,13 +29,13 @@ document.addEventListener('DOMContentLoaded', async () => {
if (!curDirList.find(f => f.entry === 'ext')) { if (!curDirList.find(f => f.entry === 'ext')) {
playPriv.classList.add('disabled') playPriv.classList.add('disabled')
playPriv.disabled = true 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')
if (!extFiles.find(f => f.entry === 'mitmdump.exe')) { playPriv.disabled = true
playPriv.classList.add('disabled') }
playPriv.disabled = true
} }
// Exit favorites list and settings panel when clicking outside of it // Exit favorites list and settings panel when clicking outside of it

View File

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