1
- import { Box , Center , Container , Flex , Grid , GridItem , HStack , Spinner , Stack } from '@chakra-ui/react' ;
2
- import { LuMailQuestion } from 'react-icons/lu' ;
1
+ import { Box , Card , Center , Container , Flex , Grid , GridItem , HStack , IconButton , Skeleton , Spinner , Stack , Text } from '@chakra-ui/react' ;
2
+ import { LuEllipsisVertical , LuMailQuestion } from 'react-icons/lu' ;
3
3
import { useAppDispatch , useAppSelector } from '~/store' ;
4
4
import { useParams } from 'react-router' ;
5
5
import { NotFound } from '~/pages/NotFound' ;
@@ -14,8 +14,8 @@ import { ConversationInteraction } from './components/organisms/ConversationInte
14
14
import { useIdempotencyKey } from '~/hooks/useIdempotencyKey' ;
15
15
import { Panel } from '~/components/atoms/Panel' ;
16
16
import React from 'react' ;
17
- import { HeaderCard } from '~/components/atoms/HeaderCard' ;
18
17
import { initializeChatInput } from '../chat-input/store' ;
18
+ import { MenuContent , MenuItem , MenuRoot , MenuTrigger } from '~/components/ui/menu' ;
19
19
20
20
export const Conversation : React . FC = ( ) => {
21
21
const { conversationId } = useParams ( ) ;
@@ -98,13 +98,64 @@ export const Conversation: React.FC = () => {
98
98
minHeight = { 0 }
99
99
boxShadow = { 'md' }
100
100
>
101
- < Container maxW = { '6xl' } minW = { 'sm' } py = { 10 } pb = { 40 } w = { 'full' } >
102
- < Stack gap = { 6 } mx = { 10 } >
103
- < HeaderCard
104
- title = { conversation . title || 'New conversation' }
105
- description = { '' }
106
- />
101
+ < Box
102
+ position = { 'sticky' }
103
+ zIndex = { 10 }
104
+ pb = { 4 }
105
+ top = { 0 }
106
+ >
107
+ < Box
108
+ zIndex = { 10 }
109
+ h = { 10 }
110
+ top = { - 10 }
111
+ left = { 0 }
112
+ right = { 0 }
113
+ background = { 'bg.panel' }
114
+ />
107
115
116
+ < Container maxW = { '6xl' } minW = { 'sm' } w = { 'full' } >
117
+ < Card . Root
118
+ variant = { 'elevated' }
119
+ overflow = { 'hidden' }
120
+ background = { 'bg.muted/30' }
121
+ backdropFilter = { 'blur(20px)' }
122
+ backgroundSize = { '100vw 500px' }
123
+ >
124
+ < Card . Body p = { 6 } >
125
+ < Flex justify = { 'space-between' } >
126
+ < Text textStyle = { 'xl' } fontWeight = { 'semibold' } textShadow = { '2xl' } >
127
+ { conversation . title ? conversation . title : (
128
+ < Skeleton width = { '50%' } />
129
+ ) }
130
+ </ Text >
131
+ < MenuRoot >
132
+ < MenuTrigger asChild >
133
+ < IconButton size = { 'xs' } variant = { 'outline' } >
134
+ < LuEllipsisVertical />
135
+ </ IconButton >
136
+ </ MenuTrigger >
137
+ < MenuContent >
138
+ < MenuItem disabled value = { 'export' } >
139
+ { 'Export' }
140
+ </ MenuItem >
141
+ < MenuItem
142
+ disabled
143
+ value = { 'delete' }
144
+ color = { 'fg.error' }
145
+ _hover = { { bg : 'bg.error' , color : 'fg.error' } }
146
+ >
147
+ { 'Delete...' }
148
+ </ MenuItem >
149
+ </ MenuContent >
150
+ </ MenuRoot >
151
+ </ Flex >
152
+ </ Card . Body >
153
+ </ Card . Root >
154
+ </ Container >
155
+ </ Box >
156
+
157
+ < Container maxW = { '6xl' } minW = { 'sm' } w = { 'full' } py = { 4 } pt = { 10 } pb = { 40 } >
158
+ < Stack gap = { 6 } mx = { 10 } >
108
159
{ sortedInteractions . map ( i => < ConversationInteraction key = { i . id } interaction = { i } /> ) }
109
160
</ Stack >
110
161
</ Container >
0 commit comments