mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-11 18:26:04 +00:00
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>
This commit is contained in:
committed by
GitHub
parent
7da5512d45
commit
d8222d83f0
@@ -1,10 +1,12 @@
|
||||
import { ContextStoreDataUpdate, useContextStore } from '@/hooks/Mapper/utils';
|
||||
import { createContext, Dispatch, ForwardedRef, forwardRef, SetStateAction, useContext, useEffect } from 'react';
|
||||
import {
|
||||
ActivitySummary,
|
||||
CommandLinkSignatureToSystem,
|
||||
MapUnionTypes,
|
||||
OutCommandHandler,
|
||||
SolarSystemConnection,
|
||||
TrackingCharacter,
|
||||
UseCharactersCacheData,
|
||||
UseCommentsData,
|
||||
} from '@/hooks/Mapper/types';
|
||||
@@ -18,8 +20,6 @@ import {
|
||||
} from '@/hooks/Mapper/mapRootProvider/hooks/useStoreWidgets.ts';
|
||||
import { WindowsManagerOnChange } from '@/hooks/Mapper/components/ui-kit/WindowManager';
|
||||
import { DetailedKill } from '../types/kills';
|
||||
import { ActivitySummary } from '../components/mapRootContent/components/CharacterActivity';
|
||||
import { TrackingCharacter } from '../components/mapRootContent/components/TrackAndFollow/types';
|
||||
|
||||
export type MapRootData = MapUnionTypes & {
|
||||
selectedSystems: string[];
|
||||
@@ -31,7 +31,6 @@ export type MapRootData = MapUnionTypes & {
|
||||
activity: ActivitySummary[];
|
||||
loading?: boolean;
|
||||
};
|
||||
showTrackAndFollow: boolean;
|
||||
trackingCharactersData: TrackingCharacter[];
|
||||
};
|
||||
|
||||
@@ -45,7 +44,6 @@ const INITIAL_DATA: MapRootData = {
|
||||
activity: [],
|
||||
loading: false,
|
||||
},
|
||||
showTrackAndFollow: false,
|
||||
trackingCharactersData: [],
|
||||
userCharacters: [],
|
||||
presentCharacters: [],
|
||||
@@ -62,6 +60,8 @@ const INITIAL_DATA: MapRootData = {
|
||||
options: {},
|
||||
isSubscriptionActive: false,
|
||||
linkSignatureToSystem: null,
|
||||
mainCharacterEveId: null,
|
||||
followingCharacterEveId: null,
|
||||
};
|
||||
|
||||
export enum AvailableThemes {
|
||||
@@ -166,6 +166,8 @@ export const MapRootProvider = ({ children, fwdRef, outCommand }: MapRootProvide
|
||||
},
|
||||
);
|
||||
const { windowsSettings, toggleWidgetVisibility, updateWidgetSettings, resetWidgets } = useStoreWidgets();
|
||||
const comments = useComments({ outCommand });
|
||||
const charactersCache = useCharactersCache({ outCommand });
|
||||
|
||||
useEffect(() => {
|
||||
let foundNew = false;
|
||||
@@ -183,11 +185,9 @@ export const MapRootProvider = ({ children, fwdRef, outCommand }: MapRootProvide
|
||||
if (foundNew) {
|
||||
setInterfaceSettings(newVals);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const comments = useComments({ outCommand });
|
||||
const charactersCache = useCharactersCache({ outCommand });
|
||||
|
||||
return (
|
||||
<MapRootContext.Provider
|
||||
value={{
|
||||
|
||||
Reference in New Issue
Block a user