From 679c485b892f91421f8d4632f817f4d1062899be Mon Sep 17 00:00:00 2001 From: muerwre Date: Thu, 14 Feb 2019 10:18:04 +0700 Subject: [PATCH] cancel editing loses is_public --- src/components/panels/EditorPanel.tsx | 2 +- src/index.tsx | 3 +++ src/modules/Editor.ts | 2 ++ src/redux/user/sagas.ts | 8 ++------ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/panels/EditorPanel.tsx b/src/components/panels/EditorPanel.tsx index adb1ed4..39eff9e 100644 --- a/src/components/panels/EditorPanel.tsx +++ b/src/components/panels/EditorPanel.tsx @@ -98,7 +98,7 @@ class Component extends React.PureComponent { className={classnames({ primary: changed, disabled: !changed })} onClick={this.startSaveMode} > - СХОРОНИТЬ + СОХРАНИТЬ diff --git a/src/index.tsx b/src/index.tsx index eebcd8d..eca4b3c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -10,6 +10,9 @@ ## FEATURES + todo hide arrows on small zooms + todo hide stickers and route on small zooms (?) + todo selecting logo on crop todo save spinner diff --git a/src/modules/Editor.ts b/src/modules/Editor.ts index 8812a12..04f2c59 100644 --- a/src/modules/Editor.ts +++ b/src/modules/Editor.ts @@ -290,6 +290,7 @@ export class Editor { setInitialData = () => { const { path } = getUrlData(); const { id } = this.getUser(); + const { is_public } = this.getState(); const { route, stickers, provider } = this.dumpData(); this.initialData = { @@ -301,6 +302,7 @@ export class Editor { route, stickers, provider, + is_public, }; }; diff --git a/src/redux/user/sagas.ts b/src/redux/user/sagas.ts index cc35ea8..c2ff2ee 100644 --- a/src/redux/user/sagas.ts +++ b/src/redux/user/sagas.ts @@ -400,7 +400,7 @@ function* changeProviderSaga({ provider }: ReturnType) { - const { address, ready, user: { id, random_url } } = yield select(getState); + const { address, ready, user: { id, random_url }, is_public } = yield select(getState); if (!ready) return; @@ -410,11 +410,9 @@ function* locationChangeSaga({ location }: ReturnType):SagaIterator { - if (title) { - document.title = `${title} | Редактор маршрутов`; - } + if (title) { document.title = `${title} | Редактор маршрутов`; } } export function* userSaga() {