Replacing Shared by To...
This commit is contained in:
parent
2358c7d8fb
commit
acb6156ed2
|
@ -98,15 +98,15 @@ const GpxDialog: Component<{}> = (props) => {
|
||||||
gpx: gpx(),
|
gpx: gpx(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const gpxSharedChangeHandler = (event: any) => {
|
const gpxToChangeHandler = (event: any) => {
|
||||||
const newGpx: Gpx = cloneDeep(gpx()) as Gpx;
|
const newGpx: Gpx = cloneDeep(gpx()) as Gpx;
|
||||||
if (!isPlainObject(newGpx.extensions)) {
|
if (!isPlainObject(newGpx.extensions)) {
|
||||||
newGpx.extensions = {};
|
newGpx.extensions = {};
|
||||||
}
|
}
|
||||||
newGpx.extensions.shared = event.target.value;
|
newGpx.extensions.to = event.target.value;
|
||||||
setGpx(newGpx);
|
setGpx(newGpx);
|
||||||
console.log({
|
console.log({
|
||||||
caller: 'GpxDialog / gpxSharedChangeHandler',
|
caller: 'GpxDialog / gpxToChangeHandler',
|
||||||
value: event.target.value,
|
value: event.target.value,
|
||||||
gpx: gpx(),
|
gpx: gpx(),
|
||||||
newGpx,
|
newGpx,
|
||||||
|
@ -190,11 +190,11 @@ const GpxDialog: Component<{}> = (props) => {
|
||||||
InputProps={{ inputComponent: 'textarea' }}
|
InputProps={{ inputComponent: 'textarea' }}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label={t('gpxShared')}
|
label={t('gpxTo')}
|
||||||
multiline={true}
|
multiline={true}
|
||||||
rows={5}
|
rows={5}
|
||||||
value={gpx()?.extensions?.shared || ''}
|
value={gpx()?.extensions?.to || ''}
|
||||||
onChange={gpxSharedChangeHandler}
|
onChange={gpxToChangeHandler}
|
||||||
InputProps={{ inputComponent: 'textarea' }}
|
InputProps={{ inputComponent: 'textarea' }}
|
||||||
/>
|
/>
|
||||||
<Button variant='contained' onClick={saveHandler}>
|
<Button variant='contained' onClick={saveHandler}>
|
||||||
|
|
|
@ -44,7 +44,7 @@ const dict = {
|
||||||
gpxNoName: 'No name',
|
gpxNoName: 'No name',
|
||||||
gpxDesc: 'Description',
|
gpxDesc: 'Description',
|
||||||
gpxTime: 'Start date',
|
gpxTime: 'Start date',
|
||||||
gpxShared: 'Shared with',
|
gpxTo: 'To',
|
||||||
gpxSave: 'Save',
|
gpxSave: 'Save',
|
||||||
newGpx: '-- new journey --',
|
newGpx: '-- new journey --',
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ const dict = {
|
||||||
gpxNoName: 'Pas de nom',
|
gpxNoName: 'Pas de nom',
|
||||||
gpxDesc: 'Description',
|
gpxDesc: 'Description',
|
||||||
gpxTime: 'Date de début',
|
gpxTime: 'Date de début',
|
||||||
gpxShared: 'Partagé avec',
|
gpxTo: 'Destinataires',
|
||||||
gpxSave: 'Sauvegarder',
|
gpxSave: 'Sauvegarder',
|
||||||
newGpx: '-- nouveau voyage --',
|
newGpx: '-- nouveau voyage --',
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue