From 19fa06b5bdd0f216c1b5dbb272a7928f637714a1 Mon Sep 17 00:00:00 2001 From: Xylight Date: Thu, 1 Aug 2024 10:13:28 -0700 Subject: [PATCH] fix: make translate feature mostly work --- bun.lockb | Bin 300459 -> 300459 bytes .../components/lemmy/post/PostActions.svelte | 19 +++++----------- .../components/markdown/MarkdownEditor.svelte | 2 +- .../components/translate/Translation.svelte | 21 ++++++++---------- src/lib/components/ui/navbar/Profile.svelte | 15 ++++++++++--- 5 files changed, 27 insertions(+), 30 deletions(-) diff --git a/bun.lockb b/bun.lockb index ea95e702d7661210b1f07eacbb78604e11e605f1..fca7552191144a0da06ee34e1b46cf0f799d2089 100755 GIT binary patch delta 149 zcmV;G0BZlMs}ifL5|Az+NNKMhZ_bf=Iac{goC;+~A)u1X0-14G<6y_^5F{T|u}=EB zlLS;KlkhGGgLu2Qc)I~@8$dy_PkjsS`vQVe5f+6F@bejnB@G1b43nZsf48;yMzK03WN^jlDFEaN?b{u}=EB z0S=R~E+>=lE(n8oySI3|0c{&V?!aiTJ!l+AtB5eA$b%dC;k=q@=D&_#`OZv|arwC( ze;<)ftj}rjHnm {#if fediseerData} - + {#await import('$lib/fediseer/Fediseer.svelte') then { default: Fediseer }} + + {/await} {/if} {#if editing} diff --git a/src/lib/components/markdown/MarkdownEditor.svelte b/src/lib/components/markdown/MarkdownEditor.svelte index 7846f094..02476f80 100644 --- a/src/lib/components/markdown/MarkdownEditor.svelte +++ b/src/lib/components/markdown/MarkdownEditor.svelte @@ -173,7 +173,7 @@ class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-t-zinc-700 dark:border-zinc-800 focus-within:border-primary-900 focus-within:dark:border-primary-100 focus-within:ring ring-slate-300 dark:ring-zinc-700 rounded-xl -overflow-hidden transition-colors" +overflow-hidden transition-colors {$$props.class}" class:mt-1={label} > {#if previewing} diff --git a/src/lib/components/translate/Translation.svelte b/src/lib/components/translate/Translation.svelte index cad6ae7b..37981e34 100644 --- a/src/lib/components/translate/Translation.svelte +++ b/src/lib/components/translate/Translation.svelte @@ -34,7 +34,6 @@ requestURL.searchParams.set('q', text) requestURL.searchParams.set('source', from) requestURL.searchParams.set('target', to) - requestURL.searchParams.set('alternatives', '') result = fetch(requestURL.toString(), { method: 'POST', @@ -89,16 +88,14 @@ {:then result} - {#if !error} - - {/if} + {:catch err} {/await} diff --git a/src/lib/components/ui/navbar/Profile.svelte b/src/lib/components/ui/navbar/Profile.svelte index c4c8bb02..372e91e9 100644 --- a/src/lib/components/ui/navbar/Profile.svelte +++ b/src/lib/components/ui/navbar/Profile.svelte @@ -143,9 +143,18 @@
{}}>