mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
fixed reducer placement for user
This commit is contained in:
parent
f814fe6c42
commit
813fded927
20 changed files with 18 additions and 18 deletions
|
@ -3,7 +3,7 @@ import { LOGOS } from '$constants/logos';
|
||||||
import { Icon } from '$components/panels/Icon';
|
import { Icon } from '$components/panels/Icon';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { setLogo as setLogoAction } from "$redux/user/actions";
|
import { setLogo as setLogoAction } from "$redux/user/actions";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
interface Props extends IRootState {
|
interface Props extends IRootState {
|
||||||
setLogo: typeof setLogoAction,
|
setLogo: typeof setLogoAction,
|
||||||
|
|
|
@ -19,7 +19,7 @@ import * as Range from 'rc-slider/lib/Range';
|
||||||
import { TABS, TABS_TITLES } from '$constants/dialogs';
|
import { TABS, TABS_TITLES } from '$constants/dialogs';
|
||||||
import { Icon } from '$components/panels/Icon';
|
import { Icon } from '$components/panels/Icon';
|
||||||
import { pushPath } from '$utils/history';
|
import { pushPath } from '$utils/history';
|
||||||
import { IRootState, IRouteListItem } from '$redux/user/reducer';
|
import { IRootState, IRouteListItem } from '$redux/user';
|
||||||
import { ROLES } from "$constants/auth";
|
import { ROLES } from "$constants/auth";
|
||||||
|
|
||||||
export interface IMapListDialogProps extends IRootState {
|
export interface IMapListDialogProps extends IRootState {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { PROVIDERS, replaceProviderUrl } from '$constants/providers';
|
||||||
import { Icon } from '$components/panels/Icon';
|
import { Icon } from '$components/panels/Icon';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { changeProvider as changeProviderAction } from "$redux/user/actions";
|
import { changeProvider as changeProviderAction } from "$redux/user/actions";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
interface Props extends IRootState {
|
interface Props extends IRootState {
|
||||||
changeProvider: typeof changeProviderAction,
|
changeProvider: typeof changeProviderAction,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { getStyle } from "$utils/dom";
|
import { getStyle } from "$utils/dom";
|
||||||
import { nearestInt } from "$utils/geom";
|
import { nearestInt } from "$utils/geom";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { parseDesc } from "$utils/format";
|
import { parseDesc } from "$utils/format";
|
||||||
|
|
||||||
interface ITitleDialogProps {
|
interface ITitleDialogProps {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { LOGOS } from "$constants/logos";
|
import { LOGOS } from "$constants/logos";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
interface Props extends IRootState {}
|
interface Props extends IRootState {}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { connect } from 'react-redux';
|
||||||
import * as Slider from 'rc-slider/lib/Slider';
|
import * as Slider from 'rc-slider/lib/Slider';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { setSpeed } from '$redux/user/actions';
|
import { setSpeed } from '$redux/user/actions';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { Tooltip } from "$components/panels/Tooltip";
|
import { Tooltip } from "$components/panels/Tooltip";
|
||||||
import { isMobile } from "$utils/window";
|
import { isMobile } from "$utils/window";
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
} from '$redux/user/actions';
|
} from '$redux/user/actions';
|
||||||
import { ProviderDialog } from '$components/dialogs/ProviderDialog';
|
import { ProviderDialog } from '$components/dialogs/ProviderDialog';
|
||||||
import { ShotPrefetchDialog } from '$components/dialogs/ShotPrefetchDialog';
|
import { ShotPrefetchDialog } from '$components/dialogs/ShotPrefetchDialog';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
interface Props extends IRootState {
|
interface Props extends IRootState {
|
||||||
width: number,
|
width: number,
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { EditorDialog } from '$components/panels/EditorDialog';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { setMode, startEditing, stopEditing, setLogo, takeAShot, keyPressed } from '$redux/user/actions';
|
import { setMode, startEditing, stopEditing, setLogo, takeAShot, keyPressed } from '$redux/user/actions';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { Tooltip } from "$components/panels/Tooltip";
|
import { Tooltip } from "$components/panels/Tooltip";
|
||||||
|
|
||||||
interface Props extends IRootState {
|
interface Props extends IRootState {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { LOGOS } from '$constants/logos';
|
||||||
import { setMode } from '$redux/user/actions';
|
import { setMode } from '$redux/user/actions';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { MODES } from '$constants/modes';
|
import { MODES } from '$constants/modes';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
import { Tooltip } from "$components/panels/Tooltip";
|
import { Tooltip } from "$components/panels/Tooltip";
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import { Icon } from "$components/panels/Icon";
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { CLIENT } from "$config/frontend";
|
import { CLIENT } from "$config/frontend";
|
||||||
import { DIALOGS, TABS } from "$constants/dialogs";
|
import { DIALOGS, TABS } from "$constants/dialogs";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { Tooltip } from "$components/panels/Tooltip";
|
import { Tooltip } from "$components/panels/Tooltip";
|
||||||
import { TitleDialog } from "$components/dialogs/TitleDialog";
|
import { TitleDialog } from "$components/dialogs/TitleDialog";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import * as Croppr from 'croppr';
|
||||||
import 'croppr/dist/croppr.css';
|
import 'croppr/dist/croppr.css';
|
||||||
import { LOGOS } from '$constants/logos';
|
import { LOGOS } from '$constants/logos';
|
||||||
import { RendererPanel } from '$components/panels/RendererPanel';
|
import { RendererPanel } from '$components/panels/RendererPanel';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
data: IRootState['renderer']['data'],
|
data: IRootState['renderer']['data'],
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
} from '$redux/user/actions';
|
} from '$redux/user/actions';
|
||||||
import { DEFAULT_PROVIDER, IProvider, PROVIDERS } from '$constants/providers';
|
import { DEFAULT_PROVIDER, IProvider, PROVIDERS } from '$constants/providers';
|
||||||
import { STICKERS } from '$constants/stickers';
|
import { STICKERS } from '$constants/stickers';
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { DEFAULT_USER, IUser } from "$constants/auth";
|
import { DEFAULT_USER, IUser } from "$constants/auth";
|
||||||
|
|
||||||
interface IEditor {
|
interface IEditor {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { StickerDesc } from '$components/StickerDesc';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { getLabelDirection } from '$utils/geom';
|
import { getLabelDirection } from '$utils/geom';
|
||||||
import { ILatLng } from "$modules/Stickers";
|
import { ILatLng } from "$modules/Stickers";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { Editor, editor } from "$modules/Editor";
|
import { Editor, editor } from "$modules/Editor";
|
||||||
|
|
||||||
const getX = e => (
|
const getX = e => (
|
||||||
|
|
0
src/redux/map/index.ts
Normal file
0
src/redux/map/index.ts
Normal file
|
@ -4,7 +4,7 @@ import { persistStore, persistReducer } from 'redux-persist';
|
||||||
import storage from 'redux-persist/lib/storage';
|
import storage from 'redux-persist/lib/storage';
|
||||||
import createSagaMiddleware from 'redux-saga';
|
import createSagaMiddleware from 'redux-saga';
|
||||||
|
|
||||||
import { userReducer, IRootReducer } from '$redux/user/reducer';
|
import { userReducer, IRootReducer } from '$redux/user';
|
||||||
import { userSaga } from '$redux/user/sagas';
|
import { userSaga } from '$redux/user/sagas';
|
||||||
import { createBrowserHistory } from 'history';
|
import { createBrowserHistory } from 'history';
|
||||||
import { locationChanged } from '$redux/user/actions';
|
import { locationChanged } from '$redux/user/actions';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ACTIONS } from '$redux/user/constants';
|
import { ACTIONS } from '$redux/user/constants';
|
||||||
import { IUser } from "$constants/auth";
|
import { IUser } from "$constants/auth";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
|
|
||||||
export const setUser = (user: IUser) => ({ type: ACTIONS.SET_USER, user });
|
export const setUser = (user: IUser) => ({ type: ACTIONS.SET_USER, user });
|
||||||
export const userLogout = () => ({ type: ACTIONS.USER_LOGOUT });
|
export const userLogout = () => ({ type: ACTIONS.USER_LOGOUT });
|
||||||
|
|
|
@ -85,7 +85,7 @@ import { DEFAULT_PROVIDER } from "$constants/providers";
|
||||||
import { DIALOGS, TABS } from "$constants/dialogs";
|
import { DIALOGS, TABS } from "$constants/dialogs";
|
||||||
|
|
||||||
import * as ActionCreators from "$redux/user/actions";
|
import * as ActionCreators from "$redux/user/actions";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { downloadGPXTrack, getGPXString } from "$utils/gpx";
|
import { downloadGPXTrack, getGPXString } from "$utils/gpx";
|
||||||
import { Unwrap } from "$utils/middleware";
|
import { Unwrap } from "$utils/middleware";
|
||||||
import { IState } from "$redux/store";
|
import { IState } from "$redux/store";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import axios, { AxiosPromise } from "axios/index";
|
import axios, { AxiosPromise } from "axios/index";
|
||||||
import { API } from "$constants/api";
|
import { API } from "$constants/api";
|
||||||
import { IRootState, IRouteListItem, IRoute } from "$redux/user/reducer";
|
import { IRootState, IRouteListItem, IRoute } from "$redux/user";
|
||||||
import { IUser } from "$constants/auth";
|
import { IUser } from "$constants/auth";
|
||||||
import { ILatLng } from "$modules/Stickers";
|
import { ILatLng } from "$modules/Stickers";
|
||||||
import { IStickerDump } from "$modules/Sticker";
|
import { IStickerDump } from "$modules/Sticker";
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { replaceProviderUrl } from '$constants/providers';
|
||||||
import { STICKERS } from '$constants/stickers';
|
import { STICKERS } from '$constants/stickers';
|
||||||
import { ILatLng } from "$modules/Stickers";
|
import { ILatLng } from "$modules/Stickers";
|
||||||
import { IStickerDump } from "$modules/Sticker";
|
import { IStickerDump } from "$modules/Sticker";
|
||||||
import { IRootState } from "$redux/user/reducer";
|
import { IRootState } from "$redux/user";
|
||||||
import { angleBetweenPoints, angleBetweenPointsRad, findDistancePx, middleCoordPx } from "$utils/geom";
|
import { angleBetweenPoints, angleBetweenPointsRad, findDistancePx, middleCoordPx } from "$utils/geom";
|
||||||
import { Point } from "leaflet";
|
import { Point } from "leaflet";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue