Skip to content

Commit 236e446

Browse files
committed
More mobile UI tweaks (chatbox, logo, model selector)
1 parent 6bb41b0 commit 236e446

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

src/client/components/ChatV2/ChatBox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const ChatBox = ({
237237
</Box>
238238
</Box>
239239

240-
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0.5rem 0rem' }}>
240+
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0.4rem 0' }}>
241241
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
242242
<Typography
243243
variant="body1"
@@ -247,14 +247,14 @@ export const ChatBox = ({
247247
</Typography>
248248
<Tooltip
249249
arrow
250-
placement="right"
250+
placement="top"
251251
title={
252252
<Typography variant="body2" sx={{ p: 1 }}>
253253
{t('info:usage')}
254254
</Typography>
255255
}
256256
>
257-
<HelpOutline fontSize="small" sx={{ color: 'inherit', opacity: 0.7, mt: 0.5 }} />
257+
<HelpOutline fontSize="small" sx={{ color: 'inherit', opacity: 0.7, mt: 0.5, flex: 2, display: { xs: 'none', sm: 'block' } }} />
258258
</Tooltip>
259259
</Box>
260260

src/client/components/ChatV2/EmailButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const formatEmail = (messages: Message[], t: any): string => {
143143
return `
144144
<div style="padding: 2rem; ${
145145
role === 'user'
146-
? 'background: #efefef; margin-left: 20px; border-radius: 0.6rem; box-shadow: 0px 2px 2px rgba(0,0,0,0.2); white-space: pre-wrap; word-break: break-word; '
146+
? 'background: #efefef; margin-left: 100px; border-radius: 0.6rem; box-shadow: 0px 2px 2px rgba(0,0,0,0.2); white-space: pre-wrap; word-break: break-word; '
147147
: 'margin-right: 2rem;'
148148
}">
149149
<h3 style="font-style: italic; margin: 0; ${role === 'user' ? 'color: rgba(0, 0, 0, 0.8)' : 'color: #107eab'}">${t(`email:${role}`)}:</h3>

src/client/components/ChatV2/ModelSelector.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,26 @@ const ModelSelector = ({
1818
const validModel = availableModels.includes(currentModel) ? currentModel : ''
1919

2020
return (
21-
<FormControl sx={{ minWidth: 100, opacity: 0.7 }} size="small">
21+
<FormControl
22+
sx={{
23+
minWidth: 100,
24+
maxWidth: { xs: 60, md: 250 },
25+
opacity: 0.7,
26+
}}
27+
size="small"
28+
>
2229
<Select
2330
sx={{
2431
'& .MuiOutlinedInput-notchedOutline': {
2532
border: 'none',
2633
},
34+
'& .MuiSelect-select': {
35+
overflow: 'hidden',
36+
whiteSpace: 'nowrap',
37+
paddingLeft: { xs: '4px !important', md: '10px !important' },
38+
paddingRight: { xs: '20px !important', md: '30px !important' },
39+
maxWidth: { xs: '50px', md: '240px' },
40+
},
2741
}}
2842
id="model-selector"
2943
value={validModel}

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ export const ConversationSplash = ({ courseName, courseDate }: { courseName?: st
2525
},
2626
}}
2727
>
28-
<img src={hyLogo} alt="University of Helsinki" width="240" style={{ opacity: 0.2, marginBottom: '2rem' }} />
28+
<Box
29+
component="img"
30+
src={hyLogo}
31+
alt="University of Helsinki"
32+
sx={{
33+
width: { xs: '140px', sm: '240px', md: '300px' },
34+
opacity: 0.2,
35+
m: '2.5rem 0',
36+
}}
37+
/>
2938
{courseName ? (
3039
<>
3140
<Typography variant="h4" fontWeight="bold" sx={{ mb: 1, opacity: 0.5 }}>

0 commit comments

Comments
 (0)