1- import { Button } from '@mui/material' ;
1+ import { Button , Box , Link , Typography } from '@mui/material' ;
22import { Close } from '@mui/icons-material' ;
33import { useAppDispatch , useAppSelector } from '../../store/hooks' ;
44import { uiActions } from '../../store/slices/uiSlice' ;
5- import { closeLabel } from '../translated/translatedComponents' ;
5+ import { closeLabel , imprintLabel , privacyLabel } from '../translated/translatedComponents' ;
66import ShortcutKeys from './ShortcutKeys' ;
77import GenericDialog from '../genericdialog/GenericDialog' ;
8- import ImpressumButton from '../controlbuttons/ImpressumButton ' ;
8+ import edumeetConfig from '../../utils/edumeetConfig ' ;
99
1010const HelpDialog = ( ) : JSX . Element => {
1111 const dispatch = useAppDispatch ( ) ;
@@ -17,24 +17,41 @@ const HelpDialog = (): JSX.Element => {
1717 } ) ) ;
1818 } ;
1919
20+ const privacyUrl = edumeetConfig . privacyUrl ?? '' ;
21+ const imprintUrl = edumeetConfig . imprintUrl ?? '' ;
22+
2023 return (
2124 < GenericDialog
2225 open = { helpOpen }
2326 onClose = { handleCloseHelp }
2427 maxWidth = 'xs'
25- content = { < > < ShortcutKeys /> < ImpressumButton /> < /> }
28+ content = { < > < ShortcutKeys /> </ > }
2629 actions = {
27- < Button
28- onClick = { handleCloseHelp }
29- startIcon = { < Close /> }
30- variant = 'contained'
31- size = 'small'
32- >
33- { closeLabel ( ) }
34- </ Button >
30+ < Box display = "flex" alignItems = "center" justifyContent = "space-between" width = "100%" >
31+ < Box display = "flex" alignItems = "left" >
32+ { imprintUrl . trim ( ) !== '' && (
33+ < Link href = { imprintUrl } target = "_blank" color = "inherit" underline = "none" >
34+ < Typography variant = "body2" > { imprintLabel ( ) } </ Typography >
35+ </ Link >
36+ ) }
37+ { privacyUrl . trim ( ) !== '' && (
38+ < Link href = { privacyUrl } target = "_blank" color = "inherit" underline = "none" style = { { marginLeft : '16px' } } >
39+ < Typography variant = "body2" > { privacyLabel ( ) } </ Typography >
40+ </ Link >
41+ ) }
42+ </ Box >
43+ < Button
44+ onClick = { handleCloseHelp }
45+ startIcon = { < Close /> }
46+ variant = 'contained'
47+ size = 'small'
48+ >
49+ { closeLabel ( ) }
50+ </ Button >
51+ </ Box >
3552 }
3653 />
3754 ) ;
3855} ;
3956
40- export default HelpDialog ;
57+ export default HelpDialog ;
0 commit comments