From ef06feecaefc7b4a7345eb875868dc40e519a52a Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:11:53 +1200 Subject: [PATCH 01/11] Fix player resuming on page change --- materialious/src/lib/Player.svelte | 15 --------------- update_versions.py | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/materialious/src/lib/Player.svelte b/materialious/src/lib/Player.svelte index 918609f2..766db85b 100644 --- a/materialious/src/lib/Player.svelte +++ b/materialious/src/lib/Player.svelte @@ -1,7 +1,6 @@ {#if audioMode} diff --git a/update_versions.py b/update_versions.py index f07e908a..ac261db8 100644 --- a/update_versions.py +++ b/update_versions.py @@ -5,7 +5,7 @@ import json import os import re -LATEST_VERSION = "1.0.8" +LATEST_VERSION = "1.0.9" WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious") ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json") From ee5a245315b248ef9866c3c503b7de9d4f38bdb4 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:17:33 +1200 Subject: [PATCH 02/11] Show likes if RYD is disabled --- materialious/src/routes/watch/[slug]/+page.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/materialious/src/routes/watch/[slug]/+page.svelte b/materialious/src/routes/watch/[slug]/+page.svelte index 35f5c689..407d9d9f 100644 --- a/materialious/src/routes/watch/[slug]/+page.svelte +++ b/materialious/src/routes/watch/[slug]/+page.svelte @@ -461,6 +461,11 @@ {cleanNumber(returnYTDislikes.dislikes)} + {:else} + {/if} {/await} From 96a1b64a4d272f92563b07af9cea15b108a29a21 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:19:12 +1200 Subject: [PATCH 03/11] Dont allow empty search --- materialious/src/lib/Search.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/materialious/src/lib/Search.svelte b/materialious/src/lib/Search.svelte index e50b8262..f6f4104e 100644 --- a/materialious/src/lib/Search.svelte +++ b/materialious/src/lib/Search.svelte @@ -32,6 +32,8 @@ } function handleSubmit() { + if (search.trim() === '') return; + selectedSuggestionIndex = -1; goto(`/search/${encodeURIComponent(search)}`); dispatch('searchSubmitted'); From 78f5fc47fd84c685644d58c4847c98ace7b3fa1a Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:22:51 +1200 Subject: [PATCH 04/11] Added ability to hide replies after expanded --- materialious/src/lib/Comment.svelte | 7 ++++++- materialious/src/lib/i18n/locales/en.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/materialious/src/lib/Comment.svelte b/materialious/src/lib/Comment.svelte index 53ec8c79..8ca4a2bb 100644 --- a/materialious/src/lib/Comment.svelte +++ b/materialious/src/lib/Comment.svelte @@ -7,7 +7,7 @@ export let comment: Comment; export let videoId: string; - let replies: Comments; + let replies: Comments | undefined = undefined; async function loadReplies(continuation: string) { try { @@ -75,6 +75,11 @@ expand_more {comment.replies.replyCount} {$_('replies')} + {:else if replies} + {/if} diff --git a/materialious/src/lib/i18n/locales/en.json b/materialious/src/lib/i18n/locales/en.json index 84151168..052f780e 100644 --- a/materialious/src/lib/i18n/locales/en.json +++ b/materialious/src/lib/i18n/locales/en.json @@ -12,6 +12,7 @@ "deleteAllHistory": "Delete all history", "skipping": "Skipping", "replies": "replies", + "hideReplies": "Hide replies", "hideVideo": "Hide video", "syncParty": { "userJoined": "User joined your watch party.", From 3fe156e87e99de929dbc4e3eb52269d260ffa961 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:27:44 +1200 Subject: [PATCH 05/11] Fixed thumbnail scaling --- materialious/src/lib/Thumbnail.svelte | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/materialious/src/lib/Thumbnail.svelte b/materialious/src/lib/Thumbnail.svelte index 3cea88e4..3f2cc3e4 100644 --- a/materialious/src/lib/Thumbnail.svelte +++ b/materialious/src/lib/Thumbnail.svelte @@ -238,12 +238,7 @@ {:else} - Thumbnail for video + Thumbnail for video {/if} {:else}

{$_('thumbnail.failedToLoadImage')}

@@ -339,6 +334,10 @@ max-height: 160px; } + .thumbnail img { + object-fit: contain; + } + @media screen and (max-width: 650px) { .thumbnail { max-height: 100%; From 1db7e37dbbcd66ea652e867e74ec597289c3eb18 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:31:39 +1200 Subject: [PATCH 06/11] Header home link --- materialious/src/routes/+layout.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/materialious/src/routes/+layout.svelte b/materialious/src/routes/+layout.svelte index 086f5394..352e4045 100644 --- a/materialious/src/routes/+layout.svelte +++ b/materialious/src/routes/+layout.svelte @@ -191,8 +191,10 @@ >menu - -
Materialious
+
@@ -271,7 +273,7 @@
-