mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
updated aliases
This commit is contained in:
parent
af8d270460
commit
e950d98b73
74 changed files with 300 additions and 390 deletions
|
@ -1,6 +1,6 @@
|
|||
import { MAP_ACTIONS } from './constants';
|
||||
import { IMapReducer } from './';
|
||||
import { IStickerDump } from '$redux/map/types';
|
||||
import { IStickerDump } from '~/redux/map/types';
|
||||
import { ILatLng } from './types';
|
||||
|
||||
export const mapSet = (map: Partial<IMapReducer>) => ({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { createReducer } from 'reduxsauce';
|
||||
import { MAP_HANDLERS } from './handlers';
|
||||
import { DEFAULT_PROVIDER } from '$constants/providers';
|
||||
import { DEFAULT_PROVIDER } from '~/constants/providers';
|
||||
import { IMapRoute } from './types';
|
||||
import { IStickerDump } from '$redux/map/types';
|
||||
import { DEFAULT_LOGO } from '$constants/logos';
|
||||
import { IStickerDump } from '~/redux/map/types';
|
||||
import { DEFAULT_LOGO } from '~/constants/logos';
|
||||
|
||||
export interface IMapReducer {
|
||||
provider: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { takeEvery, select, put, call, TakeEffect, race, take, takeLatest } from 'redux-saga/effects';
|
||||
import { MAP_ACTIONS } from './constants';
|
||||
import { mapClicked, mapAddSticker, mapSetProvider, mapSet, mapSetTitle, mapSetAddress, mapSetDescription, mapSetOwner, mapSetPublic } from './actions';
|
||||
import { selectUserMode, selectUserActiveSticker, selectUser, selectUserUser } from '$redux/user/selectors';
|
||||
import { MODES } from '$constants/modes';
|
||||
import { selectUserMode, selectUserActiveSticker, selectUser, selectUserUser } from '~/redux/user/selectors';
|
||||
import { MODES } from '~/constants/modes';
|
||||
import {
|
||||
setMode,
|
||||
setChanged,
|
||||
|
@ -15,15 +15,15 @@ import {
|
|||
sendSaveRequest,
|
||||
setSaveSuccess,
|
||||
setSaveOverwrite,
|
||||
} from '$redux/user/actions';
|
||||
import { pushLoaderState, getUrlData, pushPath, replacePath } from '$utils/history';
|
||||
import { setReadySaga, searchSetSagaWorker } from '$redux/user/sagas';
|
||||
import { getStoredMap, postMap } from '$utils/api';
|
||||
import { Unwrap } from '$utils/middleware';
|
||||
import { DEFAULT_PROVIDER } from '$constants/providers';
|
||||
import { USER_ACTIONS } from '$redux/user/constants';
|
||||
} from '~/redux/user/actions';
|
||||
import { pushLoaderState, getUrlData, pushPath, replacePath } from '~/utils/history';
|
||||
import { setReadySaga, searchSetSagaWorker } from '~/redux/user/sagas';
|
||||
import { getStoredMap, postMap } from '~/utils/api';
|
||||
import { Unwrap } from '~/utils/middleware';
|
||||
import { DEFAULT_PROVIDER } from '~/constants/providers';
|
||||
import { USER_ACTIONS } from '~/redux/user/constants';
|
||||
import { selectMap } from './selectors';
|
||||
import { TIPS } from '$constants/tips';
|
||||
import { TIPS } from '~/constants/tips';
|
||||
import { delay } from 'redux-saga';
|
||||
|
||||
function* onMapClick({ latlng }: ReturnType<typeof mapClicked>) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { IState } from "$redux/store";
|
||||
import { IState } from "~/redux/store";
|
||||
|
||||
export const selectMap = (state: IState) => state.map;
|
||||
export const selectMapProvider = (state: IState) => state.map.provider;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { LatLng } from 'leaflet';
|
||||
import { IRoutePoint } from '$utils/gpx';
|
||||
import { IRoutePoint } from '~/utils/gpx';
|
||||
|
||||
export type ILatLng = {
|
||||
lat: number;
|
||||
|
|
|
@ -4,13 +4,13 @@ import { persistStore, persistReducer } from 'redux-persist';
|
|||
import storage from 'redux-persist/lib/storage';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
|
||||
import { userReducer, IRootReducer } from '$redux/user';
|
||||
import { userSaga } from '$redux/user/sagas';
|
||||
import { mapSaga } from '$redux/map/sagas';
|
||||
import { userReducer, IRootReducer } from '~/redux/user';
|
||||
import { userSaga } from '~/redux/user/sagas';
|
||||
import { mapSaga } from '~/redux/map/sagas';
|
||||
import { createBrowserHistory } from 'history';
|
||||
import { locationChanged } from '$redux/user/actions';
|
||||
import { locationChanged } from '~/redux/user/actions';
|
||||
import { PersistConfig, Persistor } from "redux-persist/es/types";
|
||||
import { map, IMapReducer } from '$redux/map';
|
||||
import { map, IMapReducer } from '~/redux/map';
|
||||
|
||||
const userPersistConfig: PersistConfig = {
|
||||
key: 'user',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { USER_ACTIONS } from '$redux/user/constants';
|
||||
import { IUser } from "$constants/auth";
|
||||
import { IRootState } from "$redux/user";
|
||||
import { IRoute } from '$redux/map/types';
|
||||
import { USER_ACTIONS } from '~/redux/user/constants';
|
||||
import { IUser } from "~/constants/auth";
|
||||
import { IRootState } from "~/redux/user";
|
||||
import { IRoute } from '~/redux/map/types';
|
||||
|
||||
export const setUser = (user: IUser) => ({ type: USER_ACTIONS.SET_USER, user });
|
||||
export const userLogout = () => ({ type: USER_ACTIONS.USER_LOGOUT });
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { IRootState } from ".";
|
||||
import * as ActionCreators from './actions'
|
||||
import { TIPS } from "$constants/tips";
|
||||
import { TABS } from "$constants/dialogs";
|
||||
import { TIPS } from "~/constants/tips";
|
||||
import { TABS } from "~/constants/dialogs";
|
||||
import { USER_ACTIONS } from "./constants";
|
||||
|
||||
type UnsafeReturnType<T> = T extends (...args: any[]) => infer R ? R : any;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { createReducer } from 'reduxsauce';
|
||||
import { DEFAULT_USER, IUser } from '$constants/auth';
|
||||
import { MODES } from '$constants/modes';
|
||||
import { DIALOGS, IDialogs } from '$constants/dialogs';
|
||||
import { IStickers } from "$constants/stickers";
|
||||
import { DEFAULT_USER, IUser } from '~/constants/auth';
|
||||
import { MODES } from '~/constants/modes';
|
||||
import { DIALOGS, IDialogs } from '~/constants/dialogs';
|
||||
import { IStickers } from "~/constants/stickers";
|
||||
import { USER_HANDLERS } from './handlers';
|
||||
|
||||
export interface IRouteListItem {
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
getRouteList,
|
||||
modifyRoute,
|
||||
sendRouteStarred,
|
||||
} from '$utils/api';
|
||||
} from '~/utils/api';
|
||||
import {
|
||||
hideRenderer,
|
||||
searchPutRoutes,
|
||||
|
@ -38,7 +38,7 @@ import {
|
|||
setFeature,
|
||||
searchSetTitle,
|
||||
setRouteStarred,
|
||||
} from '$redux/user/actions';
|
||||
} from '~/redux/user/actions';
|
||||
|
||||
import {
|
||||
getUrlData,
|
||||
|
@ -46,10 +46,10 @@ import {
|
|||
pushLoaderState,
|
||||
pushNetworkInitError,
|
||||
pushPath,
|
||||
} from '$utils/history';
|
||||
import { USER_ACTIONS } from '$redux/user/constants';
|
||||
import { MODES } from '$constants/modes';
|
||||
import { DEFAULT_USER } from '$constants/auth';
|
||||
} from '~/utils/history';
|
||||
import { USER_ACTIONS } from '~/redux/user/constants';
|
||||
import { MODES } from '~/constants/modes';
|
||||
import { DEFAULT_USER } from '~/constants/auth';
|
||||
import {
|
||||
composeArrows,
|
||||
composeDistMark,
|
||||
|
@ -62,18 +62,18 @@ import {
|
|||
getStickersPlacement,
|
||||
getTilePlacement,
|
||||
imageFetcher,
|
||||
} from '$utils/renderer';
|
||||
import { LOGOS } from '$constants/logos';
|
||||
import { DIALOGS, TABS } from '$constants/dialogs';
|
||||
} from '~/utils/renderer';
|
||||
import { LOGOS } from '~/constants/logos';
|
||||
import { DIALOGS, TABS } from '~/constants/dialogs';
|
||||
|
||||
import * as ActionCreators from '$redux/user/actions';
|
||||
import { downloadGPXTrack, getGPXString } from '$utils/gpx';
|
||||
import { Unwrap } from '$utils/middleware';
|
||||
import { IState } from '$redux/store';
|
||||
import * as ActionCreators from '~/redux/user/actions';
|
||||
import { downloadGPXTrack, getGPXString } from '~/utils/gpx';
|
||||
import { Unwrap } from '~/utils/middleware';
|
||||
import { IState } from '~/redux/store';
|
||||
import { selectUser, selectUserUser } from './selectors';
|
||||
import { mapInitSaga, loadMapSaga, replaceAddressIfItsBusy } from '$redux/map/sagas';
|
||||
import { mapInitSaga, loadMapSaga, replaceAddressIfItsBusy } from '~/redux/map/sagas';
|
||||
import { LatLng } from 'leaflet';
|
||||
import { selectMap } from '$redux/map/selectors';
|
||||
import { selectMap } from '~/redux/map/selectors';
|
||||
|
||||
// const getUser = (state: IState) => state.user.user;
|
||||
// const selectUser = (state: IState) => state.user;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { IState } from '$redux/store'
|
||||
import { IState } from '~/redux/store'
|
||||
|
||||
export const selectUser = (state: IState) => state.user;
|
||||
export const selectUserUser = (state: IState) => state.user.user;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue