mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
save and display options
This commit is contained in:
parent
0ab11044b3
commit
3c8a983915
@ -16,9 +16,9 @@
|
||||
</div>
|
||||
<div class="settingsRow">
|
||||
<span class="settingLabel">Kill Switch</span>
|
||||
<input type="checkbox" id="killswitchOption" />
|
||||
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" />
|
||||
<span class="settingSubtitle">
|
||||
Only for those very paranoid about bans. Kills the game *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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -301,11 +301,25 @@ async function setFavorite() {
|
||||
|
||||
async function openSettings() {
|
||||
const settings = document.querySelector('#settingsPanel')
|
||||
const settingsBtn = document.querySelector('#settingsBtn')
|
||||
const config = await getCfg()
|
||||
|
||||
if (settings.style.display === 'none') {
|
||||
settings.style.removeProperty('display')
|
||||
}
|
||||
|
||||
// Fill setting options with what is currently set in config
|
||||
const killSwitch = document.querySelector('#killswitchOption')
|
||||
|
||||
killSwitch.checked = config.enableKillswitch
|
||||
}
|
||||
|
||||
async function toggleKillSwitch() {
|
||||
const killSwitch = document.querySelector('#killswitchOption')
|
||||
const config = await getCfg()
|
||||
|
||||
config.enableKillswitch = killSwitch.checked
|
||||
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user