From cbae9f31c260f4c08140a5e19392366b87619ee1 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Fri, 29 Apr 2022 22:42:56 -0700 Subject: [PATCH] use registry login option --- resources/index.html | 10 ++++++++++ resources/js/helpers.js | 1 + resources/js/index.js | 2 ++ resources/js/options.js | 9 +++++++++ resources/style/index.css | 4 ++-- 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/resources/index.html b/resources/index.html index f59f5ea..08a74a7 100644 --- a/resources/index.html +++ b/resources/index.html @@ -182,6 +182,16 @@ Choose between using HTTPS or HTTP. +
+
+ Login with Registry + + +
+ + Instead of copying login tokens when authenticating, you can login via a modification to the registry. Clears the registry data on game close. + +
diff --git a/resources/js/helpers.js b/resources/js/helpers.js index c0b31c0..c8457d2 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -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 diff --git a/resources/js/index.js b/resources/js/index.js index 3070a54..3b946e9 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -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() diff --git a/resources/js/options.js b/resources/js/options.js index 1b74f53..693095a 100644 --- a/resources/js/options.js +++ b/resources/js/options.js @@ -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 diff --git a/resources/style/index.css b/resources/style/index.css index ff31870..b3149cb 100644 --- a/resources/style/index.css +++ b/resources/style/index.css @@ -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 {