mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
disabled append features for tracks
This commit is contained in:
parent
53bb6a8443
commit
b2357cf522
1 changed files with 31 additions and 11 deletions
|
@ -6,28 +6,48 @@ import classnames from 'classnames';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
item: IGpxRoute;
|
item: IGpxRoute;
|
||||||
index: number
|
index: number;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|
||||||
onFocusRoute: (i: number) => void
|
onFocusRoute: (i: number) => void;
|
||||||
onRouteDrop: (i: number) => void
|
onRouteDrop: (i: number) => void;
|
||||||
onRouteToggle: (i: number) => void
|
onRouteToggle: (i: number) => void;
|
||||||
onRouteColor: (i: number) => void
|
onRouteColor: (i: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GpxDialogRow: FC<IProps> = ({ item, index, enabled, onRouteToggle, onFocusRoute, onRouteDrop, onRouteColor }) => {
|
const GpxDialogRow: FC<IProps> = ({
|
||||||
|
item,
|
||||||
|
index,
|
||||||
|
enabled,
|
||||||
|
onRouteToggle,
|
||||||
|
onFocusRoute,
|
||||||
|
onRouteDrop,
|
||||||
|
onRouteColor,
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className={classnames("gpx-row", { 'gpx-row_disabled': !enabled || !item.enabled })}>
|
<div className={classnames('gpx-row', { 'gpx-row_disabled': !enabled || !item.enabled })}>
|
||||||
<div className="gpx-row__color" style={{ backgroundColor: item.color }} onClick={() => onRouteColor(index)}/>
|
<div
|
||||||
|
className="gpx-row__color"
|
||||||
|
style={{ backgroundColor: item.color }}
|
||||||
|
onClick={() => onRouteColor(index)}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="gpx-row__title" onClick={() => onFocusRoute(index)}>
|
<div className="gpx-row__title" onClick={() => onFocusRoute(index)}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="gpx-row__buttons">
|
<div className="gpx-row__buttons">
|
||||||
<div onClick={() => onRouteDrop(index)}><Icon icon="icon-to-poly" size={24} /></div>
|
{false && (
|
||||||
<div onClick={() => onRouteDrop(index)}><Icon icon="icon-trash-6" size={24} /></div>
|
<div onClick={() => onRouteDrop(index)}>
|
||||||
<div><Switch active={item.enabled} onPress={() => onRouteToggle(index)}/></div>
|
<Icon icon="icon-to-poly" size={24} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div onClick={() => onRouteDrop(index)}>
|
||||||
|
<Icon icon="icon-trash-6" size={24} />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Switch active={item.enabled} onPress={() => onRouteToggle(index)} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue