From d4dfe9d92dbc517415a85a656520989a6c377aec Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 9 Dec 2023 22:09:57 -0800
Subject: feat(settings): option disable panels

---
 src/routes/+page.svelte | 86 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 53 insertions(+), 33 deletions(-)

(limited to 'src/routes/+page.svelte')

diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index b62d452b..9b39407c 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -80,40 +80,60 @@
 	{#if data.user === undefined}
 		Please log in to view due media.
 	{:else}
-		<details open={!$settings.closeAnimeByDefault} class="list">
-			{#if currentUserIdentity.id != -1}
-				<UpcomingAnimeList user={data.user} identity={currentUserIdentity} />
-			{:else}
-				<ListTitle custom="Upcoming Episodes" />
-
-				<ul><li>Loading ...</li></ul>
-			{/if}
-		</details>
-
-		<details open={!$settings.closeAnimeByDefault} class="list">
-			{#if currentUserIdentity.id != -1}
-				<AnimeList user={data.user} identity={currentUserIdentity} />
-			{:else}
-				<ListTitle anime />
-
-				<ul><li>Loading ...</li></ul>
-			{/if}
-		</details>
-
-		<details open={!$settings.closeMangaByDefault} class="list">
-			{#if currentUserIdentity.id != -1}
-				<MangaListTemplate
-					user={data.user}
-					identity={currentUserIdentity}
-					displayUnresolved={$settings.displayUnresolved}
-					due={true}
+		{#if !$settings.disableUpcomingAnime}
+			<details open={!$settings.closeAnimeByDefault} class="list">
+				{#if currentUserIdentity.id != -1}
+					<UpcomingAnimeList user={data.user} identity={currentUserIdentity} />
+				{:else}
+					<ListTitle custom="Upcoming Episodes" />
+
+					<ul><li>Loading ...</li></ul>
+				{/if}
+			</details>
+		{/if}
+
+		{#if !$settings.disableAnime}
+			<details open={!$settings.closeAnimeByDefault} class="list">
+				{#if currentUserIdentity.id != -1}
+					<AnimeList user={data.user} identity={currentUserIdentity} />
+				{:else}
+					<ListTitle anime />
+
+					<ul><li>Loading ...</li></ul>
+				{/if}
+			</details>
+		{/if}
+
+		{#if !$settings.disableManga}
+			<details open={!$settings.closeMangaByDefault} class="list">
+				{#if currentUserIdentity.id != -1}
+					<MangaListTemplate
+						user={data.user}
+						identity={currentUserIdentity}
+						displayUnresolved={$settings.displayUnresolved}
+						due={true}
+					/>
+				{:else}
+					<ListTitle />
+
+					<ul><li>Loading 0% ...</li></ul>
+				{/if}
+			</details>
+		{/if}
+
+		{#if $settings.disableUpcomingAnime && $settings.disableAnime && $settings.disableManga}
+			<div style="width: 82.5vw; height: 92.5vh; float: none; clear: both; margin: auto auto;">
+				<embed
+					src="https://www.youtube.com/embed/rkmYIGFWNz8?autohide=1&autoplay=1"
+					wmode="transparent"
+					type="video/mp4"
+					width="100%"
+					height="100%"
+					allow="autoplay; encrypted-media; picture-in-picture"
+					allowfullscreen
 				/>
-			{:else}
-				<ListTitle />
-
-				<ul><li>Loading 0% ...</li></ul>
-			{/if}
-		</details>
+			</div>
+		{/if}
 	{/if}
 </div>
 
-- 
cgit v1.2.3

