diff options
author | 0neGal <mail@0negal.com> | 2022-02-23 18:17:56 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-02-23 18:17:56 +0100 |
commit | 815106a3e1214196b25a380d83e826473840f948 (patch) | |
tree | 9b37315b8068931d69755acf7b00900f64474de5 /src/app | |
parent | 132fea11e3599c9c2c9df8a69fd4d093033788ba (diff) | |
download | Viper-815106a3e1214196b25a380d83e826473840f948.tar.gz Viper-815106a3e1214196b25a380d83e826473840f948.zip |
settings page is now fully functional
It actually saves settings, loads them properly and everything...
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/index.html | 4 | ||||
-rw-r--r-- | src/app/settings.js | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/app/index.html b/src/app/index.html index 0bd6694..f605136 100644 --- a/src/app/index.html +++ b/src/app/index.html @@ -26,11 +26,11 @@ <div class="popup" id="options"> <div class="misc"> <div style="width:100%"></div> - <button id="apply" onclick="Settings.apply()"> + <button id="apply" onclick="Settings.toggle(false);Settings.apply()"> <img src="icons/apply.png"> Save </button> - <button id="close" onclick="Settings.toggle(false)"> + <button id="close" onclick="Settings.toggle(false);Settings.load()"> <img src="icons/close.png"> Discard </button> diff --git a/src/app/settings.js b/src/app/settings.js index e558d61..4921e07 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -20,7 +20,10 @@ var Settings = { overlay.classList.toggle("shown") options.classList.toggle("shown") }, - apply: () => {}, + apply: () => { + settings = {...settings, ...Settings.get()}; + ipcRenderer.send("savesettings", Settings.get()); + }, reloadSwitches: () => { let switches = document.querySelectorAll(".switch"); |