Skip to content

Commit

Permalink
💄 style: fix file upload height (lobehub#3319)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Jul 26, 2024
1 parent 0997685 commit 8343f35
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CHAT_TEXTAREA_MAX_HEIGHT,
HEADER_HEIGHT,
} from '@/const/layoutTokens';
import { useFileStore } from '@/store/file';
import { useGlobalStore } from '@/store/global';
import { systemStatusSelectors } from '@/store/global/selectors';

Expand All @@ -24,10 +25,11 @@ const DesktopChatInput = memo(() => {
systemStatusSelectors.inputHeight(s),
s.updateSystemStatus,
]);
const showFileList = useFileStore((s) => s.inputFilesList.length > 0);

return (
<>
{!expand && <LocalFiles padding={'8px 16px'} />}
{!expand && <LocalFiles padding={showFileList ? '8px 16px' : 0} />}
<DraggablePanel
fullscreen={expand}
headerHeight={HEADER_HEIGHT}
Expand Down

0 comments on commit 8343f35

Please sign in to comment.