Skip to content

Commit b1d5179

Browse files
committed
Fix: Change the image page layout
1 parent 18c76a8 commit b1d5179

File tree

6 files changed

+68
-8
lines changed

6 files changed

+68
-8
lines changed

src/components/chat/ChatMessageArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export const ChatMessageArea: React.FC<ChatMessageAreaProps> = ({
321321
return (
322322
<div className="flex flex-col w-full h-full max-w-full">
323323
{/* Messages area */}
324-
<div className="flex-1 p-4 space-y-4 overflow-y-auto">
324+
<div className="p-4 space-y-4 overflow-y-auto">
325325
{getMessagesList().map((message) => {
326326
if(message.role === 'system') return null;
327327

src/components/layout/MainLayout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ const MainLayout: React.FC<MainLayoutProps> = ({
5656
onOpenSettingsDialog={handleOpenSettingsDialog}
5757
/>
5858

59-
<div className="flex flex-1 w-full overflow-hidden">
59+
<div className="flex w-full h-full overflow-hidden">
6060
<Sidebar
6161
activePage={activePage}
6262
onChangePage={handlePageChange}
6363
showSettings={showSettings}
6464
setShowSettings={setShowSettings}
6565
/>
6666

67-
<div className="flex flex-col flex-1 w-[calc(100%-68px)] bg-main-background-color">
67+
<div className="flex flex-col h-full w-[calc(100%-68px)] bg-main-background-color">
6868
{/* Main content */}
6969

70-
<div className='relative flex flex-col flex-1 w-full overflow-hidden major-area-border major-area-bg-color'>
71-
<div className="flex-1 w-full overflow-auto">
70+
<div className='relative flex flex-col w-full h-full overflow-hidden major-area-border major-area-bg-color'>
71+
<div className="w-full h-full overflow-auto">
7272
{children}
7373
</div>
7474

src/components/pages/ChatPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export const ChatPage = () => {
372372
<div className="flex flex-col w-full h-full bg-white">
373373

374374
{/* Main content with chat history and messages */}
375-
<div className="flex flex-1 w-full overflow-hidden">
375+
<div className="flex w-full overflow-hidden">
376376
<ChatHistoryList
377377
conversations={conversations}
378378
folders={folders}
@@ -387,7 +387,7 @@ export const ChatPage = () => {
387387
onMoveConversation={handleMoveConversation}
388388
/>
389389

390-
<div className="flex flex-col flex-1 w-full min-w-0 overflow-hidden">
390+
<div className="flex flex-col w-full min-w-0 overflow-hidden">
391391
{isApiKeyMissing && (
392392
<div className="p-2 text-sm text-center text-yellow-800 bg-yellow-100">
393393
Please set your API key for the selected provider in the settings.

src/types/chat.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,17 @@ export interface ConversationFolder{
5151
createdAt: Date;
5252
updatedAt: Date;
5353
colorFlag: string;
54-
}
54+
}
55+
56+
export interface ImageGenerationResult {
57+
id: string;
58+
prompt: string;
59+
negativePrompt: string;
60+
seed: string;
61+
number: number;
62+
status: string;
63+
aspectRatio: string;
64+
provider: string;
65+
model: string;
66+
images: MessageContent[];
67+
}

src/types/chatTypes.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
- Message Content:
2+
3+
- Text:
4+
- cotent: string text content
5+
- dataJson: none
6+
7+
- File:
8+
- content: string file reference id
9+
- dataJson:
10+
- name: string file name
11+
- type: string file mime type
12+
- size: string file size in bytes
13+
14+
- Image:
15+
- content: string file reference id
16+
- dataJson:
17+
- name: string file name
18+
- type: string file mime type
19+
- size: string file size in bytes
20+
21+
22+
- File Data:
23+
24+
- file id: string file reference id
25+
- file type: Document/Image/Audio/Others
26+
- data: ArrayBuffer data
27+
28+
29+
- Image generation result:
30+
31+
- prompt: string prompt text
32+
- negative prompt: string negative prompt text
33+
- seed: string seed
34+
- number: numbers of generation
35+
- status: string none/success/error/running
36+
- aspect ratio: string
37+
- provider: string provider id
38+
- model: string model id
39+
- images: MessageContent[]
40+

src/types/file.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export interface File {
2+
fileId: string;
3+
name: string;
4+
type: string;
5+
size: number;
6+
data: ArrayBuffer;
7+
}

0 commit comments

Comments
 (0)