Files
wanderer/assets/js/hooks/Mapper/components/mapInterface/constants.tsx
Aleksei Chichenkov d8222d83f0 Refactoring and fixing problems (#317)
* fix(Map): fix design of kills widget, fix design of signatures widget - refactor a lot of code, fixed problem with tooltip blinking

* fix(Map): refactor Tracking dialog, refactor Activity tracker, refactor codebase and some styles

* fix(Core): don't count character passage on manual add connection

* refactor(Core): improved characters tracking API

* fix(Core): fixed link signature to system on 'leads to' set

* fix(Map): Refactor map settings and prepared it to easier using

* fix(Map): Add support new command for following update

* fix(Map): Add support new command for main update

* refactor(Core): Reduce map init data by using cached system static data

* refactor(Core): Reduce map init data by extract signatures loading to a separate event

* fix(Core): adjusted IP rate limits

* fix(Map): Update design of tracking characters. Added icons for following and main. Added ability to see that character on the station or structure

---------

Co-authored-by: achichenkov <aleksei.chichenkov@telleqt.ai>
Co-authored-by: Dmitry Popov <dmitriypopovsamara@gmail.com>
2025-04-11 23:17:53 +04:00

119 lines
2.5 KiB
TypeScript

import { WindowProps } from '@/hooks/Mapper/components/ui-kit/WindowManager/types.ts';
import {
LocalCharacters,
RoutesWidget,
SystemInfo,
SystemSignatures,
SystemStructures,
WSystemKills,
} from '@/hooks/Mapper/components/mapInterface/widgets';
import { CommentsWidget } from '@/hooks/Mapper/components/mapInterface/widgets/CommentsWidget';
export const CURRENT_WINDOWS_VERSION = 9;
export const WINDOWS_LOCAL_STORE_KEY = 'windows:settings:v2';
export enum WidgetsIds {
info = 'info',
signatures = 'signatures',
local = 'local',
routes = 'routes',
structures = 'structures',
kills = 'kills',
comments = 'comments',
}
export const STORED_VISIBLE_WIDGETS_DEFAULT = [
WidgetsIds.info,
WidgetsIds.local,
WidgetsIds.routes,
WidgetsIds.signatures,
];
export const DEFAULT_WIDGETS: WindowProps[] = [
{
id: WidgetsIds.info,
position: { x: 10, y: 10 },
size: { width: 250, height: 200 },
zIndex: 0,
content: () => <SystemInfo />,
},
{
id: WidgetsIds.signatures,
position: { x: 10, y: 220 },
size: { width: 250, height: 300 },
zIndex: 0,
content: () => <SystemSignatures />,
},
{
id: WidgetsIds.local,
position: { x: 270, y: 10 },
size: { width: 250, height: 510 },
zIndex: 0,
content: () => <LocalCharacters />,
},
{
id: WidgetsIds.routes,
position: { x: 10, y: 530 },
size: { width: 510, height: 200 },
zIndex: 0,
content: () => <RoutesWidget />,
},
{
id: WidgetsIds.structures,
position: { x: 10, y: 730 },
size: { width: 510, height: 200 },
zIndex: 0,
content: () => <SystemStructures />,
},
{
id: WidgetsIds.kills,
position: { x: 270, y: 730 },
size: { width: 510, height: 200 },
zIndex: 0,
content: () => <WSystemKills />,
},
{
id: WidgetsIds.comments,
position: { x: 10, y: 10 },
size: { width: 250, height: 300 },
zIndex: 0,
content: () => <CommentsWidget />,
},
];
type WidgetsCheckboxesType = {
id: WidgetsIds;
label: string;
}[];
export const WIDGETS_CHECKBOXES_PROPS: WidgetsCheckboxesType = [
{
id: WidgetsIds.info,
label: 'System Info',
},
{
id: WidgetsIds.signatures,
label: 'Signatures',
},
{
id: WidgetsIds.local,
label: 'Local',
},
{
id: WidgetsIds.routes,
label: 'Routes',
},
{
id: WidgetsIds.structures,
label: 'Structures',
},
{
id: WidgetsIds.kills,
label: 'Kills',
},
{
id: WidgetsIds.comments,
label: 'Comments',
},
];