From 3de025b0df81bb9e9ade9e50c0e8e46332a54166 Mon Sep 17 00:00:00 2001 From: muerwre Date: Fri, 7 Dec 2018 11:03:05 +0700 Subject: [PATCH] dialogs: head --- backend/routes/auth/check.js | 2 +- src/components/dialogs/MapListDialog.jsx | 36 +++++++++++++++--------- src/styles/dialogs.less | 17 +++++++++++ 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/backend/routes/auth/check.js b/backend/routes/auth/check.js index ae7a2d7..858ea73 100644 --- a/backend/routes/auth/check.js +++ b/backend/routes/auth/check.js @@ -9,7 +9,7 @@ module.exports = async (req, res) => { path: 'routes', select: '_id title distance owner updated_at', options: { - limit: 20, + limit: 200, sort: { updated_at: -1 }, } }); diff --git a/src/components/dialogs/MapListDialog.jsx b/src/components/dialogs/MapListDialog.jsx index 89cde18..2474334 100644 --- a/src/components/dialogs/MapListDialog.jsx +++ b/src/components/dialogs/MapListDialog.jsx @@ -13,21 +13,29 @@ type Props = { }; const Component = ({ routes, editing, routes_sorted }: Props) => ( - -
- { - routes_sorted.map(id => ( - - )) - } +
+
+
+ Ваши маршруты +
+
+ ({routes_sorted.length} шт.) +
- + +
+ { + routes_sorted.map(id => ( + + )) + } +
+
+
); const mapStateToProps = ({ user: { editing, user: { routes } } }) => ({ diff --git a/src/styles/dialogs.less b/src/styles/dialogs.less index efc9e03..1570f08 100644 --- a/src/styles/dialogs.less +++ b/src/styles/dialogs.less @@ -32,6 +32,11 @@ border-radius: @panel_radius; box-shadow: @dialog_shadow; + display: flex; + flex-direction: column; +} + +.dialog-shader { &::before, &::after { content: ' '; height: 40px; @@ -104,3 +109,15 @@ white-space: nowrap; } } + +.dialog-head { + background: rgba(255, 255, 255, 0.1); + padding: 10px; + border-radius: @panel_radius @panel_radius 0 0; + color: white; +} + +.dialog-head-title { + font-size: 20px; + text-transform: uppercase; +}