chore: release version v1.66.15

This commit is contained in:
Dmitry Popov
2025-06-08 10:45:41 +02:00
parent 08aaf2f2dd
commit 4093f28cee
7 changed files with 50 additions and 30 deletions

View File

@@ -1,14 +1,13 @@
import { useCallback } from 'react';
import clsx from 'clsx';
import { useAutoAnimate } from '@formkit/auto-animate/react';
import { Commands } from '@/hooks/Mapper/types/mapHandlers.ts';
import { CharacterTypeRaw } from '@/hooks/Mapper/types';
import { emitMapEvent } from '@/hooks/Mapper/events'; import { emitMapEvent } from '@/hooks/Mapper/events';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import classes from './Characters.module.scss';
import { isDocked } from '@/hooks/Mapper/helpers/isDocked.ts'; import { isDocked } from '@/hooks/Mapper/helpers/isDocked.ts';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import { CharacterTypeRaw } from '@/hooks/Mapper/types';
import { Commands, OutCommand } from '@/hooks/Mapper/types/mapHandlers.ts';
import { useAutoAnimate } from '@formkit/auto-animate/react';
import clsx from 'clsx';
import { PrimeIcons } from 'primereact/api'; import { PrimeIcons } from 'primereact/api';
import { useCallback } from 'react';
import classes from './Characters.module.scss';
interface CharactersProps { interface CharactersProps {
data: CharacterTypeRaw[]; data: CharacterTypeRaw[];
} }
@@ -17,13 +16,22 @@ export const Characters = ({ data }: CharactersProps) => {
const [parent] = useAutoAnimate(); const [parent] = useAutoAnimate();
const { const {
outCommand,
data: { mainCharacterEveId, followingCharacterEveId }, data: { mainCharacterEveId, followingCharacterEveId },
} = useMapRootState(); } = useMapRootState();
const handleSelect = useCallback((character: CharacterTypeRaw) => { const handleSelect = useCallback(async (character: CharacterTypeRaw) => {
if (!character) {
return;
}
await outCommand({
type: OutCommand.startTracking,
data: { character_eve_id: character.eve_id },
});
emitMapEvent({ emitMapEvent({
name: Commands.centerSystem, name: Commands.centerSystem,
data: character?.location?.solar_system_id?.toString(), data: character.location?.solar_system_id?.toString(),
}); });
}, []); }, []);
@@ -37,7 +45,7 @@ export const Characters = ({ data }: CharactersProps) => {
className={clsx( className={clsx(
'overflow-hidden relative', 'overflow-hidden relative',
'flex w-[35px] h-[35px] rounded-[4px] border-[1px] border-solid bg-transparent cursor-pointer', 'flex w-[35px] h-[35px] rounded-[4px] border-[1px] border-solid bg-transparent cursor-pointer',
'transition-colors duration-250', 'transition-colors duration-250 hover:bg-stone-300/90',
{ {
['border-stone-800/90']: !character.online, ['border-stone-800/90']: !character.online,
['border-lime-600/70']: character.online, ['border-lime-600/70']: character.online,
@@ -45,6 +53,18 @@ export const Characters = ({ data }: CharactersProps) => {
)} )}
title={character.name} title={character.name}
> >
{character.tracking_paused && (
<>
<span
className={clsx(
'absolute top-[2px] left-[2px] w-[9px] h-[9px]',
'text-yellow-500 text-[9px] rounded-[1px] z-10 hover:hidden',
'pi',
PrimeIcons.PAUSE,
)}
/>
</>
)}
{mainCharacterEveId === character.eve_id && ( {mainCharacterEveId === character.eve_id && (
<span <span
className={clsx( className={clsx(
@@ -55,6 +75,7 @@ export const Characters = ({ data }: CharactersProps) => {
)} )}
/> />
)} )}
{followingCharacterEveId === character.eve_id && ( {followingCharacterEveId === character.eve_id && (
<span <span
className={clsx( className={clsx(

View File

@@ -1,5 +1,4 @@
import { useMapState } from '@/hooks/Mapper/components/map/MapProvider.tsx'; import { useMapState } from '@/hooks/Mapper/components/map/MapProvider.tsx';
import { useCallback, useRef } from 'react';
import { import {
CommandCharacterAdded, CommandCharacterAdded,
CommandCharacterRemoved, CommandCharacterRemoved,
@@ -7,6 +6,7 @@ import {
CommandCharacterUpdated, CommandCharacterUpdated,
CommandPresentCharacters, CommandPresentCharacters,
} from '@/hooks/Mapper/types'; } from '@/hooks/Mapper/types';
import { useCallback, useRef } from 'react';
export const useCommandsCharacters = () => { export const useCommandsCharacters = () => {
const { update } = useMapState(); const { update } = useMapState();

View File

@@ -1,8 +1,8 @@
import { useReactFlow } from 'reactflow';
import { useCallback, useRef } from 'react';
import { CommandInit } from '@/hooks/Mapper/types/mapHandlers.ts';
import { convertConnection2Edge, convertSystem2Node } from '../../helpers';
import { MapData, useMapState } from '@/hooks/Mapper/components/map/MapProvider.tsx'; import { MapData, useMapState } from '@/hooks/Mapper/components/map/MapProvider.tsx';
import { CommandInit } from '@/hooks/Mapper/types/mapHandlers.ts';
import { useCallback, useRef } from 'react';
import { useReactFlow } from 'reactflow';
import { convertConnection2Edge, convertSystem2Node } from '../../helpers';
export const useMapInit = () => { export const useMapInit = () => {
const rf = useReactFlow(); const rf = useReactFlow();

View File

@@ -1,14 +1,13 @@
import { Characters } from '../characters/Characters';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import { useMemo } from 'react';
import clsx from 'clsx';
import { sortOnlineFunc } from '@/hooks/Mapper/components/hooks/useGetOwnOnlineCharacters.ts'; import { sortOnlineFunc } from '@/hooks/Mapper/components/hooks/useGetOwnOnlineCharacters.ts';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import { WithChildren } from '@/hooks/Mapper/types/common.ts'; import { WithChildren } from '@/hooks/Mapper/types/common.ts';
import { Button } from 'primereact/button'; import clsx from 'clsx';
import { useMemo } from 'react';
import { Characters } from '../characters/Characters';
const Topbar = ({ children }: WithChildren) => { const Topbar = ({ children }: WithChildren) => {
const { const {
data: { characters, userCharacters, pings }, data: { characters, userCharacters },
} = useMapRootState(); } = useMapRootState();
const charsToShow = useMemo(() => { const charsToShow = useMemo(() => {

View File

@@ -1,10 +1,10 @@
import { SolarSystemRawType, SolarSystemStaticInfoRaw } from '@/hooks/Mapper/types/system.ts';
import { SolarSystemConnection } from '@/hooks/Mapper/types/connection.ts';
import { WormholeDataRaw } from '@/hooks/Mapper/types/wormholes.ts';
import { ActivitySummary, CharacterTypeRaw, TrackingCharacter } from '@/hooks/Mapper/types/character.ts';
import { RoutesList } from '@/hooks/Mapper/types/routes.ts';
import { DetailedKill, Kill } from '@/hooks/Mapper/types/kills.ts';
import { CommentType, PingData, SystemSignature, UserPermissions } from '@/hooks/Mapper/types'; import { CommentType, PingData, SystemSignature, UserPermissions } from '@/hooks/Mapper/types';
import { ActivitySummary, CharacterTypeRaw, TrackingCharacter } from '@/hooks/Mapper/types/character.ts';
import { SolarSystemConnection } from '@/hooks/Mapper/types/connection.ts';
import { DetailedKill, Kill } from '@/hooks/Mapper/types/kills.ts';
import { RoutesList } from '@/hooks/Mapper/types/routes.ts';
import { SolarSystemRawType, SolarSystemStaticInfoRaw } from '@/hooks/Mapper/types/system.ts';
import { WormholeDataRaw } from '@/hooks/Mapper/types/wormholes.ts';
export enum Commands { export enum Commands {
init = 'init', init = 'init',
@@ -260,6 +260,7 @@ export enum OutCommand {
updateMainCharacter = 'updateMainCharacter', updateMainCharacter = 'updateMainCharacter',
addPing = 'add_ping', addPing = 'add_ping',
cancelPing = 'cancel_ping', cancelPing = 'cancel_ping',
startTracking = 'startTracking',
// Only UI commands // Only UI commands
openSettings = 'open_settings', openSettings = 'open_settings',

View File

@@ -119,7 +119,6 @@ defmodule WandererApp.Character.TrackerManager.Impl do
{:ok, character_state} = {:ok, character_state} =
WandererApp.Character.Tracker.update_settings(character_id, track_settings) WandererApp.Character.Tracker.update_settings(character_id, track_settings)
WandererApp.Cache.delete("character:#{character_id}:tracking_paused")
WandererApp.Character.update_character_state(character_id, character_state) WandererApp.Character.update_character_state(character_id, character_state)
else else
WandererApp.Cache.insert_or_update( WandererApp.Cache.insert_or_update(

View File

@@ -397,7 +397,7 @@ defmodule WandererApp.Map.Server.CharactersImpl do
with {:ok, old_tracking_paused} <- with {:ok, old_tracking_paused} <-
WandererApp.Cache.lookup( WandererApp.Cache.lookup(
"map:#{map_id}:character:#{character_id}:tracking_paused", "map:#{map_id}:character:#{character_id}:tracking_paused",
true false
), ),
{:ok, tracking_paused} <- {:ok, tracking_paused} <-
WandererApp.Cache.lookup("character:#{character_id}:tracking_paused", false) do WandererApp.Cache.lookup("character:#{character_id}:tracking_paused", false) do