mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
use registry login option
This commit is contained in:
parent
5520a11266
commit
cbae9f31c2
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user