aboutsummaryrefslogtreecommitdiff
path: root/src/app/main.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-20 20:31:50 +0100
committer0neGal <mail@0negal.com>2022-02-20 20:31:50 +0100
commit3a2f9fac72d141f6a5e2e56133a5ae77d6972680 (patch)
treed90e97a79ac2895db2acade1cc1a8a21834a41ec /src/app/main.js
parent002d14d8094e950caa72d612e8ddac881c1ea7ff (diff)
downloadViper-3a2f9fac72d141f6a5e2e56133a5ae77d6972680.tar.gz
Viper-3a2f9fac72d141f6a5e2e56133a5ae77d6972680.zip
initial work on settings page
This only has the actual UI for the settings page in place, no actual functionality has been implemented yet. I made several changes not directly related to the settings page, such as changes the CSS color variables to use RGB, as to easily add an alpha channel to colors. I also changed the way the Browser is toggled in some respects and many other changes that makes it easy to re-use the browser code to create the settings UI
Diffstat (limited to 'src/app/main.js')
-rw-r--r--src/app/main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 97937a9..db3514b 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -275,6 +275,13 @@ document.addEventListener("drop", (e) => {
installFromPath(event.dataTransfer.files[0].path)
});
+document.body.addEventListener("keyup", (e) => {
+ if (e.key == "Escape") {
+ Browser.toggle(false);
+ Settings.toggle(false);
+ }
+})
+
document.body.addEventListener("click", event => {
if (event.target.tagName.toLowerCase() === "a" && event.target.protocol != "file:") {
event.preventDefault();