Skip to content

Commit

Permalink
add basic impressum
Browse files Browse the repository at this point in the history
  • Loading branch information
N7Remus committed Sep 27, 2024
1 parent 44bd383 commit c63a6c8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
2 changes: 2 additions & 0 deletions public/config/config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
var config = {
// Location of management service.
managementUrl: 'http://localhost:3030',
// Location of the privacy files.
impressumUrl: '/privacy/privacy.html',
// If ability to log in is enabled.
loginEnabled: true,

Expand Down
29 changes: 29 additions & 0 deletions src/components/controlbuttons/ImpressumButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import InfoIcon from '@mui/icons-material/Info';
import React from 'react';
import { Box, Button } from '@mui/material';
import { styled } from '@mui/material/styles';
import edumeetConfig from '../../utils/edumeetConfig';

const ImpressumContainer = styled(Box)(({ theme }) => ({
position: 'absolute',
bottom: theme.spacing(1.5),
left: theme.spacing(1.5),
color: 'white',
}));

const impressumUrl = edumeetConfig.impressumUrl;

const ImpressumButton: React.FC = () => {
return (
<div>
<ImpressumContainer>
<Button href={impressumUrl} variant="text" color="primary" title='Privacy info' >
<InfoIcon />

</Button>
</ImpressumContainer>
</div>
);
};

export default ImpressumButton;
2 changes: 2 additions & 0 deletions src/utils/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { TFLite } from '../services/effectsService';

export const defaultEdumeetConfig: EdumeetConfig = {
managementUrl: undefined,
impressumUrl: '/privacy/privacy.html',
loginEnabled: false,
developmentPort: 8443,
productionPort: 443,
Expand Down Expand Up @@ -93,6 +94,7 @@ export const defaultEdumeetConfig: EdumeetConfig = {

export interface EdumeetConfig {
managementUrl?: string;
impressumUrl: string;
loginEnabled: boolean;
developmentPort: number;
productionPort: number;
Expand Down
8 changes: 5 additions & 3 deletions src/views/join/Join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { meActions } from '../../store/slices/meSlice';
import AudioOutputChooser from '../../components/devicechooser/AudioOutputChooser';
import { canSelectAudioOutput } from '../../store/selectors';
import TestAudioOutputButton from '../../components/audiooutputtest/AudioOutputTest';
import ImpressumButton from '../../components/controlbuttons/ImpressumButton';

interface JoinProps {
roomId: string;
Expand Down Expand Up @@ -84,14 +85,15 @@ const Join = ({ roomId }: JoinProps): React.JSX.Element => {
</>
}
actions={
<Button
<><ImpressumButton /><Button
onClick={handleJoin}
variant='contained'
disabled={!displayName || joinInProgress || mediaLoading}
size='small'
>
{ joinLabel() }
</Button>
{joinLabel()}
</Button></>

}
/>
);
Expand Down

0 comments on commit c63a6c8

Please sign in to comment.