From 3562c04dc89dbd11d5fff62979d4385906dc6261 Mon Sep 17 00:00:00 2001 From: muerwre Date: Thu, 13 Dec 2018 17:48:15 +0700 Subject: [PATCH] routes: slider changes --- src/constants/app_info.js | 1 + src/index.js | 6 +++--- src/redux/user/reducer.js | 2 +- src/redux/user/sagas.js | 3 +++ src/styles/slider.less | 3 ++- src/utils/api.js | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/constants/app_info.js b/src/constants/app_info.js index ed6f056..8482372 100644 --- a/src/constants/app_info.js +++ b/src/constants/app_info.js @@ -12,6 +12,7 @@ export const APP_INFO = { 'Диалог со списком карт пользователя', // [07.12.18] 'Мобильный интерфейс', // [07.12.18] 'Приложение для vk', // [11.12.18] + 'Фильтр в диалоге поиска карт', // [13.12.18] ], [ 'Первый коммит', // [15.08.18] diff --git a/src/index.js b/src/index.js index 4dcae9a..552cbbf 100644 --- a/src/index.js +++ b/src/index.js @@ -16,9 +16,9 @@ done better loader screen done network errors handling on startup - todo map catalogue - todo public maps - todo map search + done map catalogue + done public maps + done map search todo map lazy loading todo tooltips diff --git a/src/redux/user/reducer.js b/src/redux/user/reducer.js index 285ac4d..4a7a0e8 100644 --- a/src/redux/user/reducer.js +++ b/src/redux/user/reducer.js @@ -228,7 +228,7 @@ export const INITIAL_STATE = { starred: false, distance: [0, 10000], author: '', - tab: 'mine', + tab: '', min: 0, max: 10000, } diff --git a/src/redux/user/sagas.js b/src/redux/user/sagas.js index 876b9e8..a30b646 100644 --- a/src/redux/user/sagas.js +++ b/src/redux/user/sagas.js @@ -461,7 +461,10 @@ function* openMapDialogSaga({ tab }) { return yield put(setDialogActive(false)); } + // if (tab !== current) { // if tab wasnt changed just update data yield put(searchSetTab(tab)); + // } + yield put(setDialog(DIALOGS.MAP_LIST)); yield put(setDialogActive(true)); diff --git a/src/styles/slider.less b/src/styles/slider.less index 84ab8ef..aee280f 100644 --- a/src/styles/slider.less +++ b/src/styles/slider.less @@ -46,7 +46,8 @@ left: 0; height: 4px; border-radius: @border-radius-base; - background: linear-gradient(90deg, @green_secondary, @blue_secondary); + background: linear-gradient(270deg, @red_secondary, @blue_secondary) fixed 20px 0; + background-size: 320px 100px; } &-handle { diff --git a/src/utils/api.js b/src/utils/api.js index 8433105..ec90c9d 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -44,4 +44,5 @@ export const getRouteList = ({ params: { title, distance, author, starred } -}).then(result => (result && result.data && result.data.success && result.data)).catch(() => ([])); +}).then(result => (result && result.data && result.data.success && result.data)) + .catch(() => ({ list: [], min: 0, max: 0 }));