From 16997f1e38e4a5bbf73d66745de3a7a89e18433d Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 2 Oct 2024 18:47:30 +0600 Subject: [PATCH 1/6] web/about/credits: add the website link for one of testers --- web/i18n/en/about/credits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/i18n/en/about/credits.md b/web/i18n/en/about/credits.md index ddfa1fc6..e164ca6a 100644 --- a/web/i18n/en/about/credits.md +++ b/web/i18n/en/about/credits.md @@ -19,7 +19,7 @@ they also helped us ship cobalt 10! - [hyperdefined](https://hyper.lol/) - [KwiatekMiki](https://kwiatekmiki.com/) - [Lao](https://lao.ooo/) -- lostdusty +- [lostdusty](https://lostdusty.dev.br/) - [noblereign](https://fursona.directory/@frost) - [Spax](https://spax.zone/) - [synzr](https://synzr.space/) From e419de07a43270db2a43c89f9215088e5d489d8b Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 3 Oct 2024 11:57:18 +0600 Subject: [PATCH 2/6] web/layout: fix text selection color --- web/src/routes/+layout.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index edc364c1..ce5e0c02 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -501,6 +501,11 @@ padding-top: 0; } + :global(::selection) { + color: var(--primary); + background: var(--secondary); + } + @media screen and (max-width: 535px) { :global(.long-text-noto), :global(.long-text-noto *:not(h1, h2, h3, h4, h5, h6)) { From b3137ad9acee737a889e3854056c5e08cb7ff506 Mon Sep 17 00:00:00 2001 From: KwiatekMiki Date: Thu, 3 Oct 2024 08:26:38 +0200 Subject: [PATCH 3/6] feat/api: add support for twitter bookmark links (#706) * feat: add support for twitter bookmark links * feat: add tests for bookmark twitter links --- api/src/processing/service-config.js | 3 ++- api/src/processing/url.js | 5 +++++ api/src/util/tests.json | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/api/src/processing/service-config.js b/api/src/processing/service-config.js index f091d448..8d8bf4ac 100644 --- a/api/src/processing/service-config.js +++ b/api/src/processing/service-config.js @@ -137,7 +137,8 @@ export const services = { ":user/status/:id/video/:index", ":user/status/:id/photo/:index", ":user/status/:id/mediaviewer", - ":user/status/:id/mediaViewer" + ":user/status/:id/mediaViewer", + "i/bookmarks?post_id=:id" ], subdomains: ["mobile"], altDomains: ["x.com", "vxtwitter.com", "fixvx.com"], diff --git a/api/src/processing/url.js b/api/src/processing/url.js index a8e69937..034a5d73 100644 --- a/api/src/processing/url.js +++ b/api/src/processing/url.js @@ -120,6 +120,11 @@ function cleanURL(url) { limitQuery('p') } break; + case "twitter": + if (url.searchParams.get('post_id')) { + limitQuery('post_id') + } + break; } if (stripQuery) { diff --git a/api/src/util/tests.json b/api/src/util/tests.json index 17952595..94005c0a 100644 --- a/api/src/util/tests.json +++ b/api/src/util/tests.json @@ -192,6 +192,24 @@ "code": 400, "status": "error" } + }, + { + "name": "bookmarked video", + "url": "https://twitter.com/i/bookmarks?post_id=1828099210220294314", + "params": {}, + "expected": { + "code": 200, + "status": "redirect" + } + }, + { + "name": "bookmarked photo", + "url": "https://twitter.com/i/bookmarks?post_id=1837430141179289876", + "params": {}, + "expected": { + "code": 200, + "status": "redirect" + } } ], "soundcloud": [ From c2d7e1df125be7967430688db8c62c1746283cdc Mon Sep 17 00:00:00 2001 From: lath <38570701+halozat@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:27:28 +0200 Subject: [PATCH 4/6] api/config: add configuration for streamLifespan (#792) --- api/src/config.js | 2 +- docs/run-an-instance.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/config.js b/api/src/config.js index 5f3e52cc..1f00231e 100644 --- a/api/src/config.js +++ b/api/src/config.js @@ -26,7 +26,7 @@ const env = { rateLimitMax: (process.env.RATELIMIT_MAX && parseInt(process.env.RATELIMIT_MAX)) || 20, durationLimit: (process.env.DURATION_LIMIT && parseInt(process.env.DURATION_LIMIT)) || 10800, - streamLifespan: 90, + streamLifespan: (process.env.TUNNEL_LIFESPAN && parseInt(process.env.TUNNEL_LIFESPAN)) || 90, processingPriority: process.platform !== 'win32' && process.env.PROCESSING_PRIORITY diff --git a/docs/run-an-instance.md b/docs/run-an-instance.md index 8144c037..4e41c73b 100644 --- a/docs/run-an-instance.md +++ b/docs/run-an-instance.md @@ -71,6 +71,7 @@ sudo service nscd start | `RATELIMIT_WINDOW` | `60` | `120` | rate limit time window in **seconds**. | | `RATELIMIT_MAX` | `20` | `30` | max requests per time window. requests above this amount will be blocked for the rate limit window duration. | | `DURATION_LIMIT` | `10800` | `18000` | max allowed video duration in **seconds**. | +| `TUNNEL_LIFESPAN` | `90` | `120` | the duration for which tunnel info is stored in ram, **in seconds**. | \* the higher the nice value, the lower the priority. [read more here](https://en.wikipedia.org/wiki/Nice_(Unix)). From 1a9494b60a73b674c2f375a78d036c2b5c6b3480 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Fri, 4 Oct 2024 04:43:31 -0700 Subject: [PATCH 5/6] web/layout: increase toggle contrast in dark mode (#754) --- web/src/routes/+layout.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index ce5e0c02..9ff435a9 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -203,7 +203,7 @@ --input-border: #383838; --toggle-bg: var(--input-border); - --toggle-bg-enabled: #777777; + --toggle-bg-enabled: #8a8a8a; --sidebar-mobile-gradient: linear-gradient( 90deg, From 4317b128a8c70bf2c04fd83091e8f8a1603ac077 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Fri, 4 Oct 2024 12:23:48 +0000 Subject: [PATCH 6/6] about/credits: move beta tester listing to component this is to prevent it from showing up in i18n --- web/i18n/en/about/credits.md | 13 ++------- web/src/components/misc/BetaTesters.svelte | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 web/src/components/misc/BetaTesters.svelte diff --git a/web/i18n/en/about/credits.md b/web/i18n/en/about/credits.md index e164ca6a..6c001f58 100644 --- a/web/i18n/en/about/credits.md +++ b/web/i18n/en/about/credits.md @@ -3,6 +3,7 @@ import { t } from "$lib/i18n/translations"; import SectionHeading from "$components/misc/SectionHeading.svelte"; + import BetaTesters from "$components/misc/BetaTesters.svelte";
@@ -13,17 +14,7 @@ huge shoutout to our thing breakers for testing updates early and making sure they're stable. they also helped us ship cobalt 10! -- codfish246 -- [damir](https://otomir23.me/) -- Hunter -- [hyperdefined](https://hyper.lol/) -- [KwiatekMiki](https://kwiatekmiki.com/) -- [Lao](https://lao.ooo/) -- [lostdusty](https://lostdusty.dev.br/) -- [noblereign](https://fursona.directory/@frost) -- [Spax](https://spax.zone/) -- [synzr](https://synzr.space/) -- [vimae](https://mae.wtf/) + all links are external and lead to their personal websites or social media.
diff --git a/web/src/components/misc/BetaTesters.svelte b/web/src/components/misc/BetaTesters.svelte new file mode 100644 index 00000000..df429dfd --- /dev/null +++ b/web/src/components/misc/BetaTesters.svelte @@ -0,0 +1,32 @@ + + +
    + {#each credits as { name, url }} +
  • + {#if url} + + {name} + + {:else} + {name} + {/if} +
  • + {/each} +