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.
|
Choose between using HTTPS or HTTP.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
serverLaunchPanel: false,
|
serverLaunchPanel: false,
|
||||||
language: 'en',
|
language: 'en',
|
||||||
useHttps: true,
|
useHttps: true,
|
||||||
|
registryLogin: true
|
||||||
}
|
}
|
||||||
const cfgStr = await Neutralino.storage.getData('config').catch(e => {
|
const cfgStr = await Neutralino.storage.getData('config').catch(e => {
|
||||||
// The data isn't set, so this is our first time opening
|
// 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 killSwitch = document.querySelector('#killswitchOption')
|
||||||
const serverLaunch = document.querySelector('#serverLaunchOption')
|
const serverLaunch = document.querySelector('#serverLaunchOption')
|
||||||
const httpsCheckbox = document.querySelector('#httpsOption')
|
const httpsCheckbox = document.querySelector('#httpsOption')
|
||||||
|
const registryCheckbox = document.querySelector('#registryOption')
|
||||||
|
|
||||||
killSwitch.checked = config.enableKillswitch
|
killSwitch.checked = config.enableKillswitch
|
||||||
serverLaunch.checked = config.serverLaunchPanel
|
serverLaunch.checked = config.serverLaunchPanel
|
||||||
httpsCheckbox.checked = config.useHttps
|
httpsCheckbox.checked = config.useHttps
|
||||||
|
registryCheckbox.checked = config.registryLogin
|
||||||
|
|
||||||
// Load languages
|
// Load languages
|
||||||
getLanguages()
|
getLanguages()
|
||||||
|
@ -81,6 +81,15 @@ async function handleLanguageChange(elm) {
|
|||||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
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
|
* Add the current value of the IP input to the favorites list
|
||||||
* OR
|
* OR
|
||||||
|
@ -189,7 +189,7 @@ a {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px 10%;
|
padding: 0 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settingsRow {
|
.settingsRow {
|
||||||
@ -206,7 +206,7 @@ a {
|
|||||||
display:inline-block;
|
display:inline-block;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin: 10px 0px;
|
margin: 6px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settingSubtitle {
|
.settingSubtitle {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user