refactor: move attach button to bottom of div when no attachments present

This commit is contained in:
Dustin Healy 2025-09-06 02:39:39 -07:00
parent 094320fcd9
commit 93490764e6

View file

@ -40,16 +40,20 @@ const PromptFiles = ({
{localize('com_ui_files')}
</h3>
<div className="flex flex-1 flex-col space-y-4">
<div className="flex-1">
{!files.length && (
<>
<div className="text-sm text-text-secondary">
<ReactMarkdown className="markdown prose dark:prose-invert">
{localize('com_ui_files_info')}
</ReactMarkdown>
</div>
<Separator className="my-3 text-text-primary" />
</>
)}
{files.length > 0 && (
<div className="mb-3 flex-1">
<div className="mb-3">
<PromptFile
files={filesMap}
setFiles={(newMapOrUpdater) => {
@ -66,12 +70,10 @@ const PromptFiles = ({
/>
</div>
)}
<Separator className="my-3 text-text-primary" />
<div className="flex flex-col justify-end text-text-secondary">
<div className="flex justify-start">
<AttachFileButton handleFileChange={handleFileChange} disabled={disabled} />
</div>
<div className="flex justify-start text-text-secondary">
<AttachFileButton handleFileChange={handleFileChange} disabled={disabled} />
</div>
</div>
</div>