Minor modifications
This commit is contained in:
parent
daed8e5dc1
commit
56c9eb37bb
|
@ -11,7 +11,7 @@ import CloseIcon from '@suid/icons-material/Close';
|
||||||
const Dialog: Component<{
|
const Dialog: Component<{
|
||||||
open: boolean;
|
open: boolean;
|
||||||
title: JSXElement;
|
title: JSXElement;
|
||||||
closeHandler: () => void;
|
closeHandler: (event: any, reason?: string) => void;
|
||||||
children: JSXElement;
|
children: JSXElement;
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -53,8 +53,15 @@ const GpxDialog: Component<{}> = (props) => {
|
||||||
gpx: gpx(),
|
gpx: gpx(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleClose = () => {
|
const handleClose = (event: any, reason?: string) => {
|
||||||
setOpen(false);
|
console.log({
|
||||||
|
caller: 'GpxDialog / handleClose',
|
||||||
|
event,
|
||||||
|
reason,
|
||||||
|
});
|
||||||
|
if (reason === undefined) {
|
||||||
|
setOpen(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const gpxChangeHandler = async (event: any) => {
|
const gpxChangeHandler = async (event: any) => {
|
||||||
setSelectedGpxId(event.target.value);
|
setSelectedGpxId(event.target.value);
|
||||||
|
@ -178,10 +185,9 @@ const GpxDialog: Component<{}> = (props) => {
|
||||||
>
|
>
|
||||||
<For each={allGpxes()}>
|
<For each={allGpxes()}>
|
||||||
{(gpx) => (
|
{(gpx) => (
|
||||||
<option
|
<option value={gpx.id} selected={gpx.id === selectedGpxId()}>
|
||||||
value={gpx.id}
|
{gpx.name || `${t('gpxNoName')} (${gpx.creator})`}
|
||||||
selected={gpx.id === selectedGpxId()}
|
</option>
|
||||||
>{`${gpx.name || gpx.id} (${gpx.creator})`}</option>
|
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
</NativeSelect>
|
</NativeSelect>
|
||||||
|
|
|
@ -71,8 +71,15 @@ const GpxImport: Component = () => {
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = (event: any, reason?: string) => {
|
||||||
setFilesToImport(undefined);
|
console.log({
|
||||||
|
caller: 'GpxImport / handleClose',
|
||||||
|
event,
|
||||||
|
reason,
|
||||||
|
});
|
||||||
|
if (reason === undefined) {
|
||||||
|
setFilesToImport(undefined);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -37,6 +37,7 @@ const dict = {
|
||||||
gpxDialog: 'Current journey',
|
gpxDialog: 'Current journey',
|
||||||
gpxChooser: 'Journey',
|
gpxChooser: 'Journey',
|
||||||
gpxName: 'Name',
|
gpxName: 'Name',
|
||||||
|
gpxNoName:'No name',
|
||||||
gpxDesc: 'Description',
|
gpxDesc: 'Description',
|
||||||
gpxTime: 'Start date',
|
gpxTime: 'Start date',
|
||||||
gpxSave: 'Save',
|
gpxSave: 'Save',
|
||||||
|
|
|
@ -41,6 +41,7 @@ const dict = {
|
||||||
gpxDialog: 'Voyage en cours',
|
gpxDialog: 'Voyage en cours',
|
||||||
gpxChooser: 'Voyage',
|
gpxChooser: 'Voyage',
|
||||||
gpxName: 'Nom',
|
gpxName: 'Nom',
|
||||||
|
gpxNoName:'Pas de nom',
|
||||||
gpxDesc: 'Description',
|
gpxDesc: 'Description',
|
||||||
gpxTime: 'Date de début',
|
gpxTime: 'Date de début',
|
||||||
gpxSave: 'Sauvegarder',
|
gpxSave: 'Sauvegarder',
|
||||||
|
|
Loading…
Reference in New Issue