mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
added notifications for hidden markers
This commit is contained in:
parent
32e1b4c3fd
commit
ba5e24a56d
12 changed files with 89 additions and 19 deletions
|
@ -60,3 +60,5 @@ export const searchSetLoading = loading => ({ type: ACTIONS.SEARCH_SET_LOADING,
|
|||
|
||||
export const searchPutRoutes = payload => ({ type: ACTIONS.SEARCH_PUT_ROUTES, ...payload });
|
||||
|
||||
export const setMarkersShown = markers_shown => ({ type: ACTIONS.SET_MARKERS_SHOWN, markers_shown });
|
||||
|
||||
|
|
|
@ -63,4 +63,6 @@ export const ACTIONS = ({
|
|||
|
||||
OPEN_MAP_DIALOG: 'OPEN_MAP_DIALOG',
|
||||
SET_SPEED: 'SET_SPEED',
|
||||
|
||||
SET_MARKERS_SHOWN: 'SET_MARKERS_SHOWN',
|
||||
}: { [key: String]: String });
|
||||
|
|
|
@ -159,6 +159,8 @@ const setSpeed = (state, { speed = 15 }) => ({
|
|||
estimated: getEstimated(state.distance, speed),
|
||||
});
|
||||
|
||||
const setMarkersShown = (state, { markers_shown = true }) => ({ ...state, markers_shown });
|
||||
|
||||
const HANDLERS = ({
|
||||
[ACTIONS.SET_USER]: setUser,
|
||||
[ACTIONS.SET_EDITING]: setEditing,
|
||||
|
@ -195,6 +197,8 @@ const HANDLERS = ({
|
|||
[ACTIONS.SEARCH_SET_LOADING]: searchSetLoading,
|
||||
[ACTIONS.SET_PUBLIC]: setPublic,
|
||||
[ACTIONS.SET_SPEED]: setSpeed,
|
||||
|
||||
[ACTIONS.SET_MARKERS_SHOWN]: setMarkersShown,
|
||||
}: { [key: String]: Function });
|
||||
|
||||
export const INITIAL_STATE = {
|
||||
|
@ -214,6 +218,7 @@ export const INITIAL_STATE = {
|
|||
changed: false,
|
||||
provider: DEFAULT_PROVIDER,
|
||||
is_public: false,
|
||||
markers_shown: true,
|
||||
|
||||
save_error: '',
|
||||
save_finished: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue