From 49fc0156d554a12597c915254cb3ac0aca72698b Mon Sep 17 00:00:00 2001 From: IndexZeroZzz Date: Wed, 28 Feb 2024 22:42:33 +0300 Subject: [PATCH] Outside click close, bugfixes --- src/routes/+page.svelte | 36 ++++++++++++++++++++++++++---------- tsconfig.json | 2 +- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 6f99678..f527293 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -11,6 +11,7 @@ let checksumSwayIsPressed = false; let checksumRiverIsPressed = false; + onMount(() => { let lightbox = new PhotoSwipeLightbox({ gallery: '#sway-screenshots', @@ -19,6 +20,21 @@ }); lightbox.init(); }); + onMount(() => { + document.body.addEventListener('click', (e) => { + let classes = (e.target as HTMLElement).classList; + if(classes.contains('download-all') == false) { + downloadIsPressed = false; + } + + if(classes.contains('checksum-sway') == false) { + checksumSwayIsPressed = false; + } + if(classes.contains('checksum-river') == false) { + checksumRiverIsPressed = false; + } + }) + }); @@ -33,18 +49,18 @@
@@ -115,12 +131,12 @@
@@ -220,12 +236,12 @@
@@ -297,8 +313,8 @@
-
-
+
+

System requirements:

  • CPU: Dual-core CPU with 1.6 GHz
  • @@ -311,7 +327,7 @@
-
+

Known Issues:

  • diff --git a/tsconfig.json b/tsconfig.json index 82081ab..e7a6a63 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { "allowJs": true, - "checkJs": true, + "checkJs": false, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true,