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