Skip to content

Commit aaf04de

Browse files
committed
update settings buttons
1 parent 5057cc3 commit aaf04de

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ export const ChatV2 = () => {
234234
height: '100%',
235235
}}
236236
>
237-
238237
<Box
239238
sx={{
240239
position: 'sticky',
@@ -253,11 +252,16 @@ export const ChatV2 = () => {
253252
<IconButton onClick={() => setSettingsModalOpen(true)} title="Settings">
254253
<Settings></Settings>
255254
</IconButton> */}
256-
<SettingsButton startIcon={<SettingsIcon />}>Keskustelun asetukset</SettingsButton>
257255
{/* <SettingsButton startIcon={<AddCommentIcon />}>Alustus</SettingsButton> */}
258-
<SettingsButton startIcon={<EmailIcon />}>Tallenna sähköpostina</SettingsButton>
259-
<SettingsButton startIcon={<DeleteIcon />}>Tyhjennä</SettingsButton>
260-
{/* {courseId ? <Link to={'/v2'}>CurreChat</Link> : <Link to={'/v2/sandbox'}>Ohtu Sandbox</Link>} */}
256+
<SettingsButton startIcon={<SettingsIcon />} onClick={() => console.log('clicked')}>
257+
Keskustelun asetukset
258+
</SettingsButton>
259+
<SettingsButton startIcon={<EmailIcon />} onClick={() => console.log('clicked')}>
260+
Tallenna sähköpostina
261+
</SettingsButton>
262+
<SettingsButton startIcon={<DeleteIcon />} onClick={handleReset}>
263+
Tyhjennä
264+
</SettingsButton>
261265
</Box>
262266

263267
<Conversation messages={messages} completion={completion} fileSearchResult={fileSearchResult} />

src/client/components/ChatV2/Conversation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Message } from '../../types'
33
import ReactMarkdown from 'react-markdown'
44
import remarkGfm from 'remark-gfm'
55
import { FileSearchResult } from '../../../shared/types'
6-
import { PöhinäLogo } from './generics/PohinaLogo'
6+
import { ConversationSplash } from './generics/ConversationSplash'
77

88
const MessageItem = ({ message }: { message: Message }) => (
99
<Box
@@ -22,7 +22,7 @@ const MessageItem = ({ message }: { message: Message }) => (
2222

2323
export const Conversation = ({ messages, completion, fileSearchResult }: { messages: Message[]; completion: string; fileSearchResult: FileSearchResult }) => (
2424
<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 3, width: '70%', minWidth: 600, margin: 'auto', paddingBottom: '5rem' }}>
25-
{messages.length === 0 && <PöhinäLogo />}
25+
{messages.length === 0 && <ConversationSplash />}
2626
{messages.map((message, idx) => (
2727
<MessageItem key={idx} message={message} />
2828
))}

src/client/components/ChatV2/generics/PohinaLogo.tsx renamed to src/client/components/ChatV2/generics/ConversationSplash.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { Box, Typography } from '@mui/material'
2-
import { Assistant } from '@mui/icons-material'
2+
import hyLogo from '../../../assets/hy_logo.svg'
33

4-
export const PöhinäLogo = () => (
4+
5+
export const ConversationSplash = () => (
56
<Box
67
sx={{
78
display: 'flex',
9+
flexDirection: 'column',
810
justifyContent: 'center',
911
alignItems: 'center',
1012
height: '40rem',
@@ -18,7 +20,9 @@ export const PöhinäLogo = () => (
1820
},
1921
}}
2022
>
21-
<Assistant sx={{ fontSize: 160, color: '#efefef', marginBottom: '2rem' }} />
22-
<Typography>Aloite keskustelu läettämällä viesti...</Typography>
23+
<img src={hyLogo} alt="University of Helsinki" width="240" style={{ opacity: 0.1, marginBottom: '2rem' }} />
24+
<Typography fontStyle="italic" color="rgba(0,0,0,0.5)">
25+
Aloita keskustelu läettämällä viesti...
26+
</Typography>
2327
</Box>
2428
)

src/client/components/ChatV2/generics/SettingsButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { ReactNode } from 'react'
22
import { Button } from '@mui/material'
33

4-
export default function SettingsButton({ children, startIcon }: { children: ReactNode; startIcon?: ReactNode }) {
4+
export default function SettingsButton({ children, startIcon, onClick }: { children: ReactNode; startIcon?: ReactNode; onClick: () => any }) {
55
return (
66
<Button
7+
onClick={onClick}
78
startIcon={startIcon}
89
sx={{
910
textTransform: 'none',

0 commit comments

Comments
 (0)