From 20211a489fcfc12c91ec4486017d540c14c9b308 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 6 Apr 2025 16:57:36 -0700 Subject: [PATCH] refac --- src/app.css | 8 ++++++++ src/lib/components/chat/MessageInput.svelte | 2 +- src/lib/components/chat/Settings/Interface.svelte | 12 ++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/app.css b/src/app.css index 4061d3b5e..86e8438f0 100644 --- a/src/app.css +++ b/src/app.css @@ -46,6 +46,14 @@ math { @apply rounded-lg; } +input::placeholder { + direction: auto; +} + +textarea::placeholder { + direction: auto; +} + .input-prose { @apply prose dark:prose-invert prose-headings:font-semibold prose-hr:my-4 prose-hr:border-gray-100 prose-hr:dark:border-gray-800 prose-p:my-0 prose-img:my-1 prose-headings:my-1 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-ul:-my-0 prose-ol:-my-0 prose-li:-my-0 whitespace-pre-line; } diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 0bf56cb4b..d63295947 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -1033,7 +1033,7 @@ {/if} -
+
{ - chatDirection = chatDirection === 'LTR' ? 'RTL' : 'LTR'; + if (chatDirection === 'auto') { + chatDirection = 'LTR'; + } else if (chatDirection === 'LTR') { + chatDirection = 'RTL'; + } else if (chatDirection === 'RTL') { + chatDirection = 'auto'; + } saveSettings({ chatDirection }); }; @@ -412,8 +418,10 @@ > {#if chatDirection === 'LTR'} {$i18n.t('LTR')} - {:else} + {:else if chatDirection === 'RTL'} {$i18n.t('RTL')} + {:else} + {$i18n.t('Auto')} {/if}