mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
fixed loading route and maps
This commit is contained in:
parent
1f774a8299
commit
62cb8d8e18
18 changed files with 715 additions and 369 deletions
|
@ -1,16 +1,16 @@
|
|||
import { CLIENT } from '$config/frontend';
|
||||
|
||||
export const API: { [x: string]: string } = {
|
||||
GET_GUEST: `${CLIENT.API_ADDR}/auth`,
|
||||
CHECK_TOKEN: `${CLIENT.API_ADDR}/auth`,
|
||||
IFRAME_LOGIN_VK: `${CLIENT.API_ADDR}/auth/iframe/vk`,
|
||||
GET_MAP: `${CLIENT.API_ADDR}/route`,
|
||||
POST_MAP: `${CLIENT.API_ADDR}/route`,
|
||||
GET_ROUTE_LIST: `${CLIENT.API_ADDR}/route/list`,
|
||||
GET_GUEST: `${CLIENT.API_ADDR}/api/auth/`,
|
||||
CHECK_TOKEN: `${CLIENT.API_ADDR}/api/auth/`,
|
||||
IFRAME_LOGIN_VK: `${CLIENT.API_ADDR}/api/auth/vk/`,
|
||||
GET_MAP: `${CLIENT.API_ADDR}/api/route/`,
|
||||
POST_MAP: `${CLIENT.API_ADDR}/api/route/`,
|
||||
GET_ROUTE_LIST: `${CLIENT.API_ADDR}/api/route/list/`,
|
||||
|
||||
DROP_ROUTE: `${CLIENT.API_ADDR}/route`,
|
||||
MODIFY_ROUTE: `${CLIENT.API_ADDR}/route/modify`,
|
||||
SET_STARRED: `${CLIENT.API_ADDR}/route/star`,
|
||||
DROP_ROUTE: `${CLIENT.API_ADDR}/api/route/`,
|
||||
MODIFY_ROUTE: `${CLIENT.API_ADDR}/api/route/`,
|
||||
SET_STARRED: `${CLIENT.API_ADDR}/api/route/publish/`,
|
||||
};
|
||||
|
||||
export const API_RETRY_INTERVAL = 10;
|
||||
|
|
|
@ -1,42 +1,39 @@
|
|||
export interface IRoles {
|
||||
guest: string,
|
||||
vk: string,
|
||||
admin: string,
|
||||
guest: string;
|
||||
vk: string;
|
||||
admin: string;
|
||||
}
|
||||
|
||||
export interface IUser {
|
||||
new_messages: number,
|
||||
place_types: {},
|
||||
random_url: string,
|
||||
role: IRoles[keyof IRoles],
|
||||
routes: {},
|
||||
success: boolean,
|
||||
id?: string,
|
||||
token?: string,
|
||||
photo: string,
|
||||
first_name: string,
|
||||
// userdata: {
|
||||
// name: string,
|
||||
// agent: string,
|
||||
// ip: string,
|
||||
// }
|
||||
new_messages: number;
|
||||
place_types: {};
|
||||
random_url: string;
|
||||
role: IRoles[keyof IRoles];
|
||||
routes: {};
|
||||
success: boolean;
|
||||
id?: number;
|
||||
uid: string;
|
||||
token?: string;
|
||||
photo: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export const ROLES: IRoles = {
|
||||
guest: 'guest',
|
||||
vk: 'vk',
|
||||
admin: 'admin',
|
||||
guest: "guest",
|
||||
vk: "vk",
|
||||
admin: "admin"
|
||||
};
|
||||
|
||||
export const DEFAULT_USER: IUser = {
|
||||
new_messages: 0,
|
||||
place_types: {},
|
||||
random_url: '',
|
||||
random_url: "",
|
||||
role: ROLES.guest,
|
||||
routes: {},
|
||||
success: false,
|
||||
id: null,
|
||||
token: null,
|
||||
photo: null,
|
||||
first_name: null,
|
||||
name: null,
|
||||
uid: null,
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ export interface IDialogs {
|
|||
}
|
||||
|
||||
export interface IMapTabs {
|
||||
mine: string,
|
||||
my: string,
|
||||
all: string,
|
||||
starred: string,
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ export const DIALOGS: IDialogs = ({
|
|||
});
|
||||
|
||||
export const TABS: IMapTabs = ({
|
||||
mine: 'Мои',
|
||||
my: 'Мои',
|
||||
all: 'Заявки',
|
||||
starred: 'Каталог',
|
||||
});
|
||||
|
|
|
@ -15,6 +15,17 @@ export interface IStickerPack {
|
|||
}
|
||||
}
|
||||
|
||||
export interface ISticker {
|
||||
angle: number;
|
||||
set: string;
|
||||
sticker: string;
|
||||
text: string;
|
||||
latlngs: {
|
||||
lat: number;
|
||||
lng: number;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IStickers {
|
||||
base: IStickerPack,
|
||||
real: IStickerPack,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue