diff --git a/src/components/dialogs/SaveDialog.jsx b/src/components/dialogs/SaveDialog.jsx index 0799c94..0687b4f 100644 --- a/src/components/dialogs/SaveDialog.jsx +++ b/src/components/dialogs/SaveDialog.jsx @@ -84,25 +84,20 @@ export class SaveDialog extends React.Component {
- { !save_finished &&
Отмена
} - { !save_finished && !save_overwriting &&
Сохранить
} - { save_overwriting &&
Перезаписать
} - { save_finished &&
Отлично, спасибо!
} -
diff --git a/src/components/user/UserButton.jsx b/src/components/user/UserButton.jsx index 127b436..d16889b 100644 --- a/src/components/user/UserButton.jsx +++ b/src/components/user/UserButton.jsx @@ -8,15 +8,11 @@ type Props = { setMenuOpened: Function, }; -const getUserName = name => name.split(' ')[0]; - export const UserButton = ({ setMenuOpened, user: { _id, - // userdata: { name, photo }, photo, - name, first_name, } }: Props) => ( diff --git a/src/redux/user/sagas.js b/src/redux/user/sagas.js index ed1955b..2b53f2c 100644 --- a/src/redux/user/sagas.js +++ b/src/redux/user/sagas.js @@ -51,7 +51,7 @@ function* startEmptyEditorSaga() { pushPath(`/${random_url}/edit`); - editor.owner = id; + editor.owner = { id }; editor.setProvider(provider); editor.startEditing(); @@ -161,9 +161,9 @@ function* setModeSaga({ mode }) { function* userLogoutSaga() { const { id } = yield select(getUser); - if (id === editor.owner) { - editor.owner = null; - } + // if (id === editor.owner) { + // editor.owner = { id: null }; + // } yield put(setUser(DEFAULT_USER)); yield call(generateGuestSaga); @@ -256,7 +256,7 @@ function* setSaveSuccessSaga({ address, title }) { yield put(setTitle(title)); yield put(setAddress(address)); - yield editor.owner = id; + yield editor.owner = { id }; yield call(refreshUserData); @@ -338,6 +338,8 @@ function* locationChangeSaga({ location }) { const { path, mode } = getUrlData(location); if (address !== path) { + console.log('LOADING NEW DATA'); + const map = yield call(loadMapSaga, path); if (map && map.owner && mode === 'edit' && map.owner.id !== id) { @@ -345,6 +347,7 @@ function* locationChangeSaga({ location }) { return; } } else if (mode === 'edit' && editor.owner.id !== id) { + console.log('NOT AN OWNER!!!', editor.owner.id, id); pushPath(`/${random_url}/edit`); return; } diff --git a/src/styles/colors.less b/src/styles/colors.less index 893826e..0c85718 100644 --- a/src/styles/colors.less +++ b/src/styles/colors.less @@ -15,7 +15,7 @@ @red_secondary: #ff3344; @panel_radius: 4px; -@button_radius: 0; +@button_radius: 2px; @color_primary: #4597d0; @color_success: #7cd766; diff --git a/src/styles/dialogs.less b/src/styles/dialogs.less index 7586d2f..53b3cfa 100644 --- a/src/styles/dialogs.less +++ b/src/styles/dialogs.less @@ -1,6 +1,7 @@ .dialog { - background: #222222; - //background: linear-gradient(130deg, #320523, #020d2b); + // background: #222222; + // background: linear-gradient(130deg, #320523, #020d2b); + background: #271535; position: fixed; left: 0; top: 0; @@ -28,8 +29,9 @@ width: 100%; left: 0; bottom: 0; - //background: linear-gradient(0deg, rgba(2, 13, 43, 1) 50%, rgba(2,13,43,0)); - background: linear-gradient(0deg, rgba(34, 34, 34, 1) 50%, rgba(34, 34, 34, 0)); + // background: linear-gradient(0deg, rgba(2, 13, 43, 1) 50%, rgba(2,13,43,0)); + // background: linear-gradient(0deg, rgba(34, 34, 34, 1) 50%, rgba(34, 34, 34, 0)); + background: linear-gradient(0deg, rgba(39, 21, 53, 1) 50%, rgba(39, 21, 53, 1)); position: absolute; z-index: 5; } diff --git a/src/styles/save.less b/src/styles/save.less index 0442c4b..46f5b51 100644 --- a/src/styles/save.less +++ b/src/styles/save.less @@ -6,7 +6,7 @@ .save-title { padding: 10px; width: 100%; - background: linear-gradient(150deg, @green_primary, @green_secondary); + background: linear-gradient(175deg, #abc837 -50%, #009c80 150%); flex-direction: column; border-radius: @panel_radius @panel_radius 0 0; font-weight: 200; @@ -67,12 +67,14 @@ padding: 5px 0 5px 10px; height: 100%; opacity: 0.5; + white-space: nowrap; } .save-text { padding: 10px; line-height: 1.1em; min-height: 2.2em; + font-size: 0.9em; } .save-buttons { @@ -88,3 +90,17 @@ .save-buttons-text { flex: 1; } + +.save-description { + textarea { + background: rgba(0,0,0,0.3); + border: none; + border-radius: 3px; + width: 100%; + resize: none; + color: inherit; + font: inherit; + height: 5.5em; + padding: 0.25em; + } +} diff --git a/src/utils/history.js b/src/utils/history.js index e8b8570..7513426 100644 --- a/src/utils/history.js +++ b/src/utils/history.js @@ -1,7 +1,10 @@ import { history } from '$redux/store'; export const getPath = () => (window.location && window.location.pathname); -export const pushPath = url => history.push(url); +export const pushPath = url => { + console.log('PUSHING', url); + return history.push(url); +}; export const getUrlData = (url = getPath()) => { const [, path, mode] = url.split('/');