Begining to implement the Wpt update dialog

This commit is contained in:
vdv committed 2022-12-06 17:09:31 +01:00
1 parent cc121fea27
commit c8a8622c91
4 files changed
+71 -10

No files matched your search

+9 -6
View File
@@ -1,10 +1,11 @@
import { Grid, IconButton } from '@suid/material';
import { Feature } from 'ol';
import { Geometry } from 'ol/geom';
import { Component, createSignal, For } from 'solid-js';
import { Component, createSignal, For, Show } from 'solid-js';
import { unwrap } from 'solid-js/store';
import { useI18n } from '@solid-primitives/i18n';
import CloseIcon from '@suid/icons-material/Close';
import EditIcon from '@suid/icons-material/Edit';
import { tree } from '../map';
import { Paper, Stack } from '@suid/material';
import styled from '@suid/material/styles/styled';
@@ -68,14 +69,16 @@ const Infos: Component<{}> = (props) => {
<Item sx={{ width: 'calc(100% - 1px)' }}>
<Grid container spacing={2} alignItems='center'>
<Grid item xs={11}>
{feature.get('name')
? `${feature.get('name')} (${t(feature.get('type'))})`
{feature.get('getTitle')
? feature.get('getTitle')()
: t(feature.get('type'))}
</Grid>
<Grid item xs={1} sx={{ paddingLeft: '0px' }}>
<IconButton onClick={handleClick}>
<CloseIcon />
</IconButton>
<Show when={feature.get('edit')}>
<IconButton onClick={feature.get('edit')}>
<EditIcon />
</IconButton>
</Show>
</Grid>
</Grid>
</Item>