From dc12d6acad613709d738db17cb9440b3f864164d Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:04:19 -0700 Subject: [PATCH 01/23] web/debug: add a copy button, fix page padding, refactor (#782) Co-authored-by: wukko --- web/src/components/misc/SectionHeading.svelte | 21 +++++-- web/src/routes/settings/debug/+page.svelte | 55 +++++++++++-------- 2 files changed, 47 insertions(+), 29 deletions(-) diff --git a/web/src/components/misc/SectionHeading.svelte b/web/src/components/misc/SectionHeading.svelte index 4645f2d0..e3b1e635 100644 --- a/web/src/components/misc/SectionHeading.svelte +++ b/web/src/components/misc/SectionHeading.svelte @@ -8,6 +8,9 @@ export let title: string; export let sectionId: string; export let beta = false; + export let copyData = ""; + + const sectionURL = `${$page.url.origin}${$page.url.pathname}#${sectionId}`; let copied = false; @@ -19,19 +22,27 @@
-

{title}

+

+ {title} +

+ {#if beta} -
{$t("general.beta")}
+
+ {$t("general.beta")} +
{/if} +
diff --git a/web/src/routes/settings/debug/+page.svelte b/web/src/routes/settings/debug/+page.svelte index 71079369..edb612f9 100644 --- a/web/src/routes/settings/debug/+page.svelte +++ b/web/src/routes/settings/debug/+page.svelte @@ -1,12 +1,20 @@ {#if $settings.advanced.debug} -
-

device:

-
- {JSON.stringify(device, null, 2)} -
- -

app:

-
- {JSON.stringify(app, null, 2)} -
- -

settings:

-
- {JSON.stringify($storedSettings, null, 2)} -
- -

version:

-
- {JSON.stringify($version, null, 2)} -
+
+ {#each sections as { title, data }, i} +
+ +
+ {JSON.stringify(data, null, 2)} +
+
+ {/each}
{/if} diff --git a/web/src/routes/about/community/+page.svelte b/web/src/routes/about/community/+page.svelte index e0638015..f5c20bf4 100644 --- a/web/src/routes/about/community/+page.svelte +++ b/web/src/routes/about/community/+page.svelte @@ -4,61 +4,76 @@ import { contacts } from "$lib/env"; import { t } from "$lib/i18n/translations"; - import DonateAltItem from "$components/donate/DonateAltItem.svelte"; + import AboutSupport from "$components/about/AboutSupport.svelte"; + + let buttonContainerWidth: number; - -
- {#if $locale !== "ru"} - +
+ - - {/if} + {#if $locale === "ru"} + + {:else} + + + {/if} +
- +
+ {$t("about.support.description.issue")} - + {#if $locale !== "ru"} + {$t("about.support.description.help")} + {/if} - {#if $locale === "ru"} - - {/if} + {$t("about.support.description.best-effort")} +
From e34b8dd89c365abf03c9c413a7cb0488962fa456 Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 12 Oct 2024 19:07:05 +0600 Subject: [PATCH 08/23] web/Switcher: add a gap between items --- web/src/components/buttons/Switcher.svelte | 1 + web/src/routes/settings/audio/+page.svelte | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/components/buttons/Switcher.svelte b/web/src/components/buttons/Switcher.svelte index a72c4e77..2ead0caf 100644 --- a/web/src/components/buttons/Switcher.svelte +++ b/web/src/components/buttons/Switcher.svelte @@ -47,6 +47,7 @@ background: var(--button); box-shadow: var(--button-box-shadow); padding: var(--switcher-padding); + gap: calc(var(--switcher-padding) - 1.5px); } .switcher :global(.button.active) { diff --git a/web/src/routes/settings/audio/+page.svelte b/web/src/routes/settings/audio/+page.svelte index eb0ac679..06555a42 100644 --- a/web/src/routes/settings/audio/+page.svelte +++ b/web/src/routes/settings/audio/+page.svelte @@ -24,8 +24,8 @@ - From d5ea154ed8266cb72f6112000840dd4ee0dc8dfd Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 12 Oct 2024 19:08:01 +0600 Subject: [PATCH 09/23] web/Omnibox: reduce gap by 2px --- web/src/components/save/Omnibox.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/save/Omnibox.svelte b/web/src/components/save/Omnibox.svelte index a900def7..eed0ad71 100644 --- a/web/src/components/save/Omnibox.svelte +++ b/web/src/components/save/Omnibox.svelte @@ -225,7 +225,7 @@ flex-direction: column; max-width: 640px; width: 100%; - gap: 10px; + gap: 8px; } #input-container { From c10652b8c4586dbe14ae5d52c9dcb2e19363cddd Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 12 Oct 2024 19:10:31 +0600 Subject: [PATCH 10/23] web/AboutSupport: replace duplicated type --- web/src/components/about/AboutSupport.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/about/AboutSupport.svelte b/web/src/components/about/AboutSupport.svelte index 2d4727f4..1e9170b6 100644 --- a/web/src/components/about/AboutSupport.svelte +++ b/web/src/components/about/AboutSupport.svelte @@ -9,9 +9,6 @@ import IconBrandDiscord from "@tabler/icons-svelte/IconBrandDiscord.svelte"; import IconBrandTelegram from "@tabler/icons-svelte/IconBrandTelegram.svelte"; - export let platform: "github" | "discord" | "twitter" | "telegram"; - export let externalLink: string; - const platformIcons = { github: { icon: IconBrandGithub, @@ -30,6 +27,9 @@ color: "#1c9efb", }, }; + + export let platform: keyof typeof platformIcons; + export let externalLink: string; - +{#if button.link} + + {button.text} + +{:else} + +{/if} From c33017283d20ee9a998b7c19ad5f24fc17bdede7 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 13 Oct 2024 09:59:52 +0600 Subject: [PATCH 21/23] api/twitter: fix gifs having a wrong file extension in a picker --- api/src/processing/services/twitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/processing/services/twitter.js b/api/src/processing/services/twitter.js index 18866b49..229415eb 100644 --- a/api/src/processing/services/twitter.js +++ b/api/src/processing/services/twitter.js @@ -208,7 +208,7 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) { let url = bestQuality(content.video_info.variants); const shouldRenderGif = content.type === "animated_gif" && toGif; - const videoFilename = `twitter_${id}_${i + 1}.mp4`; + const videoFilename = `twitter_${id}_${i + 1}.${shouldRenderGif ? "gif" : "mp4"}`; let type = "video"; if (shouldRenderGif) type = "gif"; From 1ab94eb11d7f4499acc87ce5ca1171f93586b7e5 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 16 Oct 2024 16:53:20 +0600 Subject: [PATCH 22/23] web/i18n: update data management strings --- web/i18n/en/dialog.json | 4 ++-- web/i18n/en/settings.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/i18n/en/dialog.json b/web/i18n/en/dialog.json index a2688f6d..3e6f5dec 100644 --- a/web/i18n/en/dialog.json +++ b/web/i18n/en/dialog.json @@ -1,6 +1,6 @@ { - "reset.title": "reset all settings?", - "reset.body": "are you sure you want to reset all settings? this action is immediate and irreversible.", + "reset.title": "reset all data?", + "reset.body": "are you sure you want to reset all data? this action is immediate and irreversible.", "picker.title": "select what to save", "picker.description.desktop": "click an item to save it. images can also be saved via the right click menu.", diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json index 0537982f..8d003439 100644 --- a/web/i18n/en/settings.json +++ b/web/i18n/en/settings.json @@ -106,7 +106,7 @@ "advanced.debug.title": "enable debug features", "advanced.debug.description": "gives you access to a page with various info that can be useful for debugging.", - "advanced.data": "settings data", + "advanced.data": "data management", "processing.override": "default instance override", "processing.override.title": "use the instance-provided processing server", From 0e52e1f8b091c2c48d7851a0185ecf8087115733 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 16 Oct 2024 17:03:34 +0600 Subject: [PATCH 23/23] web/safety-warning: reduce continue button timeout --- web/src/lib/api/safety-warning.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/lib/api/safety-warning.ts b/web/src/lib/api/safety-warning.ts index 175ddd67..26ad6aa4 100644 --- a/web/src/lib/api/safety-warning.ts +++ b/web/src/lib/api/safety-warning.ts @@ -98,7 +98,7 @@ export const customInstanceWarning = async () => { text: get(t)("button.continue"), color: "red", main: true, - timeout: 15000, + timeout: 5000, action: () => { _actions.resolve(); updateSetting({