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