mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
Merge branch 'master' into feature/dialog-editor
# Conflicts: # src/components/dialogs/MapListDialog.tsx # src/modules/Poly.ts # src/styles/dialogs.less
This commit is contained in:
commit
d42586d9e0
25 changed files with 556 additions and 971 deletions
|
@ -78,6 +78,8 @@ class Component extends React.Component<IMapListDialogProps, IMapListDialogState
|
|||
openRoute = (_id: string): void => {
|
||||
if (isMobile()) this.props.setDialogActive(false);
|
||||
|
||||
// pushPath(`/${_id}/${this.props.editing ? 'edit' : ''}`);
|
||||
pushPath(`/${_id}`);
|
||||
this.stopEditing();
|
||||
|
||||
pushPath(`/${_id}/${this.props.editing ? 'edit' : ''}`);
|
||||
|
|
|
@ -4,10 +4,12 @@ import {
|
|||
routerCancel as routerCancelAction,
|
||||
routerSubmit as routerSubmitAction,
|
||||
} from "$redux/user/actions";
|
||||
import classnames from "classnames";
|
||||
|
||||
type Props = {
|
||||
routerPoints: number,
|
||||
width: number,
|
||||
is_routing: boolean,
|
||||
|
||||
routerCancel: typeof routerCancelAction,
|
||||
routerSubmit: typeof routerSubmitAction,
|
||||
|
@ -81,9 +83,11 @@ const draggablePoints = ({
|
|||
);
|
||||
|
||||
export const RouterDialog = ({
|
||||
routerPoints, routerCancel, routerSubmit, width
|
||||
routerPoints, routerCancel, routerSubmit, width, is_routing,
|
||||
}: Props) => (
|
||||
<div className="control-dialog" style={{ width }}>
|
||||
<div className={classnames('save-loader', { active: is_routing })} />
|
||||
|
||||
{!routerPoints && noPoints({ routerCancel })}
|
||||
{routerPoints === 1 && firstPoint({ routerCancel })}
|
||||
{routerPoints >= 2 && draggablePoints({ routerCancel, routerSubmit })}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue