mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
fixed some dialogs
This commit is contained in:
parent
39d950d5c5
commit
8c3ce1d1a5
4 changed files with 74 additions and 38 deletions
|
@ -12,9 +12,6 @@ type Props = {
|
|||
export class CancelDialog extends React.Component<Props, void> {
|
||||
cancel = () => {
|
||||
this.props.stopEditing();
|
||||
// editor.cancelEditing();
|
||||
// this.props.setEditing(false);
|
||||
// this.props.setMode(MODES.NONE);
|
||||
};
|
||||
|
||||
proceed = () => {
|
||||
|
@ -31,6 +28,9 @@ export class CancelDialog extends React.Component<Props, void> {
|
|||
<Icon icon="icon-cancel-1" />
|
||||
<div className="big upper">Закрыть редактор?</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper cancel-helper">
|
||||
<div className="helper__text" />
|
||||
<div className="helper__buttons">
|
||||
<div className="button router-helper__button" onClick={this.cancel}>
|
||||
Удалить измения
|
||||
|
|
|
@ -9,54 +9,71 @@ type Props = {
|
|||
}
|
||||
|
||||
const noPoints = ({ routerCancel }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">
|
||||
Укажите первую точку на карте
|
||||
<React.Fragment>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">
|
||||
Укажите первую точку на карте
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper__buttons">
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
const firstPoint = ({ routerCancel }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">УКАЖИТЕ СЛЕДУЮЩУЮ ТОЧКУ</div>
|
||||
</div>
|
||||
<div className="helper__buttons">
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
<React.Fragment>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">УКАЖИТЕ СЛЕДУЮЩУЮ ТОЧКУ</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
const draggablePoints = ({ routerCancel, routerSubmit }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text success">
|
||||
<Icon icon="icon-check-1" />
|
||||
<div className="big upper">Продолжайте маршрут</div>
|
||||
</div>
|
||||
<div className="helper__buttons button-group">
|
||||
<div className="button button_red router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
<div className="button primary router-helper__button" onClick={routerSubmit}>
|
||||
Применить
|
||||
<React.Fragment>
|
||||
<div className="helper">
|
||||
<div className="helper__text success">
|
||||
<Icon icon="icon-check-1" />
|
||||
<div className="big upper">Продолжайте маршрут</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons button-group flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button button_red router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
<div className="button primary router-helper__button" onClick={routerSubmit}>
|
||||
Применить
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
export const RouterDialog = ({ routerPoints, routerCancel, routerSubmit, width }: Props) => (
|
||||
<div className="control-dialog control-dialog-big" style={{ width }}>
|
||||
export const RouterDialog = ({
|
||||
routerPoints, routerCancel, routerSubmit, width
|
||||
}: Props) => (
|
||||
<div className="control-dialog" style={{ width }}>
|
||||
{!routerPoints && noPoints({ routerCancel })}
|
||||
{routerPoints === 1 && firstPoint({ routerCancel })}
|
||||
{routerPoints >= 2 && draggablePoints({ routerCancel, routerSubmit })}
|
||||
|
|
|
@ -13,13 +13,15 @@ type Props = {
|
|||
export const TrashDialog = ({
|
||||
clearPoly, clearStickers, clearAll, clearCancel, width,
|
||||
}: Props) => (
|
||||
<div className="control-dialog control-dialog-big" style={{ width }}>
|
||||
<div className="control-dialog" style={{ width }}>
|
||||
<div className="helper trash-helper">
|
||||
<div className="helper__text danger">
|
||||
<Icon icon="icon-trash-4" />
|
||||
<div className="big upper desktop-only">Удалить:</div>
|
||||
</div>
|
||||
<div className="helper__buttons">
|
||||
</div>
|
||||
<div className="helper trash-helper">
|
||||
<div className="helper__buttons flex_1">
|
||||
<div className="button-group">
|
||||
<div className="button router-helper__button" onClick={clearPoly}>
|
||||
Маршрут
|
||||
|
@ -31,6 +33,7 @@ export const TrashDialog = ({
|
|||
ВСЕ
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex_1" />
|
||||
<div className="button primary router-helper__button" onClick={clearCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue