diff --git a/src/components/panels/EditorPanel.jsx b/src/components/panels/EditorPanel.jsx index fab5895..aa173b0 100644 --- a/src/components/panels/EditorPanel.jsx +++ b/src/components/panels/EditorPanel.jsx @@ -23,9 +23,13 @@ export class EditorPanel extends React.PureComponent { startSaveMode = () => this.props.editor.changeMode(MODES.SAVE); + stopEditing = () => this.props.editor.stopEditing(); + + startEditing = () => this.props.editor.startEditing(); + render() { const { - mode, routerPoints, editor, totalDistance, estimateTime, activeSticker, logo, user + mode, routerPoints, editor, totalDistance, estimateTime, activeSticker, logo, user, editing, } = this.props; return ( @@ -42,7 +46,7 @@ export class EditorPanel extends React.PureComponent { -
+
{totalDistance} км @@ -96,9 +100,20 @@ export class EditorPanel extends React.PureComponent { > +
+
+ +
+ +
+ +
+
+ +
+
); } diff --git a/src/components/panels/UserPanel.jsx b/src/components/panels/UserPanel.jsx index 3728181..1bb564c 100644 --- a/src/components/panels/UserPanel.jsx +++ b/src/components/panels/UserPanel.jsx @@ -62,7 +62,7 @@ export class UserPanel extends React.PureComponent { return (
-
+
{ !user || user.role === ROLES.guest @@ -74,26 +74,6 @@ export class UserPanel extends React.PureComponent { }
- -
- -
- { - editing - ? - - : - } - -
); diff --git a/src/containers/App.jsx b/src/containers/App.jsx index cd9123d..57e72fa 100644 --- a/src/containers/App.jsx +++ b/src/containers/App.jsx @@ -175,7 +175,6 @@ export class App extends React.Component {
); diff --git a/src/styles/panel.less b/src/styles/panel.less index 79a6f5a..bdc8b79 100644 --- a/src/styles/panel.less +++ b/src/styles/panel.less @@ -3,6 +3,8 @@ border-radius: 3px; display: flex; box-shadow: @bar_shadow; + + } .control-dist { @@ -36,6 +38,12 @@ color: white; display: flex; align-items: center; + transform: translateY(100px); + transition: transform 500ms; + + &.active { + transform: translateY(0); + } &.right { left: auto; @@ -66,6 +74,10 @@ margin-left: 8px; } + &:first-child { + border-radius: 4px 0 0 4px; + } + &:last-child { border-radius: 0 4px 4px 0; } @@ -78,10 +90,19 @@ } &.highlighted { + background: #555555; + } + + &.primary { background: linear-gradient(150deg, @blue_primary, @blue_secondary) 50% 50% no-repeat; background-size: 100% 100%; } + &.success { + background: linear-gradient(150deg, @green_primary, @green_secondary) 50% 50% no-repeat; + background-size: 100% 100%; + } + svg { fill: white; stroke: white;