Skip to content

Commit 047d6f5

Browse files
committed
move footer content to left sidebar
1 parent ce2ea98 commit 047d6f5

File tree

3 files changed

+36
-38
lines changed

3 files changed

+36
-38
lines changed

src/client/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ const Layout = () => {
129129
<Box sx={{ flex: 1 }}>
130130
<Outlet />
131131
</Box>
132-
{!isEmbedded && <Footer />}
133132
<Feedback />
134133
</Box>
135134
<AdminLoggedInAsBanner />

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import EmailButton from './EmailButton'
3434
import { MenuBookTwoTone, Tune } from '@mui/icons-material'
3535
import { useChatScroll } from '../../hooks/useChatScroll'
3636
import { TestUseInfoV2 } from './TestUseInfo'
37+
import Footer from '../Footer'
3738

3839
function useLocalStorageStateWithURLDefault(key: string, defaultValue: string, urlKey: string) {
3940
const [value, setValue] = useLocalStorageState(key, defaultValue)
@@ -366,7 +367,6 @@ export const ChatV2 = () => {
366367
sx={{}}
367368
course={course}
368369
handleReset={handleReset}
369-
user={user}
370370
t={t}
371371
setSettingsModalOpen={setSettingsModalOpen}
372372
setDisclaimerStatus={setDisclaimerStatus}
@@ -381,7 +381,6 @@ export const ChatV2 = () => {
381381
sx={{ display: { xs: 'none', lg: 'block' }, position: 'sticky', bottom: '0px' }}
382382
course={course}
383383
handleReset={handleReset}
384-
user={user}
385384
t={t}
386385
setSettingsModalOpen={setSettingsModalOpen}
387386
setDisclaimerStatus={setDisclaimerStatus}
@@ -596,7 +595,6 @@ const LeftMenu = ({
596595
sx,
597596
course,
598597
handleReset,
599-
user,
600598
t,
601599
setSettingsModalOpen,
602600
setDisclaimerStatus,
@@ -607,32 +605,34 @@ const LeftMenu = ({
607605
messages,
608606
}) => {
609607
return (
610-
<Box sx={sx}>
611-
<Box
612-
sx={{
613-
flex: 1,
614-
minWidth: 300,
615-
maxWidth: { xs: 300, md: 400 },
616-
position: 'relative',
617-
height: '100%',
618-
borderRight: '1px solid rgba(0, 0, 0, 0.12)',
619-
}}
620-
>
621-
<Box sx={{ position: 'sticky', top: 70, padding: '2rem 1.5rem' }}>
622-
{course && <ChatInfo course={course} />}
623-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '0.6rem', mb: '2rem' }}>
624-
<OutlineButtonBlack startIcon={<RestartAltIcon />} onClick={handleReset} id="empty-conversation-button">
625-
{t('chat:emptyConversation')}
626-
</OutlineButtonBlack>
627-
628-
<EmailButton messages={messages} disabled={!messages?.length} />
629-
<OutlineButtonBlack startIcon={<Tune />} onClick={() => setSettingsModalOpen(true)} id="settings-button">
630-
{t('chat:settings')}
631-
</OutlineButtonBlack>
632-
<OutlineButtonBlack startIcon={<HelpIcon />} onClick={() => setDisclaimerStatus(true)} id="help-button">
633-
{t('info:title')}
634-
</OutlineButtonBlack>
635-
</Box>
608+
<Box
609+
sx={{
610+
flex: 1,
611+
minWidth: 300,
612+
maxWidth: { xs: 300, md: 400 },
613+
position: 'relative',
614+
height: '100vh',
615+
borderRight: '1px solid rgba(0, 0, 0, 0.12)',
616+
paddingTop: '4rem',
617+
618+
display: 'flex',
619+
flexDirection: 'column',
620+
}}
621+
>
622+
<Box px="1rem">
623+
{course && <ChatInfo course={course} />}
624+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '0.6rem', mb: '2rem' }}>
625+
<OutlineButtonBlack startIcon={<RestartAltIcon />} onClick={handleReset} id="empty-conversation-button">
626+
{t('chat:emptyConversation')}
627+
</OutlineButtonBlack>
628+
629+
<EmailButton messages={messages} disabled={!messages?.length} />
630+
<OutlineButtonBlack startIcon={<Tune />} onClick={() => setSettingsModalOpen(true)} id="settings-button">
631+
{t('chat:settings')}
632+
</OutlineButtonBlack>
633+
<OutlineButtonBlack startIcon={<HelpIcon />} onClick={() => setDisclaimerStatus(true)} id="help-button">
634+
{t('info:title')}
635+
</OutlineButtonBlack>
636636
{course && showRagSelector && (
637637
<>
638638
<Typography variant="h6" sx={{ mb: 1, display: 'flex', gap: 1, alignItems: 'center' }} fontWeight="bold">
@@ -646,7 +646,8 @@ const LeftMenu = ({
646646
</>
647647
)}
648648
</Box>
649-
</Box>{' '}
649+
</Box>
650+
<Footer />
650651
</Box>
651652
)
652653
}

src/client/components/Footer/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next'
44
import toskaColor from '../../assets/toscalogo_color.svg'
55
import { useQuery } from '@tanstack/react-query'
66
import { maxBy } from 'lodash'
7-
import { Release } from '../../../shared/types'
7+
import type { Release } from '../../../shared/types'
88
import { formatDistanceToNow } from 'date-fns'
99
import { locales } from '../../locales/locales'
1010

@@ -13,7 +13,7 @@ const supportEmail = '[email protected]'
1313
const styles = {
1414
supportBox: {
1515
py: '1rem',
16-
px: '3rem',
16+
px: '1rem',
1717
display: 'flex',
1818
justifyContent: 'space-between',
1919
alignItems: 'center',
@@ -42,12 +42,10 @@ const Footer = () => {
4242
return (
4343
<Box
4444
component="footer"
45-
sx={(theme) => ({
46-
backgroundColor: theme.palette.toskaDark.main,
47-
color: theme.palette.toskaDark.contrastText,
45+
sx={{
4846
mt: 'auto',
4947
width: '100%',
50-
})}
48+
}}
5149
>
5250
<Box sx={styles.supportBox}>
5351
<Box>
@@ -65,7 +63,7 @@ const Footer = () => {
6563

6664
<Box sx={styles.imageBox}>
6765
<Link href="https://toska.dev" target="_blank" rel="noopener" underline="hover">
68-
<img src={toskaColor} alt="Toska" width="70" />
66+
<img src={toskaColor} alt="Toska" width="40" />
6967
</Link>
7068
</Box>
7169
</Box>

0 commit comments

Comments
 (0)