51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
//these variables should not changed by the user and will not be saved in storage
|
|
|
|
import {chatEntity, roomId} from '@configs/chat/types';
|
|
import {User} from '@user/types';
|
|
import {AccountName} from './types';
|
|
|
|
import {getVersionByNum, VersionType} from '@helper/version';
|
|
import configDarkTheme, {ThemeTokensType} from '@configs/colors';
|
|
|
|
import {PA_Point} from '@components/map/cluster/getData';
|
|
|
|
export const APP_VERSION = getVersionByNum(1);
|
|
export const AppVarMaxBackups: number = 10;
|
|
export const maxCachedUsers = 30;
|
|
|
|
export enum appStatus {
|
|
IS_LOADING,
|
|
APP_RUNNING,
|
|
}
|
|
|
|
export enum connectionStatus {
|
|
UNKNOWN,
|
|
OFFLINE,
|
|
ONLINE,
|
|
RECONNECTING,
|
|
}
|
|
|
|
export interface NON_SAVE_VARS {
|
|
currentAppVersion: VersionType;
|
|
appStatus: appStatus;
|
|
theme: ThemeTokensType;
|
|
connectionStatus: connectionStatus;
|
|
cachedUsers: {[key: AccountName]: User};
|
|
chats: {[key: roomId]: chatEntity};
|
|
chatActivity: roomId[];
|
|
selectedChat: roomId | 'none';
|
|
eventMapMarkers: PA_Point[];
|
|
}
|
|
|
|
export const non_save_vars: NON_SAVE_VARS = {
|
|
currentAppVersion: APP_VERSION,
|
|
appStatus: appStatus.IS_LOADING,
|
|
theme: configDarkTheme.tokens,
|
|
connectionStatus: connectionStatus.UNKNOWN,
|
|
cachedUsers: {},
|
|
chats: {},
|
|
chatActivity: [],
|
|
selectedChat: 'none',
|
|
eventMapMarkers: [],
|
|
};
|