mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-24 18:46: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 {
|
||||
item: IGpxRoute;
|
||||
index: number
|
||||
index: number;
|
||||
enabled: boolean;
|
||||
|
||||
onFocusRoute: (i: number) => void
|
||||
onRouteDrop: (i: number) => void
|
||||
onRouteToggle: (i: number) => void
|
||||
onRouteColor: (i: number) => void
|
||||
onFocusRoute: (i: number) => void;
|
||||
onRouteDrop: (i: number) => void;
|
||||
onRouteToggle: (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 (
|
||||
<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={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__title" onClick={() => onFocusRoute(index)}>
|
||||
{item.name}
|
||||
</div>
|
||||
|
||||
<div className="gpx-row__buttons">
|
||||
<div onClick={() => onRouteDrop(index)}><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>
|
||||
{false && (
|
||||
<div onClick={() => onRouteDrop(index)}>
|
||||
<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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue