fix: UI issues

This commit is contained in:
Aleksander Grygier 2025-12-12 17:21:40 +01:00
parent cab1d426fc
commit 0bdb3a8d34
2 changed files with 4 additions and 3 deletions

View File

@ -241,7 +241,7 @@
</div> </div>
{/if} {/if}
{:else if (isText || (isPdf && pdfViewMode === 'text')) && displayTextContent} {:else if (isText || (isPdf && pdfViewMode === 'text')) && displayTextContent}
<SyntaxHighlightedCode code={displayTextContent} {language} maxWidth="69rem" /> <SyntaxHighlightedCode code={displayTextContent} {language} maxWidth="calc(69rem - 2rem)" />
{:else if isAudio} {:else if isAudio}
<div class="flex items-center justify-center p-8"> <div class="flex items-center justify-center p-8">
<div class="w-full max-w-md text-center"> <div class="w-full max-w-md text-center">

View File

@ -72,9 +72,10 @@
<div <div
class="code-preview-wrapper overflow-auto rounded-lg border border-border bg-muted {className}" class="code-preview-wrapper overflow-auto rounded-lg border border-border bg-muted {className}"
style="max-height: {maxHeight};" style="max-height: {maxHeight}; max-width: {maxWidth};"
> >
<pre class="m-0 overflow-x-auto p-4 max-w-[{maxWidth}]"><code class="hljs text-sm leading-relaxed" <!-- Needs to be formatted as single line for proper rendering -->
<pre class="m-0 overflow-x-auto p-4"><code class="hljs text-sm leading-relaxed"
>{@html highlightedHtml}</code >{@html highlightedHtml}</code
></pre> ></pre>
</div> </div>