From 8bb51837ee49579952a824eab0ad8495b3ec0892 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 16 Nov 2023 10:23:47 -0800
Subject: fix(wrapped): background transparency

---
 src/lib/Tools/Wrapped.svelte | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

(limited to 'src/lib/Tools/Wrapped.svelte')

diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte
index de63c3c7..d530dcaf 100644
--- a/src/lib/Tools/Wrapped.svelte
+++ b/src/lib/Tools/Wrapped.svelte
@@ -113,7 +113,9 @@
 
 		if (element !== null) {
 			domToBlob(element, {
-				backgroundColor: transparency ? undefined : dark ? '#0b1622' : '#edf1f5',
+				style: {
+					backgroundColor: transparency ? 'transparent' : dark ? '#0b1622' : '#edf1f5'
+				},
 				quality: 1,
 				scale: 2,
 				fetch: {
@@ -318,17 +320,13 @@
 				<input type="checkbox" bind:checked={watermark} /> Enable watermark
 			</li>
 			<li>
-				<a href={'#'} on:click={() => screenshot(true)}>Generate dark themed image</a>
+				<input type="checkbox" bind:checked={transparency} /> Enable background transparency
 			</li>
 			<li>
-				<a href={'#'} on:click={() => screenshot()}>Generate light themed image</a>
+				<a href={'#'} on:click={() => screenshot(true)}>Generate dark themed image</a>
 			</li>
 			<li>
-				<a href={'#'} on:click={() => (transparency = !transparency)}>
-					<strike>
-						{transparency ? 'Disable' : 'Enable'} background transparency
-					</strike>
-				</a>
+				<a href={'#'} on:click={() => screenshot()}>Generate light themed image</a>
 			</li>
 			<li>
 				<a href={'#'} on:click={() => (abbreviateTitles = !abbreviateTitles)}>
-- 
cgit v1.2.3

