Cosmetics

This commit is contained in:
Eric van der Vlist 2022-12-13 16:40:16 +01:00
parent 1d648a2187
commit 4dbdcecadd
1 changed files with 30 additions and 4 deletions

View File

@ -50,7 +50,13 @@ const GpxRecord: Component<{}> = (props) => {
<div class={style.control}> <div class={style.control}>
<IconButton onClick={handleClickOpen}> <IconButton onClick={handleClickOpen}>
<FiberManualRecordIcon <FiberManualRecordIcon
color={state() === 'recording' ? 'error' : 'inherit'} color={
state() === 'recording'
? 'error'
: state() === 'paused'
? 'primary'
: 'inherit'
}
/> />
</IconButton> </IconButton>
</div> </div>
@ -58,6 +64,8 @@ const GpxRecord: Component<{}> = (props) => {
<Box <Box
sx={{ sx={{
width: '100%', width: '100%',
paddingTop: '10px',
paddingBottom: '10px',
}} }}
> >
<GpxChooser <GpxChooser
@ -68,13 +76,15 @@ const GpxRecord: Component<{}> = (props) => {
<Typography sx={{ paddingTop: '20px' }} variant='h6'> <Typography sx={{ paddingTop: '20px' }} variant='h6'>
{t(`gpx_${state()}`)} {t(`gpx_${state()}`)}
</Typography> </Typography>
</Box>
<DialogActions>
<Show when={state() === 'stopped'}> <Show when={state() === 'stopped'}>
<Button <Button
color='primary' color='primary'
variant='contained' variant='contained'
onClick={startRecordingHandler} onClick={startRecordingHandler}
sx={{
width: '100%',
margin: '10px',
}}
> >
{t('gpxStartRecording')} {t('gpxStartRecording')}
</Button> </Button>
@ -84,6 +94,10 @@ const GpxRecord: Component<{}> = (props) => {
color='primary' color='primary'
variant='contained' variant='contained'
onClick={pauseRecordingHandler} onClick={pauseRecordingHandler}
sx={{
width: '100%',
margin: '10px',
}}
> >
{t('gpxPauseRecording')} {t('gpxPauseRecording')}
</Button> </Button>
@ -91,6 +105,10 @@ const GpxRecord: Component<{}> = (props) => {
color='warning' color='warning'
variant='contained' variant='contained'
onClick={stopRecordingHandler} onClick={stopRecordingHandler}
sx={{
width: '100%',
margin: '10px',
}}
> >
{t('gpxStopRecording')} {t('gpxStopRecording')}
</Button> </Button>
@ -100,6 +118,10 @@ const GpxRecord: Component<{}> = (props) => {
color='primary' color='primary'
variant='contained' variant='contained'
onClick={resumeRecordingHandler} onClick={resumeRecordingHandler}
sx={{
width: '100%',
margin: '10px',
}}
> >
{t('gpxResumeRecording')} {t('gpxResumeRecording')}
</Button> </Button>
@ -107,11 +129,15 @@ const GpxRecord: Component<{}> = (props) => {
color='warning' color='warning'
variant='contained' variant='contained'
onClick={stopRecordingHandler} onClick={stopRecordingHandler}
sx={{
width: '100%',
margin: '10px',
}}
> >
{t('gpxStopRecording')} {t('gpxStopRecording')}
</Button> </Button>
</Show> </Show>
</DialogActions> </Box>
</Dialog> </Dialog>
</> </>
); );