From 5a4be4890b56d411042620be74c724b5dce26b32 Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 27 Sep 2024 18:19:54 +0600 Subject: [PATCH 01/12] web/about/general: add motivation section & rephrase summary --- web/i18n/en/about.json | 3 ++- web/i18n/en/about/general.md | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/web/i18n/en/about.json b/web/i18n/en/about.json index b441512e..ca65523e 100644 --- a/web/i18n/en/about.json +++ b/web/i18n/en/about.json @@ -26,5 +26,6 @@ "heading.plausible": "anonymous traffic analytics", "heading.cloudflare": "web privacy & security", "heading.responsibility": "user responsibilities", - "heading.abuse": "reporting abuse" + "heading.abuse": "reporting abuse", + "heading.motivation": "motivation" } diff --git a/web/i18n/en/about/general.md b/web/i18n/en/about/general.md index 333e119e..8f9a13fd 100644 --- a/web/i18n/en/about/general.md +++ b/web/i18n/en/about/general.md @@ -5,15 +5,27 @@ import SectionHeading from "$components/misc/SectionHeading.svelte"; -
+
-cobalt lets you save anything from your favorite websites: video, audio, photos or gifs — cobalt can do it all! +cobalt helps you save anything from your favorite websites: video, audio, photos or gifs. just paste the link and you're ready to rock! -no ads, trackers, or paywalls, no nonsense. just a convenient web app that works everywhere. +no ads, trackers, paywalls, or other nonsense. just a convenient web app that works anywhere and whenever you need it. +
+ +
+ + +cobalt was created for public benefit, to protect people from ads and malware pushed by alternatives. +we believe that the best software is safe, open, and accessible. + +it's possible thanks to our long-standing infrastructure partner, [royalehosting.net]({partners.royalehosting})!
@@ -44,9 +56,6 @@ cobalt is extremely efficient and a processing server can run on basically any h main processing instances are hosted on several dedicated servers in several countries, to reduce latency and distribute the traffic. - -we constantly improve our infrastructure along with our long-standing partner, [royalehosting.net]({partners.royalehosting})! -you're in good hands, and will get what you need within seconds.
From 6ba27f8369c6fcdae5fd041c3341ef29d07096ec Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 27 Sep 2024 20:54:09 +0600 Subject: [PATCH 02/12] web/DonateOptionsCard: add scroll buttons to the options container cuz users without touchpads couldn't scroll it without tabbing --- .../donate/DonateOptionsCard.svelte | 175 ++++++++++++++++-- 1 file changed, 159 insertions(+), 16 deletions(-) diff --git a/web/src/components/donate/DonateOptionsCard.svelte b/web/src/components/donate/DonateOptionsCard.svelte index 4a162519..d4557a0f 100644 --- a/web/src/components/donate/DonateOptionsCard.svelte +++ b/web/src/components/donate/DonateOptionsCard.svelte @@ -1,5 +1,8 @@ @@ -84,10 +113,11 @@
+ -
- {#each Object.entries(PRESET_DONATION_AMOUNTS) as [ amount, component ]} - - - - {/each} + + +
{#if customInputValue || customInput?.validity.badInput} $ {/if} + e.key === "Enter" && sendCustom()} />
+
+ @@ -288,6 +358,79 @@ text-align: center; } + #donation-options-container { + display: flex; + flex-direction: column; + gap: calc(var(--donate-card-main-padding) / 2); + position: relative; + } + + #donation-options-scroll { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + position: absolute; + pointer-events: none; + width: 100%; + height: 100%; + z-index: 3; + overflow: hidden; + opacity: 0; + transition: opacity 0.2s; + } + + .scroll-button { + pointer-events: all; + color: white; + padding: 0 16px; + background-color: transparent; + height: 100%; + transition: opacity 0.2s; + } + + #donation-options-container:hover #donation-options-scroll { + opacity: 1; + } + + .scroll-button.hidden { + opacity: 0; + visibility: hidden; + } + + #donation-options-container.mask-both:hover #donation-options { + mask-image: linear-gradient( + 90deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 1) 20%, + rgba(0, 0, 0, 1) 50%, + rgba(0, 0, 0, 1) 80%, + rgba(0, 0, 0, 0) 100% + ); + } + + #donation-options-container.mask-left:hover #donation-options { + mask-image: linear-gradient( + 90deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 1) 20%, + rgba(0, 0, 0, 1) 50%, + rgba(0, 0, 0, 1) 96%, + rgba(0, 0, 0, 0) 100% + ); + } + + #donation-options-container.mask-right:hover #donation-options { + mask-image: linear-gradient( + 90deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 1) 4%, + rgba(0, 0, 0, 1) 50%, + rgba(0, 0, 0, 1) 80%, + rgba(0, 0, 0, 0) 100% + ); + } + @media screen and (max-width: 550px) { :global(#donation-box) { min-width: unset; From ebf2d493aac48fa68b7c12d8a1fd3b8f72257fce Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 27 Sep 2024 21:01:41 +0600 Subject: [PATCH 03/12] web/DonateOptionsCard: update buttons on wheel too --- web/src/components/donate/DonateOptionsCard.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/components/donate/DonateOptionsCard.svelte b/web/src/components/donate/DonateOptionsCard.svelte index d4557a0f..2bfc36f3 100644 --- a/web/src/components/donate/DonateOptionsCard.svelte +++ b/web/src/components/donate/DonateOptionsCard.svelte @@ -169,7 +169,12 @@
{}} + on:wheel={() => { + const currentPos = donateList.scrollLeft; + const maxPos = donateList.scrollWidth - donateList.getBoundingClientRect().width; + showLeftScroll = currentPos > 0; + showRightScroll = currentPos < maxPos && currentPos !== maxPos; + }} > {#each Object.entries(PRESET_DONATION_AMOUNTS) as [amount, component]} Date: Fri, 27 Sep 2024 21:16:05 +0600 Subject: [PATCH 04/12] web/DonateCardContainer: reduce padding --- web/src/components/donate/DonateCardContainer.svelte | 8 +------- web/src/components/donate/DonateShareCard.svelte | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web/src/components/donate/DonateCardContainer.svelte b/web/src/components/donate/DonateCardContainer.svelte index db4f6cab..73924ea1 100644 --- a/web/src/components/donate/DonateCardContainer.svelte +++ b/web/src/components/donate/DonateCardContainer.svelte @@ -9,7 +9,7 @@ diff --git a/web/src/components/donate/DonateShareCard.svelte b/web/src/components/donate/DonateShareCard.svelte index 3225c7ad..d83cc7ac 100644 --- a/web/src/components/donate/DonateShareCard.svelte +++ b/web/src/components/donate/DonateShareCard.svelte @@ -111,7 +111,7 @@ From 7d6fe34fa4419387e7d7675facadf2b86bfe997f Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 27 Sep 2024 22:03:58 +0600 Subject: [PATCH 11/12] web/SupportedServices: don't allow selection when popover is hidden --- web/src/components/save/SupportedServices.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/components/save/SupportedServices.svelte b/web/src/components/save/SupportedServices.svelte index 263e0671..bb1251af 100644 --- a/web/src/components/save/SupportedServices.svelte +++ b/web/src/components/save/SupportedServices.svelte @@ -162,6 +162,14 @@ #services-disclaimer { padding: 0; + user-select: none; + -webkit-user-select: none; + } + + .expanded #services-disclaimer { + padding: 0; + user-select: text; + -webkit-user-select: text; } @media screen and (max-width: 535px) { From bf7a48a36ce4a6a1a54959cb84f1c390d56a7a2c Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 28 Sep 2024 02:01:43 +0600 Subject: [PATCH 12/12] api/youtube: fix youtube music metadata parsing still pretty crappy tho --- api/src/processing/services/youtube.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/src/processing/services/youtube.js b/api/src/processing/services/youtube.js index cf83fbd0..46f72a5b 100644 --- a/api/src/processing/services/youtube.js +++ b/api/src/processing/services/youtube.js @@ -243,11 +243,13 @@ export default async function(o) { } if (basicInfo?.short_description?.startsWith("Provided to YouTube by")) { - let descItems = basicInfo.short_description.split("\n\n"); - fileMetadata.album = descItems[2]; - fileMetadata.copyright = descItems[3]; - if (descItems[4].startsWith("Released on:")) { - fileMetadata.date = descItems[4].replace("Released on: ", '').trim() + let descItems = basicInfo.short_description.split("\n\n", 5); + if (descItems.length === 5) { + fileMetadata.album = descItems[2]; + fileMetadata.copyright = descItems[3]; + if (descItems[4].startsWith("Released on:")) { + fileMetadata.date = descItems[4].replace("Released on: ", '').trim(); + } } }