Skip to content

Commit

Permalink
adjust ui
Browse files Browse the repository at this point in the history
  • Loading branch information
greywen committed Dec 25, 2024
1 parent 9969cd2 commit f1cc34d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/FE/pages/home/_components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ const Chat = memo(() => {
className={cn(
messages.find((x) => x.role === ChatRole.User)
? 'flex w-full justify-end'
: `grid grid-cols-1 lg:grid-cols-${messages.length} md:grid-cols-${messages.length} gap-4`,
: 'grid grid-cols-[repeat(auto-fit,minmax(375px,1fr))] gap-4',
)}
>
{messages.map((message) => {
Expand Down
7 changes: 2 additions & 5 deletions src/FE/pages/home/_components/Chat/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ import { cn } from '@/lib/utils';

const ChatHeader = () => {
const { t } = useTranslation();
const MAX_SELECT_MODEL_COUNT = 4;
const MAX_SELECT_MODEL_COUNT = 10;
const {
state: {
selectedChat,

messages,

models,

defaultPrompt,
Expand Down Expand Up @@ -97,7 +94,7 @@ const ChatHeader = () => {
}}
/>

<div hidden={messages.length > 0}>
<div hidden={selectedChat.spans.length === 1}>
<Tips
trigger={
<Button
Expand Down
4 changes: 2 additions & 2 deletions src/FE/pages/home/_components/Chat/ChatModelSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ const ChatModelSetting = () => {
};

return (
<div className="mx-auto flex flex-col items-center space-y-5 md:space-y-10 px-3 md:pb-0">
<div className="mx-auto px-12">
{hasModel() && (
<div className="grid grid-flow-row md:grid-flow-col gap-6">
<div className="grid grid-cols-[repeat(auto-fit,minmax(375px,1fr))] gap-4">
{selectedChat.spans.map((span) => {
return (
<div
Expand Down

0 comments on commit f1cc34d

Please sign in to comment.