use registry login option

This commit is contained in:
SpikeHD 2022-04-29 22:42:56 -07:00
parent 5520a11266
commit cbae9f31c2
5 changed files with 24 additions and 2 deletions

View File

@ -182,6 +182,16 @@
Choose between using HTTPS or HTTP.
</span>
</div>
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel", id="registryLoginTitle">Login with Registry</span>
<input type="checkbox" id="registryOption" onchange="toggleRegistryLogin()" />
</select>
</div>
<span class="settingSubtitle" id="registrySubtitle">
Instead of copying login tokens when authenticating, you can login via a modification to the registry. Clears the registry data on game close.
</span>
</div>
</div>
</div>

View File

@ -12,6 +12,7 @@
serverLaunchPanel: false,
language: 'en',
useHttps: true,
registryLogin: true
}
const cfgStr = await Neutralino.storage.getData('config').catch(e => {
// The data isn't set, so this is our first time opening

View File

@ -258,10 +258,12 @@ async function openSettings() {
const killSwitch = document.querySelector('#killswitchOption')
const serverLaunch = document.querySelector('#serverLaunchOption')
const httpsCheckbox = document.querySelector('#httpsOption')
const registryCheckbox = document.querySelector('#registryOption')
killSwitch.checked = config.enableKillswitch
serverLaunch.checked = config.serverLaunchPanel
httpsCheckbox.checked = config.useHttps
registryCheckbox.checked = config.registryLogin
// Load languages
getLanguages()

View File

@ -81,6 +81,15 @@ async function handleLanguageChange(elm) {
Neutralino.storage.setData('config', JSON.stringify(config))
}
async function toggleRegistryLogin() {
const registryCheckbox = document.querySelector('#registryOption')
const config = await getCfg()
config.registryLogin = registryCheckbox.checked
Neutralino.storage.setData('config', JSON.stringify(config))
}
/**
* Add the current value of the IP input to the favorites list
* OR

View File

@ -189,7 +189,7 @@ a {
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10px 10%;
padding: 0 10%;
}
.settingsRow {
@ -206,7 +206,7 @@ a {
display:inline-block;
font-size: 1em;
font-weight: normal;
margin: 10px 0px;
margin: 6px 0px;
}
.settingSubtitle {