Merge pull request #16878 from rgaricano/dev-FIX_RTL_in_messages-LTR_codeblock

FIX- RTL text orientation in Messages, and LTR allways for CodeBlock
This commit is contained in:
Tim Jaeryang Baek 2025-08-26 02:25:01 +04:00 committed by GitHub
commit 4b22aa819c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -37,7 +37,7 @@
export let code = '';
export let attributes = {};
export let className = 'my-2';
export let className = 'my-2 !text-left !direction-ltr';
export let editorClassName = '';
export let stickyButtonsClassName = 'top-0';

View file

@ -639,7 +639,12 @@
</Name>
<div>
<div class="chat-{message.role} w-full min-w-full markdown-prose">
<div
class="chat-{message.role} w-full min-w-full markdown-prose {$settings.chatDirection ===
'RTL'
? 'text-right'
: ''}"
>
<div>
{#if (message?.statusHistory ?? [...(message?.status ? [message?.status] : [])]).length > 0}
{@const status = (

View file

@ -329,7 +329,7 @@
? `max-w-[90%] px-5 py-2 bg-gray-50 dark:bg-gray-850 ${
message.files ? 'rounded-tr-lg' : ''
}`
: ' w-full'}"
: ' w-full'} {$settings.chatDirection === 'RTL' ? 'text-right' : ''}"
>
{#if message.content}
<Markdown id={`${chatId}-${message.id}`} content={message.content} {topPadding} />