Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat simplify UI #210

Merged
merged 37 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3e54cec
fix login button label placement on firefox
N7Remus Nov 25, 2024
172b114
fix fullscreen text zindex bug
N7Remus Nov 29, 2024
a773550
update imprint to impressum
N7Remus Nov 29, 2024
a9f6f25
remove empty lines
N7Remus Dec 2, 2024
e9c6571
Update translations
N7Remus Dec 2, 2024
77d563c
move blur and audio output text
N7Remus Dec 2, 2024
2801fcf
change apply label to save icon
N7Remus Dec 2, 2024
5f33088
fix-countdown timer bug on firefox (am/pm)
N7Remus Dec 2, 2024
cc33757
fix blur bug with multiple camera devices
N7Remus Dec 3, 2024
bd4e653
Change mgmt login style + add custom login image option
N7Remus Dec 3, 2024
dfffa73
create managementSlice (#209)
YotaYota Dec 4, 2024
616ad05
Tweak countdown timer on mobile view
N7Remus Dec 4, 2024
08ff5af
Hide modification menu, when creating for mgmt stuff
N7Remus Dec 4, 2024
b2c622c
add tooltip text back as a 'footer' on the dialog screen
N7Remus Dec 4, 2024
c651702
make it info text only show on join dialog and landing page
N7Remus Dec 4, 2024
89f92d8
stop listeners when leaving room
N7Remus Dec 4, 2024
4b5e8ab
remove redundant text
N7Remus Dec 6, 2024
6eee8d4
add alt to logo
N7Remus Dec 6, 2024
25e4469
Make qr code hidden by default
N7Remus Dec 15, 2024
1ee762a
move save button to startAdornment (and change to text)
N7Remus Dec 15, 2024
8adeee8
remove zindex workaround for overshowing text
N7Remus Dec 15, 2024
a13c526
remove commented code
N7Remus Dec 15, 2024
7ca1aef
make menu items collapse when size is limited
N7Remus Dec 16, 2024
0d750b2
fix apply label width
N7Remus Dec 16, 2024
3223227
Fix ui bugs with more icons on topbar
N7Remus Dec 17, 2024
5391819
fix width of tables for mgmt interface
N7Remus Dec 20, 2024
3cc418e
rename text for hidden emails in mgmt interface
N7Remus Dec 23, 2024
71ddd76
move volume indicator into the join dialog video box + remove outside…
N7Remus Jan 8, 2025
cadad60
center room timer if countdown timer is disabled
N7Remus Jan 8, 2025
7a0996d
disable countdowntimer by default (add to config file)
N7Remus Jan 10, 2025
cd1466e
add countdowntimer param to example.js
N7Remus Jan 10, 2025
7cb1beb
fix info text position on landing page
N7Remus Jan 10, 2025
27dfba4
do not show countdown timer enable disable button
N7Remus Jan 10, 2025
6a6101a
remove divider on top infotext
N7Remus Jan 13, 2025
6a6f127
update translations
N7Remus Jan 13, 2025
edd2162
remove client-sample notifications
N7Remus Jan 17, 2025
f3c09dd
hide label too if component is disabled
N7Remus Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"@feathersjs/socketio-client": "^5.0.30",
"@mui/icons-material": "^6.1.5",
"@mui/material": "^6.1.5",
"@mui/x-date-pickers": "^7.22.0",
"@mui/x-date-pickers": "^7.23.0",
"@observertc/client-monitor-js": "^3.11.0",
"@observertc/samples-encoder": "^2.2.12",
"@reduxjs/toolkit": "^1.9.7",
"awaitqueue": "^3.0.2",
"bowser": "^2.11.0",
"dayjs": "^1.11.13",
"debug": "^4.3.7",
"dompurify": "^3.1.6",
"file-saver": "^2.0.5",
Expand Down
14 changes: 13 additions & 1 deletion public/config/config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@

// eslint-disable-next-line
var config = {
// If enabled QR code will show at the join dialog
qrCodeEnabled: false,
// If enabled countdownTimer will be enabled in the room.
countdownTimerEnabled: false,
// If enabled a Tooltip will show at the landing page and join dialog bottom
infoTooltipEnabled: false,
infoTooltipText: 'Tooltip text',
infoTooltipLink: '',
infoTooltipDesc: 'Tooltip desc ... Lorem ipsum',
// Location of management service.
managementUrl: 'http://localhost:3030',
// Location of the privacy files.
impressumUrl: '/privacy/privacy.html',
imprintUrl: '',
privacyUrl: '',

loginImageURL: '',
// If ability to log in is enabled.
loginEnabled: true,

Expand Down
20 changes: 10 additions & 10 deletions src/components/audiooutputtest/AudioOutputTest.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Button } from '@mui/material';
import { Button, Tooltip } from '@mui/material';
import {
useAppDispatch,
useAppSelector,
useDeviceSelector
} from '../../store/hooks';
import { notificationsActions } from '../../store/slices/notificationsSlice';
import { ChooserDiv } from '../devicechooser/DeviceChooser';
import { testAudioOutputLabel } from '../translated/translatedComponents';
import AudiotrackIcon from '@mui/icons-material/Audiotrack';

const TestAudioOutputButton = (): JSX.Element => {
const audioDevices = useDeviceSelector('audiooutput');
Expand All @@ -20,14 +20,14 @@ const TestAudioOutputButton = (): JSX.Element => {
return (
<>
{ audioDevices.length > 1 &&
<ChooserDiv>
<Button
variant='contained'
onClick={triggerTestSound}
disabled={audioInProgress}
>
{ testAudioOutputLabel() }
</Button></ChooserDiv>
<Tooltip title={ testAudioOutputLabel() }>
<Button
onClick={triggerTestSound}
disabled={audioInProgress}
>
<AudiotrackIcon />
</Button>
</Tooltip>
}
</>
);
Expand Down
7 changes: 5 additions & 2 deletions src/components/breakoutrooms/BreakoutModerator.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { IconButton, styled } from '@mui/material';
import { memo, useState } from 'react';
import { createBreakoutRoomLabel, newBreakoutRoomNameLabel } from '../translated/translatedComponents';
import { useAppDispatch } from '../../store/hooks';
import { useAppDispatch, useAppSelector } from '../../store/hooks';
import { createBreakoutRoom } from '../../store/actions/roomActions';
import TextInputField from '../textinputfield/TextInputField';
import GroupAddIcon from '@mui/icons-material/GroupAdd';
import { fullscreenConsumerSelector } from '../../store/selectors';

const ModeratorDiv = styled('div')(({ theme }) => ({
width: '100%',
Expand All @@ -26,10 +27,12 @@ const BreakoutModerator = (): JSX.Element => {
}
};

const consumer = useAppSelector(fullscreenConsumerSelector);

return (
<ModeratorDiv>
<TextInputField
label={newBreakoutRoomNameLabel()}
label={consumer ? '' : newBreakoutRoomNameLabel()}
value={name}
margin='dense'
setValue={setName}
Expand Down
7 changes: 5 additions & 2 deletions src/components/chat/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { Send } from '@mui/icons-material';
import { IconButton, styled } from '@mui/material';
import { useState } from 'react';
import { sendChat } from '../../store/actions/chatActions';
import { useAppDispatch } from '../../store/hooks';
import { useAppDispatch, useAppSelector } from '../../store/hooks';
import TextInputField from '../textinputfield/TextInputField';
import { chatInputLabel } from '../translated/translatedComponents';
import { fullscreenConsumerSelector } from '../../store/selectors';

const ChatInputDiv = styled('div')(({ theme }) => ({
marginLeft: theme.spacing(1),
Expand All @@ -22,10 +23,12 @@ const ChatInput = (): JSX.Element => {
}
};

const consumer = useAppSelector(fullscreenConsumerSelector);

return (
<ChatInputDiv>
<TextInputField
label={chatInputLabel()}
label={ consumer ? '' : chatInputLabel()}
value={message}
margin='dense'
setValue={setMessage}
Expand Down
1 change: 0 additions & 1 deletion src/components/controlbuttons/FullscreenVideoButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ControlButton, { ControlButtonProps } from './ControlButton';
import { enterFullscreenLabel, leaveFullscreenLabel } from '../translated/translatedComponents';
import { fullscreenConsumerSelector } from '../../store/selectors';
import { roomSessionsActions } from '../../store/slices/roomSessionsSlice';

interface FullscreenVideoButtonProps extends ControlButtonProps {
consumerId: string;
}
Expand Down
26 changes: 26 additions & 0 deletions src/components/controlbuttons/LoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import ControlButton, { ControlButtonProps } from './ControlButton';
import { loginLabel } from '../translated/translatedComponents';
import { login } from '../../store/actions/permissionsActions';
import React from 'react';
import { Button } from '@mui/material';
import Grid from '@mui/material/Grid2';
import LoginIcon from '@mui/icons-material/Login';
import edumeetConfig from '../../utils/edumeetConfig';

const LoginButton = ({
...props
Expand All @@ -21,4 +25,26 @@ const LoginButton = ({
);
};

export const CustomLoginButton = (): React.JSX.Element => {
const dispatch = useAppDispatch();

const loginImageURL = edumeetConfig.loginImageURL;

return (
<Button
onClick={() => dispatch(login())}
>
<Grid container spacing={2}>
<Grid size={12}>
{ loginImageURL!='' && <img src={loginImageURL} alt='login' />}
{ loginImageURL=='' && <LoginIcon />}
</Grid>
<Grid size={12}>
Tenant {loginLabel()}
</Grid>
</Grid>
</Button>
);
};

export default LoginButton;
65 changes: 30 additions & 35 deletions src/components/countdowntimer/CountdownTimer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React, { useRef } from 'react';
import { IconButton, Grid, Switch, TextField, styled } from '@mui/material';
import { IconButton, Grid, styled } from '@mui/material';
import { HighlightOff as HighlightOffIcon, Pause as PauseIcon, PlayArrow as PlayArrowIcon } from '@mui/icons-material';
import moment from 'moment';
import { useAppDispatch, useAppSelector } from '../../store/hooks';
import { setCountdownTimerInitialTime, startCountdownTimer, stopCountdownTimer, disableCountdownTimer, enableCountdownTimer } from '../../store/actions/countdownTimerActions';
import { setCountdownTimerInitialTime, startCountdownTimer, stopCountdownTimer } from '../../store/actions/countdownTimerActions';
import {
countdownTimerStartLabel, countdownTimerStopLabel,
countdownTimerEnableLabel, countdownTimerDisableLabel, countdownTimerSetLabel }
from '../translated/translatedComponents';
countdownTimerStartLabel, countdownTimerStopLabel } from '../translated/translatedComponents';
import { isMobileSelector } from '../../store/selectors';
import { TimePicker } from '@mui/x-date-pickers/TimePicker';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
import { fullscreenConsumerSelector } from '../../store/selectors';
import 'dayjs/locale/de';

const CountdownTimerDiv = styled('div')(({ theme }) => ({
display: 'flex',
Expand Down Expand Up @@ -43,6 +46,8 @@ const CountdownTimer = () : JSX.Element => {
clearTimeout(timeout);
};
};

const consumer = useAppSelector(fullscreenConsumerSelector);

return (
<CountdownTimerDiv>
Expand All @@ -53,35 +58,25 @@ const CountdownTimer = () : JSX.Element => {

{/* set */}
<Grid item xs={8}>
<TextField fullWidth
aria-label={countdownTimerSetLabel()}
inputRef={inputRef}
autoFocus={!isMobile}
sx={{ flexGrow: '1' }}
variant='outlined'
label={(isMobile) ? 'timer (HH:mm)' : 'timer (HH:mm:ss)'}
disabled={!isEnabled || (isStarted && remainingTime !== '00:00:00')}
type='time'
value={remainingTime}
size='small'
InputLabelProps={{ shrink: true }}
inputProps={{ step: '1' }}
onChange={(e) => {
const time = (isMobile && moment(e.target.value, 'HH:mm', true).isValid())
? moment(`${e.target.value}:00`, 'HH:mm:ss').format('HH:mm:ss')
: moment(`${e.target.value}`, 'HH:mm:ss').format('HH:mm:ss');

dispatch(setCountdownTimerInitialTime(time));
}}
onKeyDown={(e) => {
if (remainingTime !== '00:00:00') {
if (e.key === 'Enter') {
dispatch(startCountdownTimer());
e.preventDefault();
}
<LocalizationProvider dateAdapter={AdapterMoment} adapterLocale="de">
<TimePicker
label={
consumer
? '' // Hide the label if consumer is empty
: (isMobile ? 'timer (HH:mm)' : 'timer (HH:mm:ss)')
}
}}
/>

ampm={false}
views={[ 'hours', 'minutes', 'seconds' ]}
defaultValue={moment('2024-12-01T00:00')}
disabled={!isEnabled || (isStarted && remainingTime !== '00:00:00')}
onChange={(newValue: moment.Moment | null) => {
if (newValue)
dispatch(setCountdownTimerInitialTime(newValue.format('HH:mm:ss')));
}}
/>
</LocalizationProvider>

</Grid>

{/* reset */}
Expand Down Expand Up @@ -125,7 +120,7 @@ const CountdownTimer = () : JSX.Element => {
</Grid>

{/* enable/disable */}
<Grid item xs={1}>
{/* <Grid item xs={1}>
<Switch
aria-label={ !isStarted ?
countdownTimerDisableLabel() :
Expand All @@ -143,7 +138,7 @@ const CountdownTimer = () : JSX.Element => {
color='error'
size='small'
/>
</Grid>
</Grid> */}
</Grid>
</CountdownTimerDiv>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/countdowntimer/CountdownTimerChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const CountdownTimerChip = (): JSX.Element => {
backgroundColor: backgroundColor,
background: `linear-gradient(to right, ${indicatorColor} ${percentage}%, ${backgroundColor} ${percentage}%)`,
animation: `${percentage}% blink-animation 1s infinite`,
width: '86px',
width: 'auto',
}}
label={remainingTime}
size="small"
Expand Down
21 changes: 12 additions & 9 deletions src/components/devicechooser/AudioInputChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@ const AudioInputChooser = ({
noDevicesLabel={noAudioInputDevicesLabel()}
disabled={audioDevices.length < 2 || audioInProgress}
devices={audioDevices}
extraButtons={<>{ withConfirm && (selectedAudioDevice !== audioDevice) && (
<Button
style={{ minWidth: 'fit-content' }}
variant='text'
onClick={handleConfirm}
disabled={audioInProgress}
>
{applyLabel()}
</Button>

)}</>}
/>
{ withConfirm && (selectedAudioDevice !== audioDevice) && (
<Button
variant='contained'
onClick={handleConfirm}
disabled={audioInProgress}
>
{ applyLabel() }
</Button>
)}

</ChooserDiv>
}
</>
Expand Down
6 changes: 6 additions & 0 deletions src/components/devicechooser/AudioOutputChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import DeviceChooser, { ChooserDiv } from './DeviceChooser';
import { settingsActions } from '../../store/slices/settingsSlice';
import { audioOutputDeviceLabel, noAudioOutputDevicesLabel, selectAudioOutputDeviceLabel } from '../translated/translatedComponents';
import TestAudioOutputButton from '../audiooutputtest/AudioOutputTest';

const AudioOutputChooser = (): JSX.Element => {
const dispatch = useAppDispatch();
Expand Down Expand Up @@ -36,9 +37,14 @@ const AudioOutputChooser = (): JSX.Element => {
noDevicesLabel={noAudioOutputDevicesLabel()}
disabled={audioDevices.length < 2 || audioInProgress}
devices={audioDevices}
extraButtons={<TestAudioOutputButton /> }
/>
</ChooserDiv>
)}
{audioDevices.length == 1 && (
<TestAudioOutputButton />
)}

</>
);
};
Expand Down
5 changes: 4 additions & 1 deletion src/components/devicechooser/DeviceChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Select,
styled
} from '@mui/material';
import { memo } from 'react';
import { memo, ReactElement } from 'react';
import { MediaDevice } from '../../services/deviceService';

interface DeviceChooserProps {
Expand All @@ -17,6 +17,7 @@ interface DeviceChooserProps {
noDevicesLabel: string;
disabled: boolean;
devices: MediaDevice[];
extraButtons?: ReactElement;
}

export const ChooserDiv = styled('div')(({ theme }) => ({
Expand All @@ -35,6 +36,7 @@ const DeviceChooser = ({
noDevicesLabel,
disabled,
devices,
extraButtons
}: DeviceChooserProps): JSX.Element => {
const label = devices.length ? devicesLabel : noDevicesLabel;
const labelId = new Date().getUTCMilliseconds();
Expand All @@ -47,6 +49,7 @@ const DeviceChooser = ({
<Select
labelId={`device-simple-select-helper-label-${labelId}`}
label={label}
startAdornment={extraButtons}
value={devices.length ? (value || '') : ''}
onChange={(event) => {
if (event.target.value)
Expand Down
Loading
Loading